我叠加了两张不同最大层级的tileLayer,一个8级一个14级,为什么叠加之后地图只能放大到8级,不能放大到14级,坐标系是4548
window.L.supermap.SecurityManager.destroyToken(twoDUrlList[0].url);
window.L.supermap.SecurityManager.registerToken(twoDUrlList[0].url, leafletOption.token);
const srs: any = getAppConfig().srs;
window.proj4.defs(srs[0][0], srs[0][1]);
// 注册服务
new window.L.supermap.MapService(twoDUrlList[0].url).getMapInfo(({ result }: any) => {
leafletOption.crs = window.L.supermap.crsFromMapJSON(result);
map = window.L.map(eel.value, leafletOption); // 创建地图
// 初始化layerGroup
LeafletHandler.initLayerGroup(map);
window.LeafletHandler = LeafletHandler;
// 获取layerGroup;
const layerGroup = LeafletHandler.getLayerGroup();
// 往地图上添加内容
twoDUrlList.forEach(({ name, url, key }) => {
const layer2D = new window.L.supermap.TiledMapLayer(url, { noWrap: true, name, key });
LeafletHandler.setLayerList(layer2D);
});
const leaList = LeafletHandler.getLayerList();
leaList.forEach(v => {
console.log(v.options);
if (v.options.key.includes('ewdz')) {
v.addTo(layerGroup);
}
});