Select to view content in your preferred language

WGS84 (Geodetic) not being displayed correctly

159
0
07-18-2024 12:32 AM
ialzara
New Contributor

Hello,

I'm building an app and I want to use layers in my map server. The problem is that any map with Geodetic (most of my maps) gets displayed in a funky way on ArcGIS but works just fine with Cesium. I tried to reverse engineer it but I get to a dead end every time. I need to duplicate the map to be spherical Mercator for it to be displayed correctly which causes the server to have two duplicate maps and I don't want that to happen.

This is how I create my custom class:

var customTileLayer = WebTileLayer.createSubclass({
    properties: {
      urlTemplate: null,
      title: null,
    },
    getTileUrl: function (z, y, x) {
      // var y = Math.pow(2, z) - 1 y ;
      var y = Math.pow(2, z) - 1 - y;
      // Reverse the y-coordinate
      return this.urlTemplate
        .replace("{level}", z)
        .replace("{col}", x)
        .replace("{row}", y);
    },
  });



Thanks.

0 Kudos
0 Replies