Monday, 26 September 2016

javascript - Fly To Location in Leaflet


Is it possible to 'fly to location' in Leaflet in the same way as this Mapbox GL example?



Answer



map.flyTo() is available in Leaflet 1.0.


However the parameters are different from those in the example. See http://leafletjs.com/reference-1.0.0.html#map-flyto


flyTo( latlng, zoom?, options?)


Example:


flyTo([13.87992, 45.9791], 12)



No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...