Hi,
I have a scenario to load WMTS service in Web Edition. Can we achieve it. If it possible, please suggest me how can we do it.
Thanks,
Riyaz
Hi,
I have a scenario to load WMTS service in Web Edition. Can we achieve it. If it possible, please suggest me how can we do it.
Thanks,
Riyaz
Hi Riyaz,
We have a layer named WmtsLayer.
http://wiki.thinkgeo.com/wiki/api/thinkgeo.mapsuite.layers.wmtslayer
You can refer the sample, which also works for web edition.
Regards,
Ethan
Hi Ethan,
Thanks for your reply.
I have tried the following code, and it looks its creating and adding WMTS layer, but i am not able to see it on map. I am getting some object reference error.
WmtsLayer wmtsLayer = new WmtsLayer();
wmtsLayer.DrawingExceptionMode = DrawingExceptionMode.DrawException;
wmtsLayer.WmtsSeverEncodingType = ThinkGeo.MapSuite.Layers.WmtsSeverEncodingType.Restful;
wmtsLayer.ServerUris.Add(new Uri(“https://services.arcgis.com/V6ZHFr6zdgNZuVG0/ArcGIS/rest/services/AdvancedSymbology_Point/MapServer/1”));
wmtsLayer.ActiveLayerName = “PointSymbol”;
wmtsLayer.ActiveStyleName = “default”;
wmtsLayer.TileMatrixSetName = “GoogleMapsCompatible”;
wmtsLayer.OutputFormat = “image/png”;
LayerOverlay layerOverlay = new LayerOverlay(“wmtsOverlay”);
layerOverlay.Layers.Add(“wmtsLayer”, wmtsLayer);
Map1.CustomOverlays.Add(layerOverlay);
and out put is follows
please look at the issue and give me solution or some other sample …
Thanks,
Riyaz
Hi Riyaz,
The link you passed in should be:
https://services.arcgis.com/V6ZHFr6zdgNZuVG0/ArcGIS/rest/services/AdvancedSymbology_Point/MapServer/WMTS/
But even you use the correct one, this layer still don’t works because the server capability looks invalid: https://services.arcgis.com/V6ZHFr6zdgNZuVG0/ArcGIS/rest/services/AdvancedSymbology_Point/MapServer/WMTS/1.0.0/WMTSCapabilities.xml
It don’t contains layer information and other important information.
And I view its server sample after that: https://services.arcgis.com/V6ZHFr6zdgNZuVG0/ArcGIS/rest/services/AdvancedSymbology_Point/MapServer?view=wmtsview
It looks the default view map don’t works.
So I think this server don’t follow the standard or maybe it’s broken. Could you please double check it?
Regards,
Ethan
Hi Ethan,
Thanks for your reply, Could please share exact code for adding wms service to a map.
Thanks,
Riyaz
Hi Riyaz,
I means your server setting should have some problem, just like I mentioned, the capability should be incomplete, so I cannot make it works.
I hadn’t modify your code in the sample, just replace the url to https://services.arcgis.com/V6ZHFr6zdgNZuVG0/ArcGIS/rest/services/AdvancedSymbology_Point/MapServer/WMTS/
But it still don’t works.
Regards,
Ethan
Hi Ethan,
I tried to load wmts service layer, but could n’t.
I am sharing my sample application, Could you please check and correct to achieve it.
Is there any projection making issue on it.
Please share exact code for achieve this.
Sample.zip (6.5 KB)
Note : Visual Studio 2017 (4.6.1) and Thinkgeo Web Forms 11.3.0.0
Thanks,
Riyaz
Hi Riyaz,
The code as below works:
Map1.MapUnit = GeographyUnit.Meter;
WmtsLayer wmtsLayer = new WmtsLayer();
wmtsLayer.DrawingExceptionMode = DrawingExceptionMode.DrawException;
wmtsLayer.WmtsSeverEncodingType = ThinkGeo.MapSuite.Layers.WmtsSeverEncodingType.Restful;
wmtsLayer.ServerUris.Add(new Uri("https://services.arcgisonline.com/arcgis/rest/services/Demographics/USA_Population_Density/MapServer/WMTS/"));
wmtsLayer.ActiveLayerName = "Demographics_USA_Population_Density";
wmtsLayer.ActiveStyleName = "default";
wmtsLayer.TileMatrixSetName = "default028mm";
wmtsLayer.OutputFormat = "image/png";
LayerOverlay layerOverlay = new LayerOverlay("wmtsOverlay");
layerOverlay.Layers.Add("wmtsLayer", wmtsLayer);
Map1.CustomOverlays.Add(layerOverlay);
Map1.CurrentExtent = new RectangleShape(-19840230.3899, 11536810.662600003, -7452840.4651999995, 2144435.3407000005);
Regards,
Ethan
Hi Ethan,
Thanks, work out.
Regards,
Riyaz
Hi Riyaz,
Any question please let us know.
Regards,
Ethan
Hi Ethan,
I am getting ‘Object reference’ issue again with another ‘WMTS’.
Scenario:
we have wmts service url to display on the map. it’s opening on ‘Openlayers’, where as it’s not coming in Thinkgeo web forms using ‘WmtsLayer’.
Code:
WmtsLayer wmtsLayer = new WmtsLayer();
wmtsLayer.DrawingExceptionMode = DrawingExceptionMode.DrawException;
wmtsLayer.WmtsSeverEncodingType = ThinkGeo.MapSuite.Layers.WmtsSeverEncodingType.Restful;
wmtsLayer.ServerUris.Add(new Uri(“wmts url”));//…/wmts/
wmtsLayer.Credentials = new NetworkCredential(“username”, “password”);
wmtsLayer.ActiveLayerName = “LayerName”;
wmtsLayer.ActiveStyleName = “StyleName”;
wmtsLayer.TileMatrixSetName = “GoogleMapsCompatible”;
wmtsLayer.OutputFormat = “image/png”;
LayerOverlay WMTSlayerOverlay = new LayerOverlay(“WMTSOverlay”);
WMTSlayerOverlay.Layers.Add(“WMTSLayer”, wmtsLayer);
Map1.CustomOverlays.Add(WMTSlayerOverlay);
screen shot:
In open layers, tileGrid property using to set WMTS layer. But same property not available in our Thinkgeo web forms. Is tileGrid property missing to load this wmts or anything missing.
Please suggest me some solution to resolve this issue.
Note : We can’t share our ‘wmts’ url for some reason.
Thanks,
Riyaz
Hi Riyaz,
If the url cannot be shared, you can do something follow the steps as below:
Wish that’s helpful.
Regards,
Ethan