Select to view content in your preferred language

Displaying a WMTS service on a basemap

773
1
Jump to solution
06-05-2023 01:54 PM
IngJuanMaSuarez
Esri Contributor

Hello everyone.

I'm using the ArcGIS Maps SDK for JavaScript, and I want to create a map and consume a WMTS layer. According to the documentation, it says to use the WMTSLayer class. However, the service is not displaying on my basemap.

The link to the WMTS service I want to read is: https://maps.nj.gov/arcgis/rest/services/Basemap/Orthos_Natural_2015_NJ/MapServer/WMTS

I am attaching the code I am using, and there are no errors in the browser's inspector console.

I appreciate any help you can provide

IngJuanMaSuarez_0-1685998275107.png

 

IngJuanMaSuarez_1-1685998312770.png

0 Kudos
1 Solution

Accepted Solutions
JoelBennett
MVP Regular Contributor

When using tiled layers, your map's layers should all use the same coordinate system.  Therefore, in this case, you should use their Web Mercator-based service instead:

https://maps.nj.gov/arcgis/rest/services/Basemap/Orthos_Natural_2015_NJ_WM/MapServer/WMTS

Also, since this is an ArcGIS Server map service, there's probably not much value in using the WMTS interface.  You could use a TileLayer instead, with the URL:

https://maps.nj.gov/arcgis/rest/services/Basemap/Orthos_Natural_2015_NJ_WM/MapServer

 

View solution in original post

1 Reply
JoelBennett
MVP Regular Contributor

When using tiled layers, your map's layers should all use the same coordinate system.  Therefore, in this case, you should use their Web Mercator-based service instead:

https://maps.nj.gov/arcgis/rest/services/Basemap/Orthos_Natural_2015_NJ_WM/MapServer/WMTS

Also, since this is an ArcGIS Server map service, there's probably not much value in using the WMTS interface.  You could use a TileLayer instead, with the URL:

https://maps.nj.gov/arcgis/rest/services/Basemap/Orthos_Natural_2015_NJ_WM/MapServer