[iOS] SfMaps zooming and panning is very jumpy and does not center on the requested GeoCoordinates

I am displaying a small map that is centered on a map marker as a result of Geolocation to an address. Here is the XAML for the map:

<map:SfMaps EnablePanning="True"
          EnableZooming="True"
          ZoomLevel="15">
<map:SfMaps.Layers>
<map:ImageryLayer BingMapKey="[redacted]"
               BingMapStyle="Road"
               GeoCoordinates="{Binding WorksiteGeoCoordinates}"
        LayerType="Bing">
<map:ImageryLayer.Markers>
<map:MapMarker Latitude="{Binding WorksiteLatitude}"
             Longitude="{Binding WorksiteLongitude}" />
</map:ImageryLayer.Markers>
</map:ImageryLayer>
</map:SfMaps.Layers>
</map:SfMaps>

WorksiteGeoCoordinates is declared in the ViewModel as a Xamarin.Forms.Point value:

public Point WorksiteGeoCoordinates

On Android, this works beautifully and the map interaction is smooth and generally works as expected. On iOS, however, the map loads in the center of the Atlantic Ocean and the zooming and panning is generally unusable; the viewport jumps back and forth and I cannot pan even by hand to the location where the map marker is placed. This behavior occurs both in the Simulator and on a physical iOS device.

I am using SfMaps package version 19.1.0.54

3 Replies

SS Sridevi Sivakumar Syncfusion Team May 3, 2021 01:49 PM UTC

Hi Andrew Hoke,

We have checked the reported query with the simple sample, and working firn at our end while zoom or pan the map. We have prepared a sample and video for your requirement, please have it from the below link

Sample link:  https://www.syncfusion.com/downloads/support/directtrac/general/ze/MapSample_(2)-1470343988

Video link:  https://www.syncfusion.com/downloads/support/directtrac/general/ze/MapVideo-2132241164

Tested device detail:
iPhone 12 Pro Max – 14.4

Since we are not aware of your exact application scenario, we were not able to reproduce this at our end, can you please revert us by modifying the sample based on your application along with the replication procedure and share the issue reproducing device details.

Let us know if you need any further assistance.

Regards,
Sridevi S.
 
 



AH Andrew Hoke May 3, 2021 11:11 PM UTC

Hi Sridevi,

I am unable to share an exact copy of the full page XAML and ViewModel as the use case is not publicly available/open source.

What I can tell you is that the general structure of the page is:

ContentPage > AbsoluteLayout > RefreshView (full page) > ScrollView > (various nested StackLayouts, Grids, and/or Frames) > SfMaps

I suspect maybe the presence of the RefreshView and ScrollView is confusing the gesture recognizers of the map that enable zooming and panning.


SS Sridevi Sivakumar Syncfusion Team May 4, 2021 10:33 AM UTC

Hi Andrew Hoke,

Thanks for sharing the information,

We have checked our sample with the mentioned layout structure and it works fine. Please have a sample and video from the below link

Sample link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/MapNewSample-967314677

Video link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/MapNewVideo-1127603350

So, could you please check the issue with the attached sample and let us know whether it is reproduced or not?

If your scenario different this, please revert us by modifying the sample based on your application along with the replication procedure, it will be helpful for us to analyze further and provide an appropriate solution.

Regards,
Sridevi S.
 


Loader.
Up arrow icon