WebTileLayer can not show the map data in EPSG:3826 format

23 Views Asked by At

I meet a problem when using WebTileLayer show the map data in EPSG:3826 format.

The code snippet is as following:

  const basemap = new Basemap({
                    baseLayers: [
                        new WebTileLayer({
                            urlTemplate: "https://wmts.nlsc.gov.tw/97/wmts/EMAP3826/default/default028mm/{level}/{row}/{col}",
                            title: "Basemap",
                            crossOrigin: 'anonymous',
                            extent: {
                                xmin: 128548.4443375419,
                                ymin: 2394066.4166165744,
                                xmax: 606875.5521,
                                ymax: 2919551.2968000006,
                                spatialReference: { wkid: 102443 }
                            },
                            spatialReference: { wkid: 102443 }
                        })
                    ],
                    title: "basemap",
                    id: "basemap",
                    spatialReference: { wkid: 102443 }
                });
 

And the error message shows: WebTileLayer .... spatialReference must match tileInfo.spatialReference. Is there any other API methods can cover this problem? thanks a lot.

0

There are 0 best solutions below