<layer label="TianDiTuWMTSMap" type="wmts" visible="true" alpha="1.0" style="default" servicemode="KVP" layerId="vec" tilematrixsetid="w" url="http://t0.tianditu.com/vec_w/wmts" /> <layer label="TianDiTuAnnotation" type="wmts" visible="true" alpha="1.0" style="default" servicemode="KVP" layerId="cva" tilematrixsetid="w" url="http://t0.tianditu.com/cva_w/wmts"/>
<?xml version="1.0"?> <configuration> <!-- possible values for initialstate: open or closed (default) --> <initialstate>closed</initialstate> <!-- by default it will use the same basemap as current main map, you can hardcode as below if you wish --> <layer type="wmts" mode="static" visible="true" url="http://t0.tianditu.com/vec_w/wmts"/> </configuration>
public function set configXML(value:XML):void { .............................................. case "osm": { var osmLayer:OpenStreetMapLayer = new OpenStreetMapLayer(); osmLayer.alpha = alpha; osmLayer.id = label; osmLayer.name = label; osmLayer.visible = visible; layerToAdd = osmLayer; break; } // added by Prac 20130809 To display WMTS map in OverviewMapWidget case "wmts": { var wmtsLayer:WMTSLayer =new WMTSLayer(); wmtsLayer.alpha = alpha; wmtsLayer.id = label; wmtsLayer.name = label; wmtsLayer.visible = visible; layerToAdd =wmtsLayer; break; } // added by Prac 20130809 To display WMTS map in OverviewMapWidget if (layerToAdd) { overviewMap.addLayer(layerToAdd); basemapLayerObjectToLayer[basemapLayerObject] = layerToAdd; } }
Solved! Go to Solution.
// added by Prac 20130809 To display WMTS map in OverviewMapWidget case "wmts": { var wmtsLayer:WMTSLayer =new WMTSLayer(urlBaseMap); wmtsLayer.alpha = alpha; wmtsLayer.alpha = alpha; wmtsLayer.id = label; wmtsLayer.name = label; wmtsLayer.visible = visible; if (proxyUrl && useProxy) { wmtsLayer.proxyURL = proxyUrl; } wmtsLayer.serviceMode = basemapLayerObject.serviceMode; layerToAdd =wmtsLayer; break; } // added by Prac 20130809 To display WMTS map in OverviewMapWidget
// added by Prac 20130809 To display WMTS map in OverviewMapWidget case "wmts": { var wmtsLayer:WMTSLayer =new WMTSLayer(urlBaseMap); wmtsLayer.alpha = alpha; wmtsLayer.alpha = alpha; wmtsLayer.id = label; wmtsLayer.name = label; wmtsLayer.visible = visible; if (proxyUrl && useProxy) { wmtsLayer.proxyURL = proxyUrl; } wmtsLayer.serviceMode = basemapLayerObject.serviceMode; layerToAdd =wmtsLayer; break; } // added by Prac 20130809 To display WMTS map in OverviewMapWidget
Prac,
This might get you going:// added by Prac 20130809 To display WMTS map in OverviewMapWidget case "wmts": { var wmtsLayer:WMTSLayer =new WMTSLayer(urlBaseMap); wmtsLayer.alpha = alpha; wmtsLayer.alpha = alpha; wmtsLayer.id = label; wmtsLayer.name = label; wmtsLayer.visible = visible; if (proxyUrl && useProxy) { wmtsLayer.proxyURL = proxyUrl; } wmtsLayer.serviceMode = basemapLayerObject.serviceMode; layerToAdd =wmtsLayer; break; } // added by Prac 20130809 To display WMTS map in OverviewMapWidget
Don't forget to click the Mark as answer check on this post and to click the top arrow (promote).
Follow these steps as shown in the below graphic:
Prac,
This might get you going:// added by Prac 20130809 To display WMTS map in OverviewMapWidget case "wmts": { var wmtsLayer:WMTSLayer =new WMTSLayer(urlBaseMap); wmtsLayer.alpha = alpha; wmtsLayer.alpha = alpha; wmtsLayer.id = label; wmtsLayer.name = label; wmtsLayer.visible = visible; if (proxyUrl && useProxy) { wmtsLayer.proxyURL = proxyUrl; } wmtsLayer.serviceMode = basemapLayerObject.serviceMode; layerToAdd =wmtsLayer; break; } // added by Prac 20130809 To display WMTS map in OverviewMapWidget
Don't forget to click the Mark as answer check on this post and to click the top arrow (promote).
Follow these steps as shown in the below graphic: