Raruto / leaflet-elevation

Leaflet plugin that allows to add elevation profiles using d3js
GNU General Public License v3.0
255 stars 85 forks source link

Prevent re-centering map on enter/exit fullscreen #36

Closed ajlaker closed 4 years ago

ajlaker commented 4 years ago

Hello! I love this plugin, but I'm wondering if there is a way to disable the zooming and re-centering of the map that occurs when a user enters or exits fullscreen mode?

For example, a user might be zoomed in on a particular portion of a gpx route. Upon entering fullscreen mode, the map zooms out and re-centers to show the complete gpx route. This might make for a poor user experience if someone is tracking their hiking route in real time with GPS location control.

Thanks!

Raruto commented 4 years ago

Now from version 0.8.0 it checks for the following variable map._isFullscreen (see: brunob/leaflet.fullscreen or leaflet/leaflet.fullscreen for more info)

Raruto

ajlaker commented 4 years ago

That was fast! Thank you so much -- it works great!