perliedman / leaflet-control-geocoder

A simple geocoder form to locate places. Easily extended to multiple data providers.
http://www.liedman.net/leaflet-control-geocoder/
BSD 2-Clause "Simplified" License
560 stars 220 forks source link

how to set custom zoom into map when location found #346

Open marketdevsoft opened 6 months ago

marketdevsoft commented 6 months ago

Hi, i need to change default map-zoom level of search result. I try with this code but doesn't work :

        .on('markgeocode', function(e) {
            map.setZoomAround(e.geocode.bbox.getCenter(), 10);
        }) 

Can someone help me?