Select to view content in your preferred language

Cannot add WMTS service to map

6785
4
Jump to solution
04-18-2014 06:07 AM
DonBarker
Regular Contributor
We have the option to Add Layer from Web > Add WMTS OGC Service.

This is the URL that I add, which fails:

http://choptankriverheritage.org/tileserver/1875bw/wmts

The error message from AGOL:
"The WMTS service, http://choptankriverheritage.org/tileserver/1875bw/wmts, can't be added to the map. It's either not available or you have entered an invalid URL for the type of layer you want to reference."

This describes the WMTS:
http://choptankriverheritage.org/tileserver/1875bw/WMTSCapabilities.xml

This WMTS is generated by Tileserver by Klokantech ( github.com/klokantech/tileserver-php/ ).  It claims to be compliant with OGC Web Map Tile Service (WMTS) Both KVP and RESTful version 1.0.0.

Can anyone help?

Thanks,
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
DonBarker
Regular Contributor
A note for anyone using Klokantech's Tileserver -- You'll need to configure the tileserver.php file from localhost to your domain and the Tileserver folder, like this example:

Change this
"baseUrls" => array("http://localhost/")

to this
"baseUrls" => array("http://choptankriverheritage.org/historic_maps/")

This fixed the error that prevented me from adding the WMTS to my AGOL map here:

https://www.arcgis.com/home/webmap/viewer.html?webmap=1900ca75fa504ab9a831351a54c17dcb

Thanks to Chris for pointing this out.

View solution in original post

0 Kudos
4 Replies
DonBarker
Regular Contributor
I just discovered part of my problem.

I was using the URL for a single WMTS layer.  This is the correct URL for the WMTS server:

http://choptankriverheritage.org/tileserver/wmts

It gets the WMTS capabilities (layer list) correctly and sends layers to my map here:

https://www.arcgis.com/home/webmap/viewer.html?webmap=1900ca75fa504ab9a831351a54c17dcb

It reads the extent correctly, too.  But the layers still are invisible.

Any ideas?


Thanks,
Don
0 Kudos
ChrisWhitmore
Esri Regular Contributor
Hi Don,

For completeness sake, here's the response I sent you over email:

Looks like there�??s an issue with the capabilities xml for the WMTS�?? it has references to localhost:

http://choptankriverheritage.org/tileserver/wmts/1.0.0/WMTSCapabilities.xml

Get xlink:href="http://localhost/wmts?">

Changing localhost to your WTMS server name should resolve the issue.

Thanks

Chris
0 Kudos
DonBarker
Regular Contributor
Chris,

Thanks for looking into this.

At about the same time as your email, I got one from the developer, who noted a bug in their server app that created this localhost reference problem.  (Naming the server folder 'tileserver' -- same as the app name -- causes naming collision).

I'll be working this later today.  Appreciate your help.

Don
0 Kudos
DonBarker
Regular Contributor
A note for anyone using Klokantech's Tileserver -- You'll need to configure the tileserver.php file from localhost to your domain and the Tileserver folder, like this example:

Change this
"baseUrls" => array("http://localhost/")

to this
"baseUrls" => array("http://choptankriverheritage.org/historic_maps/")

This fixed the error that prevented me from adding the WMTS to my AGOL map here:

https://www.arcgis.com/home/webmap/viewer.html?webmap=1900ca75fa504ab9a831351a54c17dcb

Thanks to Chris for pointing this out.
0 Kudos