-
Notifications
You must be signed in to change notification settings - Fork 256
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
fitToMarkers resists dragging #69
Comments
Surprised I never ran into this!I can repo it on http://googlewebcomponents.github.io/google-sheets/components/google-sheets/demo.html. The intention is that the user can still drag the map. Looks like this is from https://github.com/GoogleWebComponents/google-map/blob/master/google-map.html#L668:L669. The lat/lng get updated and Interested in submitting a PR? |
Alright, I've made a PR! It's a simple fix, and it partially solves the issue. It will still explode if showCenterMarker is true, but that's a separate discussion on what you want the behavior to be. The two are mutually exclusive I think. I mean, you have a marker that's supposed to stay in the center of your map all the time, and if you have other markers on the map that will change the map center position, then you'll get some pretty weird stuff. I have three recommendations off the top of my head:
|
+1 |
I'm also experiencing the same issue! |
Me too. |
To quickly fix this, have a look at google-map.html. There'll be
|
@levitanong I merged your PR. Thanks! I think your |
Hurrah! |
I'd say that |
Works! Thanks very much @levitanong and @ebidel. |
This is pretty weird: when I drag, the screen shakes wildly, because the viewport is moved by a bit, then reset back. If it really IS supposed to resist the drag, then I'd recommend to include in the implementation
setOptions({ draggable: false })
to prevent the shaking. I'd also suggest the addition of a fitToMarkers method that resets the view once, and can be called again at a later time to reset the view after the user has navigated away.The text was updated successfully, but these errors were encountered: