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