Hello
I want to add a local Wmtslayer to my project use this code,and got error message,Program crashes. But the same service is normal in arcgis map. I don’t know what the problem is.
this is server xml Server Wmts.xml (11.1 KB)
map.MapUnit = GeographyUnit.Meter;
// map.CurrentExtent = new RectangleShape(1254901.87822449, 6785639.16296541, 1734313.72055747, 6441979.14333386);
// map.CurrentExtent = new RectangleShape(-80, 60, 80, -60);
ThinkGeo.MapSuite.Layers.WmtsLayer wmtsLayer = new ThinkGeo.MapSuite.Layers.WmtsLayer();
wmtsLayer.DrawingExceptionMode = DrawingExceptionMode.DrawException;
wmtsLayer.WmtsSeverEncodingType = ThinkGeo.MapSuite.Layers.WmtsSeverEncodingType.Kvp;
wmtsLayer.ServerUris.Add(new Uri("http://localhost:9009/arctiler/ogc/services/GoogleEarthSatelliteMap/WMTS?"));
wmtsLayer.ActiveLayerName = "GoogleEarthSatelliteMap";
wmtsLayer.ActiveStyleName = "default";
wmtsLayer.TileMatrixSetName = "AZMap_GoogleEarthSatelliteMap";
wmtsLayer.OutputFormat = "image/jpg";
wmtsLayer.SendingWebRequest += WmtsLayer_SendingWebRequest;
wmtsLayer.Open();
LayerOverlay layerOverlay = new LayerOverlay();
layerOverlay.Layers.Add(wmtsLayer);
map.Overlays.Add(layerOverlay);
map.CurrentExtent = layerOverlay.GetBoundingBox();
map.Refresh();
private void WmtsLayer_SendingWebRequest(object sender, SendingWebRequestEventArgs e)
{
System.Diagnostics.Debug.WriteLine(e.WebRequest.RequestUri.ToString());
}
show log:
http://localhost:9009/arctiler/ogc/services/GoogleEarthSatelliteMap/WMTS??service=WMTS&request=GetTile&version=1.0.0&layer=GoogleEarthSatelliteMap&style=default&format=image/jpg&TileMatrixSet=AZMap_GoogleEarthSatelliteMap&TileMatrix=AZMap_GoogleEarthSatelliteMap:0&TileRow=3&TileCol=11
http://localhost:9009/arctiler/ogc/services/GoogleEarthSatelliteMap/WMTS??service=WMTS&request=GetTile&version=1.0.0&layer=GoogleEarthSatelliteMap&style=default&format=image/jpg&TileMatrixSet=AZMap_GoogleEarthSatelliteMap&TileMatrix=AZMap_GoogleEarthSatelliteMap:0&TileRow=4&TileCol=15
http://localhost:9009/arctiler/ogc/services/GoogleEarthSatelliteMap/WMTS??service=WMTS&request=GetTile&version=1.0.0&layer=GoogleEarthSatelliteMap&style=default&format=image/jpg&TileMatrixSet=AZMap_GoogleEarthSatelliteMap&TileMatrix=AZMap_GoogleEarthSatelliteMap:0&TileRow=4&TileCol=11
http://localhost:9009/arctiler/ogc/services/GoogleEarthSatelliteMap/WMTS??service=WMTS&request=GetTile&version=1.0.0&layer=GoogleEarthSatelliteMap&style=default&format=image/jpg&TileMatrixSet=AZMap_GoogleEarthSatelliteMap&TileMatrix=AZMap_GoogleEarthSatelliteMap:0&TileRow=3&TileCol=12
http://localhost:9009/arctiler/ogc/services/GoogleEarthSatelliteMap/WMTS??service=WMTS&request=GetTile&version=1.0.0&layer=GoogleEarthSatelliteMap&style=default&format=image/jpg&TileMatrixSet=AZMap_GoogleEarthSatelliteMap&TileMatrix=AZMap_GoogleEarthSatelliteMap:0&TileRow=3&TileCol=13
http://localhost:9009/arctiler/ogc/services/GoogleEarthSatelliteMap/WMTS??service=WMTS&request=GetTile&version=1.0.0&layer=GoogleEarthSatelliteMap&style=default&format=image/jpg&TileMatrixSet=AZMap_GoogleEarthSatelliteMap&TileMatrix=AZMap_GoogleEarthSatelliteMap:0&TileRow=4&TileCol=12
http://localhost:9009/arctiler/ogc/services/GoogleEarthSatelliteMap/WMTS??service=WMTS&request=GetTile&version=1.0.0&layer=GoogleEarthSatelliteMap&style=default&format=image/jpg&TileMatrixSet=AZMap_GoogleEarthSatelliteMap&TileMatrix=AZMap_GoogleEarthSatelliteMap:0&TileRow=3&TileCol=14
http://localhost:9009/arctiler/ogc/services/GoogleEarthSatelliteMap/WMTS??service=WMTS&request=GetTile&version=1.0.0&layer=GoogleEarthSatelliteMap&style=default&format=image/jpg&TileMatrixSet=AZMap_GoogleEarthSatelliteMap&TileMatrix=AZMap_GoogleEarthSatelliteMap:0&TileRow=4&TileCol=13
http://localhost:9009/arctiler/ogc/services/GoogleEarthSatelliteMap/WMTS??service=WMTS&request=GetTile&version=1.0.0&layer=GoogleEarthSatelliteMap&style=default&format=image/jpg&TileMatrixSet=AZMap_GoogleEarthSatelliteMap&TileMatrix=AZMap_GoogleEarthSatelliteMap:0&TileRow=4&TileCol=1