Select to view content in your preferred language

WMTS and 4.7 API

626
1
05-10-2018 02:13 PM
AdamCrateau1
Regular Contributor

I have a WMTS service (from Pictometry) that I'm trying to add to my application.  My code is the following:  

esriConfig.request.corsEnabledServers.push("https://svc.pictometry.com");


layer = new WMTSLayer({
url: "https://svc.pictometry.com/Image/****-****-*****/wmts",
id: "********",
title: "Pictometry"

});


map.add(layer);

I'm getting a 404 from Pictometry's service.  This service is set up using the GoogleMapsCompatible schema.  The issue is the URL being formed by the API and sent to the WMTS server is using the wrong Level-of-Detail or TILEMATRIX.  Instead of using the levelValue  (.tileMatrixSet.lods[0].levelValue), its using the level id (.tileMatrixSet.lods[0].level)

The request being sent is:   pictometry.com/Image/*******/wmts/******/default/GogleMapsCompatible/5/10398/23600.png

The request that should be sent is:    pictometry.com/Image/*******/wmts/******/default/GogleMapsCompatible/16/10398/23600.png

Any thoughts on how to resolve this?

Tags (1)
0 Kudos
1 Reply
DanielWebb
Frequent Contributor

Hi!  Was this ever resolved?  I'm having what looks like the same problem.  But with me, when I use 4.20 no errors are thrown.  But when using 4.21 or higher, errors like yours are thrown.  Something about GogleMapsCompatible that I don't understand.

0 Kudos