【发布时间】:2019-04-28 15:55:16
【问题描述】:
我试图在 openlayers 地图上显示 WMTS 图层,但是当我将“EPSG:3857”更改为“EPSG:5514”时,地图不起作用。我正在使用来自 OpenLayers 示例的 WMTS,我想展示 MapServer (GeomorfologickeJednotky)。
这是我的 Codepen https://codepen.io/Seuss/pen/OGqxoO
(window.webpackJsonp = window.webpackJsonp || []).push([
[155], {
380: function(e, r, t) {
"use strict";
t.r(r);
for (var a = t(3), i = t(2), s = t(1), n = t(6), o = t(5), c = t(12), p = t(102), w = t(147), g = Object(o.g)("EPSG:3857"), l = g.getExtent(), u = Object(s.E)(l) / 256, m = new Array(14), y = new Array(14), S = 0; S < 14; ++S) m[S] = u / Math.pow(2, S), y[S] = S;
new a.a({
layers: [new n.a({
source: new c.b,
opacity: .7
}), new n.a({
opacity: .7,
source: new p.a({
attributions: 'Tiles © <a href="https://ags.cuzk.cz/arcgis/rest/services/GeomorfologickeJednotky/MapServer">ArcGIS</a>',
url: "http://ags.cuzk.cz/arcgis/rest/services/GeomorfologickeJednotky/MapServer/WMTS/",
layer: "0",
matrixSet: "EPSG:3857",
format: "image/png",
projection: g,
tileGrid: new w.b({
origin: Object(s.C)(l),
resolutions: m,
matrixIds: y
}),
style: "default",
wrapX: !0
})
})],
target: "map",
view: new i.a({
center: [1678982, 5913697],
zoom: 6
})
})
}
},
[
[380, 0]
]
]);
//# sourceMappingURL=wmts.js.map
【问题讨论】:
标签: javascript openlayers