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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Reset zoom on shapelayer

Thread ID:

Created:

Updated:

Platform:

Replies:

142624 Feb 12,2019 03:12 PM UTC Feb 14,2019 10:24 AM UTC Xamarin.Forms 3
loading
Tags: SfMaps
Christian Rendl
Asked On February 12, 2019 03:12 PM UTC

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,

Christian

Bharathiraja K [Syncfusion]
Replied On 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. 
 
Regards, 
Bharathiraja. 


Christian Rendl
Replied On 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,

Christian

Bharathiraja K [Syncfusion]
Replied On 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. 
 
Regards, 
Bharathiraja. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;