Leaflet js api中加载WMTS服务,在地图对象初始化是设置坐标系,一旦设定,切片划分的格网规则就确定了
1.4326坐标系
加载标准的WMTS服务,http://localhost:8080/geoserver/gwc/service/wmts
重载L.TileLayer类,实现WMTS服务切片自定义获取
define([
"dojo/_base/declare"
], function(declare) {
return declare("WMTSLayer", [L.TileLayer], {
defaultWmtsParams: {
service: 'WMTS',
request: 'GetTile',
version: '1.0.0',
layer: '',
style: '',
tilematrixset: '',
format: 'image/