Hey,
I’m having some issues showing map from WMTS service. I managed to get WmtsLayer to partially work but WmtsTiledOverlay… not at all.
I’m using ThinkGeo.Core 13.0.0-beta249 with ThinkGeo.UI.WPF 13.0.0-beta289.
Please see code below:
XAML:
<wpf:MapView x:Name="Map" Loaded="Map_OnLoaded" ></wpf:MapView>
C#
private void Map_OnLoaded(object sender, RoutedEventArgs e) { Map.MapUnit = GeographyUnit.Meter; var wmtsLayer = new WmtsLayer { DrawingExceptionMode = DrawingExceptionMode.DrawException, WmtsSeverEncodingType = WmtsSeverEncodingType.Kvp }; wmtsLayer.ServerUris.Add(new Uri("http://www.openbasiskaart.nl/mapcache/wmts")); wmtsLayer.ActiveLayerName = "osm-epsg3857"; wmtsLayer.ActiveStyleName = "default"; wmtsLayer.TileMatrixSetName = "epsg3857"; wmtsLayer.OutputFormat = "image/png"; var layerOverlay = new LayerOverlay(); layerOverlay.Layers.Add(wmtsLayer); Map.Overlays.Add(layerOverlay); Map.Refresh(); /* var wmtsOverlay = new WmtsTiledOverlay { DrawingExceptionMode = DrawingExceptionMode.DrawException, WmtsServerEncodingType = WmtsSeverEncodingType.Kvp }; wmtsOverlay.ServerUris.Add(new Uri("http://www.openbasiskaart.nl/mapcache/wmts")); wmtsOverlay.Parameters.Add("LAYER", "osm-epsg3857"); wmtsOverlay.Parameters.Add("STYLE", "default"); wmtsOverlay.Parameters.Add("TILEMATRIXSET", "epsg3857"); wmtsOverlay.Parameters.Add("FORMAT", "image/png"); wmtsOverlay.InitializeConnection(); Map.Overlays.Add(wmtsOverlay); Map.Refresh(); */ }
Using code that is commented out, the WmtsTiledOverlay approach, I can’t get anything visible on the map. Using the WmtsLayer I do have a map but it’s missing some tiles… or something ? Also, when zooming in existing tiles disappear and new ones are not loaded.
Here’s a screenshot running above code.
And here, for reference, is screenshot using same service/layer/style via QGIS.
Thanks.