The Web Blinders logo

Programming

How to center and zoom into a Marker in Leaflet

You can achieve this using panTo() as below

map.setZoom(20); // zoom percentage
map.panTo([lat,long]); // pass lat & long

ALTERNATE TITLES

How to zoom to a marker leaflet

leaflet center a marker

leaflet setZoom example

leaflet panTo example

Need developers ?

if so, send a message.

thewebblinders@gmail.com

More Programming from our blog

SEARCH FOR ARTICLES