ThinkGeo.com    |     Documentation    |     Premium Support

Changed behaviour of online maps

Hi,

It seems that something has changed with online maps (atleast OGC/WFS layers). Earlier with 14.3.1 when layer styles were configured e.g from ZoomLevel13->ZoomLevel20 layer sent request to server only on those zoom levels. But now with 14.4.4 layer is sending request on all layers including ZoomlLevel1-ZoomLevel12. This causes unnecessary network traffic and costs (when using paid service).

Issue can be seen e.g with this example:

public partial class MainWindow : Window
{

 public MainWindow() { }
 public MapView Map { set; get; }

 private async void mapView_Loaded(object sender, RoutedEventArgs e)
 {

     Map = sender as MapView;
     Map.MapUnit = GeographyUnit.Meter;

     var ignLayer = new OgcApiFeatureLayer("https://api-features.ign.es", "namedplace")
     {
         FeatureSource = { ProjectionConverter = new ProjectionConverter(4326, 3857) },
     };

     ignLayer.SendingWebRequest += LayerOnSendingWebRequest;

     // Create a new text style and set various settings to make it look good.
     var ignNamedPlacesTextStyle = new TextStyle("etiqueta", new GeoFont("Arial", 14),GeoBrushes.DarkRed)
     {
         MaskType = MaskType.RoundedCorners,
         OverlappingRule = LabelOverlappingRule.NoOverlapping,
         Mask = new AreaStyle(GeoBrushes.WhiteSmoke),
         SuppressPartialLabels = true,
         YOffsetInPixel = -12
     };

     ignLayer.ZoomLevelSet.ZoomLevel13.DefaultPointStyle = PointStyle.CreateSimplePointStyle(PointSymbolType.Circle, GeoColors.DarkRed, 10);
     ignLayer.ZoomLevelSet.ZoomLevel13.DefaultTextStyle = ignNamedPlacesTextStyle;
     ignLayer.ZoomLevelSet.ZoomLevel13.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
     var overlay = new LayerOverlay();
     overlay.Layers.Add(ignLayer);

     Map.CenterPoint = new PointShape(235690, 5057360);
     Map.CurrentScale = 36200;
     Map.Overlays.Add("LayerOverlay", overlay);
     await Map.RefreshAsync();
 }

 private void LayerOnSendingWebRequest(object sender, SendingWebRequestEventArgs e)
 {
     Console.WriteLine("ZoomLevel: " + this.Map.CurrentZoom + " OGC layer sending request: " + e.WebRequest.RequestUri);
 }

}

When zooming out the map with 14.4.4 layer sends request on all levels but with 14.3.1 it does not send requests on levels above 12.

Is there something which needs to be done differently with 14.4.4 to avoid these unnecessary queries ?

Br, Simo

Hi Simon,

This issue was recreated and fixed in ThinkGeo.UI.WinForms 14.5.0-beta096, and will be fixed in the 14.4.5 hotfix.

Thanks
Ben

Hi,

Thanks, was it so that 14.4.5 will be release on next week ?

Bt. Simo

Time Flies! yep, it will be next week.

1 Like

Hi,

Just realized that you mentioned that this is fixed in “ThinkGeo.UI.WinForms 14.5.0-beta096”.

To be sure that we get correction since we are using WPF is this fixed on there as well ?

Br, Simo

yes, it was fixed in ThinkGeo.UI.Wpf as well.