通过iserver转发国家天地图服务,再通过mapboxgl加载,会出现偏移,如下是我的部分代码
this.map = new mapboxgl.Map({ container: 'map', zoom: 8, center: [120,20], crs: new mapboxgl.CRS('EPSG:4326',[-180,-90,180,90]), });
this.map.addLayer({ "id": 'test', "type": "raster", "source": { "type": "raster", "tiles": ['http://192.168.1.233:8090/iserver/services/map-tianditu/wmts100?layer=影像底图_经纬度&style=default&tilematrixset=Custom_影像底图_经纬度&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image/png&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}'], "tileSize": 256 }, });