Skip to content

Conversation

ansis
Copy link
Contributor

@ansis ansis commented Apr 10, 2013

Just like with scrollzooming, it is expected that that the map will zoom around the clicked point, not the center.

Maybe this should be added as map.setZoomAbout(zoom, point) or something, since the functionality is shared with the scroll handler, but wasn't sure if it was preferrable.

@mourner
Copy link
Member

mourner commented Apr 10, 2013

Hmm, I didn't realize that it's now expected behavior for dblclick zoom... Several years ago it wasn't for sure. :) And many online maps behave the old way... Although I see now that e.g. Google Maps has the new behavior. And I generally agree it's better for usability.

Regarding setZoomAround method — yeah, I was just planning to implement this #1157.

I'll merge the pull manually, creating the method along the way.

@ansis
Copy link
Contributor Author

ansis commented Apr 10, 2013

Cool, looked but didn't see #1157

"it is expected" might have been a bit strong. Its a personal preference since its easier to zoom in multiple times. ModestMaps does it this way as well. Bing doesn't though.

@danzel
Copy link
Member

danzel commented Apr 10, 2013

Mouse wheel zoom has the desired behaviour already, not sure if we can share some code there?

mourner added a commit that referenced this pull request Apr 11, 2013
@mourner mourner merged commit 6c53aa6 into Leaflet:master Apr 11, 2013
@mourner
Copy link
Member

mourner commented Apr 11, 2013

@danzel yep, done

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.

3 participants