smeijer/L.GeoSearch — pull request #42 by heiglandreas (2014-05-09 11:51:21+00:00)
Title: Retain zoomLevel when centering map

This PR introduces a way to retain the zoom-level of the map you are in. This retaining will of course only be used when the appropriate configuration is set.

You can configure GeoSearch by adding ```retainZoomLevel``` to the config-options like follows:

new L.Control.GeoSearch({
provider: new L.GeoSearch.Provider.OpenStreetMap(),
retainZoomLevel: true,
}).addTo(map);

Setting ```retainZoomLevel``` to ```true``` will not change the zoom-level the user is currently in when centering the map on the new coordinates. Setting it to ```false``` (which is the default) will keep the current behaviour that changes the zoom-level to a fixed value (by default ```18```)

So Backwards-Compatibility is given, it justs adds the posibility to keep the current zoom-level