zcreativelabs / react-simple-maps

Beautiful React SVG maps with d3-geo and topojson using a declarative api.
https://www.react-simple-maps.io/
MIT License
3.11k stars 426 forks source link

How to flyTo and zoom #306

Open irSteve opened 2 years ago

irSteve commented 2 years ago

It would be great to initiate a flyTo and/or zoom based on some event (e.g. - click, select, etc.). It is not clear from the documentation how to do that.

Here's a MapBox example: https://docs.mapbox.com/mapbox-gl-js/example/flyto/ Here is a Leaflet example: https://codesandbox.io/s/react-leaflet-demo-o7ix8

How would I approach this with react-simple-maps? TY