7ee1204cf1
* Update worldmap.js to allow "flying" to new bounds When the bounds command is used, give the option to "fly" (a Leaflet term meaning to animate the change of bounds: zoom out, pan, zoom in) to the new bounds rather than simply repositioning the map. This is done very simply by providing a "fly" flag that, with a truthy value, calls map.flyToBounds instead of map.fitBounds. There are 10 other places where map.fitBounds is used, but for my purposes, I only want to "fly" to the new bounds when I explicitly set the bounds through this command. So perhaps these changes could/should be used in other scenarios too. * Update worldmap.js to allow flying to bounds I've changed almost every instance of fitBounds so that, if the "fly" property is true, then it will use flyToBounds instead. I didn't change the search, where it does fitBounds and then panTo, as it wasn't clear how/whether "fly" could be provided there. I also fixed a few bugs where it was checking for "fit" being a property, but then didn't check its value! So you could provide fit:false and it would still be treated as fit:true! |
||
---|---|---|
.. | ||
css | ||
images | ||
leaflet | ||
favicon.ico | ||
index3d.html | ||
index.html | ||
worldmap.js | ||
worldmaphead.html |