<esri:Map wrapAround180="true"> <esri:WMTSLayer url="http://sampleserver6.arcgisonline.com/arcgis/rest/services/WorldTimeZones/MapServer/WMTS"/> </esri:Map>
Hey,
The online sample is not working as the service/server does not have a cross domain. We will be updating the sample shortly.
I just tried the WMTS Layer sample at my end(locally) and it works fine. In your case you can make sure that either the server has crossdomain or use a proxy.
Meanwhile you can try this service to see the WMTS Layer working:<esri:Map wrapAround180="true"> <esri:WMTSLayer url="http://sampleserver6.arcgisonline.com/arcgis/rest/services/WorldTimeZones/MapServer/WMTS"/> </esri:Map>
<esri:WMTSLayer layerId="WoodStock:Woodstock_Rooftop_Area_p102100" imageFormat="image/png" url="http://www.simal.ryerson.ca:8080/geoserver/gwc/service/wmts"/>
<esri:Map wrapAround180="true"> <esri:WMTSLayer serviceMode="KVP" url="http://www.simal.ryerson.ca:8080/geoserver/gwc/service/wmts"/> </esri:Map>
I looked at the capabilities for your WMTS service and the only 'serviceMode' supported is 'KVP'. The WMTSLayer in the api has serviceMode='RESTful' by default. Try this and see if this works for you:<esri:Map wrapAround180="true"> <esri:WMTSLayer serviceMode="KVP" url="http://www.simal.ryerson.ca:8080/geoserver/gwc/service/wmts"/> </esri:Map>
<esri:Extent id="initialExtent" xmin="-8993600.611232104" ymin="5326485.750111546" xmax="-8978532.338246891" ymax="5338509.806034781"> <esri:SpatialReference wkid="900913"/> </esri:Extent> <esri:Map wrapAround180="true"> <esri:WMTSLayer serviceMode="KVP" layerId="WoodStock:Woodstock_Rooftop_Area_p102100" url="http://www.simal.ryerson.ca:8080/geoserver/gwc/service/wmts" initialExtent="{initialExtent}"/> </esri:Map>
This seems to work but there are many layers in that server, what I want is the layer "WoodStock:Woodstock_Rooftop_Area_p102100".
<ows:Operation name="GetCapabilities"> <ows:DCP> <ows:HTTP> <ows:Get xlink:href="http://sampleserver6.arcgisonline.com/arcgis/rest/services/WorldTimeZones/MapServer/WMTS/1.0.0/WMTSCapabilities.xml"> <ows:Constraint name="GetEncoding"> <ows:AllowedValues> <ows:Value>RESTful</ows:Value> </ows:AllowedValues> </ows:Constraint> </ows:Get> <ows:Get xlink:href="http://sampleserver6.arcgisonline.com/arcgis/rest/services/WorldTimeZones/MapServer/WMTS?"> <ows:Constraint name="GetEncoding"> <ows:AllowedValues> <ows:Value>KVP</ows:Value> </ows:AllowedValues> </ows:Constraint> </ows:Get> </ows:HTTP> </ows:DCP> </ows:Operation>
Could you check the response of the request made by the application. You can use firebug or HttpFox or Fiddler for that.