Hi Mike,
Thank you for contacting Syncfusion support.
We are able to reproduce the reported issue. When we checked the provided code snippet, we came to know that you are refreshing the maps in the “load“ event. When we refresh the Maps, the load event will be triggered. Since you are calling the refresh() method in load event, the execution gets looped and results in the reported issue. To resolve this issue, we need to set the local variable “isRefreshed” as true before calling the refresh() method of Maps. This will resolve the reported issue.
If you want to zoom the map layer initially without markers, you can set the “Latitude” and “Longitude” properties in the “CenterPosition” property of the Maps control and set the desired zoom value in the “ZoomFactor” property of “ZoomSettings” property in Maps. If you want to zoom the maps initially based on the markers rendered in the Maps, you can set the “ShouldZoomInitially” property as true in “ZoomSettings” property of Maps. However, we have created the ASP.NET MVC application to demonstrate the same and it can be downloaded from the below link.
In the above sample, we have rendered the OSM map with the markers and ShouldZoomInitially property as true in the load event of Maps. Please let us know if the above sample meets your requirement. If not, please let us know your exact requirement. It will be helpful for us to analyze further and assist you better.
Regards,
Swetha Babu