blazor-components icon indicating copy to clipboard operation
blazor-components copied to clipboard

How to Update Mapbound when adding more markers

Open nssidhu opened this issue 1 year ago • 0 comments

Currently i start with some location and center the map for that location. But then, i add some more markers which are far away, i want the map to resize(zoom) so that this newly added markers are visible in the map.

How can i do that ?

usually in javascript it would be something like

 bounds = new google.maps.LatLngBounds();
                    bounds.extend(marker.getPosition());
                     mapNew.fitBounds(bounds); //auto-zoom
                    mapNew.panToBounds(bounds); //auto-center

nssidhu avatar Mar 06 '23 13:03 nssidhu