Select to view content in your preferred language

I'm doubting that the "WMTSLayer" in current API 3.0F is not a working version.

1012
8
06-19-2012 02:08 PM
ChenfengXiong
Emerging Contributor
The example of WMTS online is totally not working.

I tried it in may config myself using a Geoserver service which is surly correctly configured. The service is proofed by a cutomized WMTS class exteneded from TiledMapServiceLayer.

NO NOT ANY map shows up and NO NOT ANY error pops up.

Are the developers seriously sure that the "WNTSLayer" in the API is a working version? I doubt it.
Tags (2)
0 Kudos
8 Replies
SarthakDatt
Frequent Contributor
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.

For more info: http://resources.arcgis.com/en/help/flex-api/concepts/index.html#/Using_crossdomain_xml/017p0000001w...

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>
0 Kudos
ChenfengXiong
Emerging Contributor
Hey,

The online sample is not working as the service/server does not have a cross domain. We will be updating the sample shortly.

Thanks a lot for your reply, the example page is better than mine because there still some error message pops up. But in my case I don't have any, really hopeless.

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.

I'm sure the proxy and crossdomain settings are not the problem because other part of my program is using a BlazeDS service on the same server.

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>


I tried this, it works, but in the same way tried mine, I got nothing, no map, no errror, only blank. This is my code, could you help me?
<esri:WMTSLayer layerId="WoodStock:Woodstock_Rooftop_Area_p102100"
      imageFormat="image/png"
      url="http://www.simal.ryerson.ca:8080/geoserver/gwc/service/wmts"/>

Any help many Thanks!
0 Kudos
SarthakDatt
Frequent Contributor
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>
0 Kudos
ChenfengXiong
Emerging Contributor
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>


Thanks for help! This seems to work but there are many layers in that server, what I want is the layer "WoodStock:Woodstock_Rooftop_Area_p102100".
I tried following code but shows nothing.
 
<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>

Could you help me? Thanks!

By the way, could you also kindly tell me how to check the capability of "serviceMode"? Thanks!
0 Kudos
BjornSvensson
Esri Regular Contributor
This seems to work but there are many layers in that server, what I want is the layer "WoodStock:Woodstock_Rooftop_Area_p102100".


The WMTS standard, http://www.opengeospatial.org/standards/wmts, does not support specifying which layers are on or off.  You can "just" ask for the pre-created tiles:
"The WMTS serves a single tile of a single layer of a map. Unlike WMS, there is no specified way to request a server to combine and return a map tile with information coming from more than one layer in a single fetching process."
0 Kudos
SarthakDatt
Frequent Contributor
Could you check the response of the request made by the application. You can use firebug or HttpFox or Fiddler for that.

For the serviceMode options, look at the capabilities file(e.g. this service allows both 'RESTful' and 'KVP'):

<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>

0 Kudos
ChenfengXiong
Emerging Contributor
Could you check the response of the request made by the application. You can use firebug or HttpFox or Fiddler for that.


Thanks for your help!

I installed Firebug and then opened the network monitor. It is totally blank under the "Response" tab, but it shows the size of response body is 15.8KB.
The full request URL is "http://www.simal.ryerson.ca:8080/geoserver/gwc/service/wmts?VERSION=1%2E0%2E0&REQUEST=GetCapabilitie...".

I don't understand. Could you help me?

Thanks a lot!
0 Kudos
BjornSvensson
Esri Regular Contributor
FYI - the online WMTS sample have been updated to point to a service (with a crossdomain.xml file) and is now working.
http://resources.arcgis.com/en/help/flex-api/samples/index.html#/WMTS_Map/01nq0000007n000000/
0 Kudos