import TileLayer from "ol/layer/Tile"
import { WMTS } from 'ol/source'
import { getWidth, getTopLeft } from 'ol/extentjs';
import {get as getProjection } from 'ol/projjs';
import WMTSTileGrid from 'ol/tilegrid/WMTSjs';
var matrixIds = ["EPSG:4326:0", "EPSG:4326:1", "EPSG:4326:2", "EPSG:4326:3", "EPSG:4326:4", "EPSG:4326:5", "EPSG:4326:6",
"EPSG:4326:7", "EPSG:4326:8", "EPSG:4326:9", "EPSG:4326:10", "EPSG:4326:11", "EPSG:4326:12", "EPSG:4326:13", "EPSG:4326:14",
"EPSG:4326:15", "EPSG:4326:16", "EPSG:4326:17", "EPSG:4326:18", "EPSG:4326:19", "EPSG:4326:20", "EPSG:4326:21"
];
var resolutions = [0703125, 03515625, 017578125, 0087890625, 00439453125, 002197265625, 0010986328125, 00054931640625, 000274658203125, 0001373291015625, 6866455078125E-4, 34332275390625E-4, 171661376953125E-4, 858306884765625E-5, 4291534423828125E-5, 21457672119140625E-5, 10728836059570312E-5, 5364418029785156E-6, 2682209014892578E-6, 1341104507446289E-6, 6705522537231445E-7, 33527612686157227E-7];
let projection = getProjection('EPSG:4326'); // 获取web墨卡托投影坐标系
let projectionExtent = projectiongetExtent(); // web墨卡托投影坐标系的四至
let wmtsTileGrid = new WMTSTileGrid({
origin: getTopLeft(projectionExtent), // 原点(左上角)
resolutions: resolutions, // 分辨率数组
matrixIds: matrixIds // 矩阵ID,就是瓦片坐标系z维度各个层级的标识
});
var maplayer = new TileLayer({
source: new WMTS({
url: ">
以上就是关于Vue中使用geoserver中得wmts全部的内容,包括:Vue中使用geoserver中得wmts、如何获取一个地点的坐标、等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)