Hi Ethan,
The problem occurs in our projects because the scales are redefined.
The following code creates the problem:
private void Map1_Loaded(object sender, RoutedEventArgs e)
{
try
{
Map1.MapUnit = GeographyUnit.Meter;
var g = new LayerOverlay();
var layer = new GoogleMapsLayer();
layer.SendingWebRequest += Layer_SendingWebRequest;
g.Layers.Add(layer);
Map1.Overlays.Add(g);
**OutilsOvLyr.CustomScaleZoomLevel(Map1.ZoomLevelSet);**
Map1.CurrentExtent = new RectangleShape(-2000000, 2000000, 2000000, -2000000);
Map1.Refresh();
}
catch (Exception ex)
{
_logger.Info(ex.Message);
_logger.Info(ex.StackTrace);
_logger.Info(ex.InnerException);
}
}
/// <summary>
/// Paramètre la valeur de l'échelle pour chacun des zooms
/// </summary>
/// <param name="zoomLv"></param>
internal static void CustomScaleZoomLevel(ZoomLevelSet zoomLv)
{
zoomLv.ZoomLevel01.Scale = Math.Round(4613998.359375, 10);
zoomLv.ZoomLevel02.Scale = Math.Round(zoomLv.ZoomLevel01.Scale / 2, 10);
zoomLv.ZoomLevel03.Scale = Math.Round(zoomLv.ZoomLevel02.Scale / 2, 10);
zoomLv.ZoomLevel04.Scale = Math.Round(zoomLv.ZoomLevel03.Scale / 2, 10);
zoomLv.ZoomLevel05.Scale = Math.Round(zoomLv.ZoomLevel04.Scale / 2, 10);
zoomLv.ZoomLevel06.Scale = Math.Round(zoomLv.ZoomLevel05.Scale / 2, 10);
zoomLv.ZoomLevel07.Scale = Math.Round(zoomLv.ZoomLevel06.Scale / 2, 10);
zoomLv.ZoomLevel08.Scale = Math.Round(zoomLv.ZoomLevel07.Scale / 2, 10);
zoomLv.ZoomLevel09.Scale = Math.Round(zoomLv.ZoomLevel08.Scale / 2, 10);
zoomLv.ZoomLevel10.Scale = Math.Round(zoomLv.ZoomLevel09.Scale / 2, 10);
zoomLv.ZoomLevel11.Scale = Math.Round(zoomLv.ZoomLevel10.Scale / 2, 10);
zoomLv.ZoomLevel12.Scale = Math.Round(zoomLv.ZoomLevel11.Scale / 2, 10);
zoomLv.ZoomLevel13.Scale = Math.Round(zoomLv.ZoomLevel12.Scale / 2, 10);
zoomLv.ZoomLevel14.Scale = Math.Round(zoomLv.ZoomLevel13.Scale / 2, 10);
zoomLv.ZoomLevel15.Scale = Math.Round(zoomLv.ZoomLevel14.Scale / 2, 10);
zoomLv.ZoomLevel16.Scale = Math.Round(zoomLv.ZoomLevel15.Scale / 2, 10);
zoomLv.ZoomLevel17.Scale = Math.Round(zoomLv.ZoomLevel16.Scale / 2, 10);
zoomLv.ZoomLevel18.Scale = Math.Round(zoomLv.ZoomLevel17.Scale / 2, 10);
zoomLv.ZoomLevel19.Scale = Math.Round(zoomLv.ZoomLevel18.Scale / 2, 10);
zoomLv.ZoomLevel20.Scale = Math.Round(zoomLv.ZoomLevel19.Scale / 2, 10);
}
Thanks.
Regards.
Steph.