We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Reset zoom on shapelayer

Dear Syncfusion team,

I would need a possibility to reset the zoom of a custom shapefile layer (indoor map) to the initial zoom level. As reported by others previously, the Zoom properties do not have any effect on shapefile layers. However on iOS, I found that when I add a new marker programatically the bounds of the shapefiler reset to the initial bounds - which would be perfectly fine for my use case. However, on Android nothing happens to the map extents when adding a marker. What's the intended behavior? 

Can I somehow achieve the same resetting behavior on Android?

Many thanks,


3 Replies

BK Bharathiraja K Syncfusion Team February 13, 2019 12:12 PM UTC

Hi Christian, 
Greetings from Syncfusion. 
We have achieved your requirement as a workaround solution. We have set the ZoomLevel value to 1 in SfMaps to reset the zoom when adding the marker programmatically. 
Please refer the following sample for your reference. 
Note: We are not updating the ZoomLevel value when zooming map. So, we can reset the zoom by changing the ZoomLevel value to 1. We will analyze the different behavior in Android and iOS and will include this change in any of our upcoming release. 
Please let us know if you have any concerns. 

CR Christian Rendl February 13, 2019 03:30 PM UTC

Many thanks, your workaround works perfectly fine. Setting the zoom level to 2 and then immediately back to 1 does the trick.

Best regards,


BK Bharathiraja K Syncfusion Team February 14, 2019 10:24 AM UTC

Hi Christian, 
We glad that the reported problem resolved at your end. Please let us know if you have any other queries. 

Live Chat Icon For mobile
Up arrow icon