WMTS and ArcGIS Viewer 3.0 Prerelease for Flex

3569
4
04-12-2012 01:53 AM
LaurensKusse
New Contributor
I downloaded the compiled prerelease of the ArcGIS Viewer 3.0.
I tried to use a wmts service as a basemap, but I could get it to work.

No matter what I tried, the site returned this error:
"BRT layer failed to load: Fault code: Channel.Security.Error Fault info: Security error accessing url Fault details: Destination: DefaultHTTP"

Would anyone over here like to take a look a this and help me out?

This is a link to one tile of the wmts:
http://geodata.nationaalgeoregister.nl/tiles/service/wmts?VERSION=1.0.0&REQUEST=GetTile&LAYER=brtach...

And here you can find the capabilities:
http://geodata.nationaalgeoregister.nl/tiles/service/wmts?REQUEST=getcapabilities&VERSION=1.0.0

I tried this tag (and numerous variations) in the config.xml under <basemaps> :

<layer label="BRT" type="wmts" visible="true"  icon="assets/images/basemap_topographic.jpg" servicemode="KVP" layerid="brtachtergrondkaart" imageformat="png8"
url="http://geodata.nationaalgeoregister.nl/tiles/service/wmts?VERSION=1.0.0&REQUEST=GetTile&TileMatrixSet=EPSG:28992" />


Thank you for any help.
Tags (2)
0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Emeritus
Laurens,

   The issue is likely that the server does have a crossdomain.xml but it only has "allow-http-request-headers-from" and does not have an entry for "allow-access-from".

Here is the important part from the documentation on WMST layer:

[h=3]Attributes specific to WMTSUnlike  the WMS type, there is no skipgetcababilities attribute. Since this is  the case, if the WMTS service does not have a crosdomain file associated  with it, you will need to provide a proxy page URL. An example is  provided below.



  • servicemode???Optional, this specifies the WMTS service mode as either "KVP" or "RESTful"

  • layerid???Optional, this is the layer you specifically want displayed

Snippet showing how to add WMTS layer, make sure that the proxy is referenced in the <httpproxy> tag



<map wraparound180="true" top="40">     <basemaps>         <layer label="WMTSLayer" type="wmts" visible="true" useproxy="true" imageformat="gif"            url="http://v2.suite.opengeo.org/geoserver/gwc/service/wmts"             servicemode="KVP" layerid="world"/>      </basemaps> </map>




Don't forget to click the Mark as answer check on this post and to click the top arrow (promote) as shown below:
0 Kudos
LaurensKusse
New Contributor
Thank you for your quick reply.
I will contact the provider of the WMTS service for the crossdomain-file. And I will try to figure out if I can make it work with a proxy page URL.

Thank you!
0 Kudos
FabianoScardua
New Contributor II
Someone managed to use the service WMTS? I've tried with and without proxy unsuccessfully using the following settings in config.xml.


<layer label="WMTSLayer"   
type="wmts" visible="true" useproxy="true"
imageformat="PNG"         
url="http://v2.suite.opengeo.org/geoserver/gwc/service/wmts"
servicemode="KVP"
layerid="world"/>
0 Kudos
LaurensKusse
New Contributor
Someone explained me an easy way to make this work!

Step 1: go to http://v2.suite.opengeo.org/geoserver/gwc/service/wmts?SERVICE=WMTS&REQUEST=GetCapabilities&VERSION=... and save the file as a xml file, let's say: opengeo.xml
Step 2: place the opengeo.xml in your website. In my case I just saved it in the same folder where my config.xml is.
Step 3: add this to your config.xml:
<layer label="OpenGeo" type="wmts" visible="true" servicemode="KVP" layerid="world" imageformat="png8" url="opengeo.xml" />

Someone managed to use the service WMTS? I've tried with and without proxy unsuccessfully using the following settings in config.xml.


<layer label="WMTSLayer"   
type="wmts" visible="true" useproxy="true"
imageformat="PNG"         
url="http://v2.suite.opengeo.org/geoserver/gwc/service/wmts"
servicemode="KVP"
layerid="world"/>
0 Kudos