Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for new geocoordinates when marker is dragged #4

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jsblair9
Copy link

@jsblair9 jsblair9 commented Mar 4, 2019

It updates the defaults markerOptions.draggable: true and then adds a second bind() on the geocode:dragged trigger event.

Just makes it a little easier to pin point an exact location when the address is a little off from the Google Places api.

@jsblair9
Copy link
Author

jsblair9 commented Mar 4, 2019

Totally forgot to also add in the <div id="map" style="height:500px"></div> to the template, which lets google maps to render the map location -- kinda hard to drag the marker if you can't see it anywhere 😂

@aryehraber
Copy link
Owner

@jsblair9 Nice one, thanks! I'll try and have a look at the changes this week and give it a little test run.

@jsblair9
Copy link
Author

jsblair9 commented Mar 5, 2019

@aryehraber thanks! Again I'll reiterate that it's a quick and dirty addition to get the functionality working. Don't think the approach is quite right, especially if any other events were to be added in. But hey, it works for what it does!

Thanks for taking a look!

@aryehraber
Copy link
Owner

Hey @jsblair9, sorry about the delay on this one...

I finally had a chance to try out the changes but the map doesn't seem to render in the CP. I can see the new #map element in the DOM, but the API doesn't seem to do anything with it. Is there a missing option to bind the element? Or am I missing something?

@jsblair9
Copy link
Author

hmmm... I thought I had addressed that with 4eebf66 but maybe I missed something. I'll double check

@jsblair9
Copy link
Author

@aryehraber figured it out... forgot to set map:true in the initial default settings

@aryehraber
Copy link
Owner

aryehraber commented Mar 22, 2019

Ah right, nice one!

So, now I'm getting the following JS error:

Screenshot 2019-03-22 at 17 01 50

Does rendering the map require any extra settings or API access from Google Console? Does the committed code work on your end without any issues?

@aryehraber
Copy link
Owner

Btw, since you mentioned this was just a "quick and dirty addition", I don't want you to spend too much time on it. I like the idea of having a map render to more accurately pinpoint a location (since I've noticed some addresses being slightly off too), but I rarely use this addon anyway so no worries either way.

@jsblair9
Copy link
Author

It does seem to work for me without any issue, and no extra settings on the Google places API.

really happy to help so no worries at all

@aryehraber
Copy link
Owner

Ok cool, I'll take another stab at it later this week and see if I can figure out why I'm getting the above error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants