hi there,as the title said, i add two basemap layers instead of addarcgisbasemaps="true" in config.xml
But the result is that they can display in Map view rather than OverViewMapWidget(its blank even without the red box), i read the Post Questions and Answers in forum,and make some mod in OverViewMapWidget.xml as below code:
and in the OverViewMapComponent.mxml there isnot any code about WMTS so i add WMTS item as other type service:
after all these done it still doesnot work out, do you have any suggestion for this, thanks for your help.
Code:
<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"/>
Code:
<?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>
Code:
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;
}
}