<esri:WMTSLayer id="wMTSLayer" url="http://www.simal.ryerson.ca:8080/geoserver/WoodStock/wmts" serviceMode="KVP" layerId="0" imageFormat="png"> </esri:WMTSLayer>
public function initialize() { var wmtsLayer:WMTSLayer = new WMTSLayer("http://www.simal.ryerson.ca:8080/geoserver/WoodStock/wmts"); wmtsLayer.alpha = 1; wmtsLayer.visible = true; mainMap.addLayer(wmtsLayer,2); } <esri:Map id="mainMap" />
Solved! Go to Solution.
<!--
@@includeFiles com/esri/ags/samples/WMTSLayer.as - not a namespace! what is it?
This sample shows how to add a Web Map Tile Service(WMTS) as a custom layer.
The ArcGIS API for Flex allows for extending the API
to access layer types not included as part of the API.
In this example, tiled layers (TiledMapServiceLayer) is extended to access WMTS tiles.
Steps involved:
1. Creating new ActionScript class(WMTSLayer.as) that extends TiledMapServiceLayer.
2. Hardcoding some of the configuration settings:
fullExtent, initialExtent, spatialReference, tileInfo, and units.
3. Overriding the protected function getTileURL() to obtain the appropriate
tiles and place them accurately on the map.
4. Using the extended class with MXML or ActionScript 🙂
-->
I searched through out the web and help files, no actual working sample using WMTSLayer ...
Chenfeng,
WMTS sample - ArcGIS API for FLEX 3.0 beta
the same as
WMTS sample - ArcGIS API for FLEX 2.5
<!--
@@includeFiles com/esri/ags/samples/WMTSLayer.as - not a namespace! what is it?
This sample shows how to add a Web Map Tile Service(WMTS) as a custom layer.
The ArcGIS API for Flex allows for extending the API
to access layer types not included as part of the API.
In this example, tiled layers (TiledMapServiceLayer) is extended to access WMTS tiles.
Steps involved:
1. Creating new ActionScript class(WMTSLayer.as) that extends TiledMapServiceLayer.
2. Hardcoding some of the configuration settings:
fullExtent, initialExtent, spatialReference, tileInfo, and units.
3. Overriding the protected function getTileURL() to obtain the appropriate
tiles and place them accurately on the map.
4. Using the extended class with MXML or ActionScript 🙂
-->