Stop map resetting to 0,0 on double-tap

I've got the following XAML:
HorizontalOptions="FillAndExpand"
EnablePanning="False"
ZoomLevel="10">
GeoCoordinateChanged="ImageryLayer_GeoCoordinateChanged"
ZoomLevelChanging="Handle_ZoomLevelChanging"
RequestTileUri="Handle_RequestTileUri"
CanCacheTiles="False"
LayerType="OSM"
GeoCoordinates="50.8088760375977,-1.18579387664795">

Which shows the map fine.

However, when the user double-taps on the map, it recenters to lat/long of 0/0.
How can I stop it doing this?
I was hoping I could cancel theGeoCoordinateChanged event, (similar to cancelling the ZoomLevelChanging event), but there's noCancel property of the event arguments.

1 Reply

RS Ramya Soundar Rajan Syncfusion Team February 17, 2020 09:14 AM UTC

Hi James Lavery,   
  
Greetings from Syncfusion.  
  
Query: How to restrict the zoom out while double tapping?  
  
Your requirement has been achieved by disabling the ResetOnDoubleTap property as per in below code snippet  
   
Code Snippet [XAML]  
            <maps:SfMaps x:Name="maps" HorizontalOptions="FillAndExpand" EnablePanning="False" ZoomLevel="10">   
                <maps:SfMaps.Layers >   
                    <maps:ImageryLayer x:Name="imagerylayer" GeoCoordinateChanged="Imagerylayer_GeoCoordinateChanged" ZoomLevelChanging="Imagerylayer_ZoomLevelChanging"   
                     RequestTileUri="Imagerylayer_RequestTileUri"  CanCacheTiles="False" LayerType="OSM" ResetOnDoubleTap="False"   
                     GeoCoordinates="50.8088760375977,-1.18579387664795">   
                    </maps:ImageryLayer>   
                </maps:SfMaps.Layers>   
            </maps:SfMaps>   
 
  
To know more about this, please refer the below UG  
  
Regards,  
Ramya S.  


Loader.
Up arrow icon