Pinch to zoom not working on ios

Hello, i have this code:

<maps:SfMaps x:Name="sfmap" ZoomLevel="18" Tapped="sfmap_Tapped" >

 <maps:SfMaps.Layers>

 <maps:ImageryLayer LayerType="OSM" x:Name="imagerylayer" ResetOnDoubleTap="False">

 <maps:ImageryLayer.Sublayers>

<maps:ShapeFileLayer x:Name="shapeLayer" ShapeType="Polyline">

<maps:ShapeFileLayer.Points>

</maps:ShapeFileLayer.Points>

 <maps:ShapeFileLayer.ShapeSettings>

 <maps:ShapeSetting x:Name="settings" ShapeStrokeThickness="3" ShapeStroke="#00A0FF" >

 </maps:ShapeSetting>

 </maps:ShapeFileLayer.ShapeSettings>

</maps:ShapeFileLayer>

</maps:ImageryLayer.Sublayers>

 <maps:ImageryLayer.MarkerTemplate>

 <DataTemplate>

 <Image x:Name="markerImage"

 HorizontalOptions="Center"

 Source="{Binding Image}"

 VerticalOptions="Center"

HeightRequest="25"

WidthRequest="25" />

</DataTemplate>

  </maps:ImageryLayer.MarkerTemplate>

 </maps:ImageryLayer>

</maps:SfMaps.Layers>

 </maps:SfMaps>


On Android works as expected while on IOS zoom and panning not work good as you can see on video uploaded on youtube by me:

https://youtu.be/yQHqT9sjKl0


If i write that code on a new solution it works but i cannot start new solution; I removed all code behind but result is same, can you help me to understand what is the problem? 


thank you


6 Replies

ET Eswaran Thirugnanasambandam Syncfusion Team June 7, 2022 02:21 PM UTC

We are facing device unavailability issues due to remote working. We prepared a sample based on the given code snippet and checked the reported problem in the iOS simulator. But we are unable to replicate the problem from our side. We prepared a video demonstration to show that the maps zooms correctly when pinch zooming. Please get the tested sample and video from the below attachment.


If you still face any problem, can you revert us by modifying the sample based on your scenario along with replication steps and testing device details. Can you please confirm whether the issue occurs only in iOS device or also occurs in iOS simulator. It will help us provide an appropriate solution at the earliest.


Attachment: SFMapsmain_6d4d055a.zip


FA Fabio June 7, 2022 06:38 PM UTC

Thank you, tomorrow i will make all tests.



ET Eswaran Thirugnanasambandam Syncfusion Team June 8, 2022 05:37 AM UTC

You are welcome. We will wait until we hear from you.



FA Fabio replied to Eswaran Thirugnanasambandam June 8, 2022 06:52 PM UTC

I have copied maps part of your code and i created a new page (xaml) without any code behind.


Result is same as video i posted above. I'm going crazy...

i landing at map page with flyout item in the appshell.xaml:

    <FlyoutItem Title="Mappa" Icon="icon_about.png" x:Name="MapsPage" IsVisible="False" >

        <ShellContent Route="MapsPage" ContentTemplate="{DataTemplate local:MapsPage}" />

    </FlyoutItem>


To be clear, your solution works with same code; only difference is how landing at page.


Path to landing in maps page:

Wlecomepage.xaml (start page)---->  await Shell.Current.GoToAsync("//MainPage");-----> (select flyoutitem)----> maps page and then zoom and pan works as video above.


I hope that i have explained good.

Please help me to understand!!



FA Fabio June 9, 2022 01:34 PM UTC

I found a problem:




In the "header section" of the page where i make all declarations i had following:






xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"


xmlns:maps="clr-namespace:Syncfusion.SfMaps.XForms;assembly=Syncfusion.SfMaps.XForms"


x:Class="myapp.Views.MapsPage"


xmlns:autocomplete="clr-namespace:Syncfusion.SfAutoComplete.XForms;assembly=Syncfusion.SfAutoComplete.XForms"


xmlns:auto="clr-namespace:myapp"


xmlns:collection="clr-namespace:System.Collections.Generic;assembly=netstandard"


xmlns:inputLayout="clr-namespace:Syncfusion.XForms.TextInputLayout;assembly=Syncfusion.Core.XForms"


>


and i discover if i remove this:




xmlns:autocomplete="clr-namespace:Syncfusion.SfAutoComplete.XForms;assembly=Syncfusion.SfAutoComplete.XForms"


xmlns:auto="clr-namespace:myapp"


xmlns:collection="clr-namespace:System.Collections.Generic;assembly=netstandard"


xmlns:inputLayout="clr-namespace:Syncfusion.XForms.TextInputLayout;assembly=Syncfusion.Core.XForms"




all works correctly. I dont know why but if this can help you to fix behavior this is what i discover.


Thank you for support!!



ET Eswaran Thirugnanasambandam Syncfusion Team June 10, 2022 06:00 AM UTC

We are glad to know that your issue has been resolved. Thanks for your solution.


Loader.
Up arrow icon