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,