Select to view content in your preferred language

Incorporating a WMTS layer from Geoserver into a SceneView.

80
0
2 weeks ago
AliMahdian
New Contributor

I have a WMTS layer from GeoServer that has been successfully added to a MapView and works correctly. However, when I try to add this layer to the SceneView, it does not appear. Can anyone help me?

require([
      "esri/Map",
      "esri/views/MapView",
      "esri/layers/WMTSLayer",
      "esri/geometry/SpatialReference"
    ], function(Map, MapView, WMTSLayer, SpatialReference) {

      const wm = new SpatialReference({ wkid: 3857 });

      const wmtsLayer = new WMTSLayer({
        url: "http://localhost:8080/geoserver/gwc/service/wmts",
        activeLayer: {
          id: "SurfaceGroup",
          tileMatrixSetId: "EPSG:900913"
        },
        serviceMode: "KVP",
        spatialReference: wm
      });

      const map = new Map({
        basemap: "topo-vector",
        layers: [wmtsLayer]
      });

      const view = new MapView({
        container: "viewDiv",
        map: map,
        spatialReference: wm,
        center: [-80.3, 43.4], // Longitude, Latitude for Cambridge, Canada
        zoom: 12
      });

    });
Tags (2)
0 Kudos
0 Replies