SfMaps GeoCoordinates

Dear Syncfusion Support,

 

I am using the SfMaps control to display two points on a map. The user can select one of the points, which can be anywhere in the world, so I programmatically adjust the zoom and GeoCoordinates to ensure that the two markers are always in view. A problem I have encountered is that when the zoom level was low (zoomed out) when the two points are far away from each other, and the zoom level changes to a more zoomed in level because the points are closer to each other, the GeoCoordinates are not in the center of the map. I am displaying the map in a scrollview which does hinder zooming and panning performance, so it is vital that the zoom and GeoCoordinates are 100% so all points are always visible.

 

Here is the xaml for the map:

<maps:SfMaps x:Name="map" ZoomLevel="6" HeightRequest="250" Panning="map_Panning" EnableZooming="False">
                        <maps:SfMaps.Layers>
                            <maps:ImageryLayer  x:Name="map_layer" RequestTileUri="map_layer_RequestTileUri" ResetOnDoubleTap="False" Markers="{Binding                 customMarkers}">
                                <maps:ImageryLayer.MarkerTemplate>
                                    <DataTemplate>
                                        <StackLayout Orientation="Horizontal">
                                            <Image Source="{Binding MarkerSource}" HeightRequest="30" WidthRequest="30"/>
                                            <Label Text="{Binding MarkerText}" TextColor="{Binding MarkerColor}" />
                                        </StackLayout>
                                    </DataTemplate>
                                </maps:ImageryLayer.MarkerTemplate>
                                <maps:ImageryLayer.MarkerSettings>
                                    <maps:MapMarkerSetting VerticalAlignment="Near" />
                                </maps:ImageryLayer.MarkerSettings>
                            </maps:ImageryLayer>
                        </maps:SfMaps.Layers>
                    </maps:SfMaps>

 

The problem occurs when the map.ZoomLevel=1; changes to map.ZoomLevel=14 for example.

 

Any suggestion as to how I should approach this would be greatly appreciated.

 

Regards,

3 Replies 1 reply marked as answer

RS Ramya Soundar Rajan Syncfusion Team April 5, 2021 10:23 AM UTC

Hi Jano Moller, 
 
Greetings from Syncfusion. 
 
We have checked the reported problem in our side. But we were unable to get exact problem from that. We suspect that when zoom out the map the added markers are far away and GeoCoordinates not updated properly. But it’s working fine in our side. Please find the tested sample below. 
 
 
We have checked with the below configuration   
Syncfusion Version: 19.1.0.54 
Xamarin Forms Version: 4.7 and 4.8  
iOS version: 14.2  
   
So, could you please check the issue with the attached sample and let us know whether it is reproduced or not?     
   
Can you please provide the detailed information on the reported query since we were unaware of your exact use case of your requirement?  
   
·       Can you please share the issue reproducing video?  
·       If the issue is not reproduced in the above sample, please revert us by modifying the sample based on your application along with the replication procedure.  
·       Can you provide the overall page structure used in your project?  
·       Can you share the Xamarin.Forms, Syncfusion versions and also device configuration details?  
 
Regards, 
Ramya S 


Marked as answer

JA Jano April 8, 2021 08:27 AM UTC

Dear Ramya S,

It seems when I upgraded my license to Syncfusion Version: 19.1.0.54 , the problem was resolved.

Thank you for your response and sample project, I really appreciate it

Regards,
Jano


SS Sridevi Sivakumar Syncfusion Team April 9, 2021 06:24 AM UTC

Hi Jano Moller,

Thanks for your update.

Let us know if you need any further assistance.

Regards,
Sridevi S. 


Loader.
Up arrow icon