修复矢量瓦片尺寸设置错误

This commit is contained in:
lin
2025-11-13 17:12:42 +08:00
parent ec7567c2cd
commit 865ee8cee9
2 changed files with 2 additions and 1 deletions

View File

@@ -16,7 +16,7 @@ window.mapParam = {
// 默认地图中心点 // 默认地图中心点
center:[116.41020, 39.915119], center:[116.41020, 39.915119],
// 地图最大层级 // 地图最大层级
maxZoom:19, maxZoom:18,
// 地图最小层级 // 地图最小层级
minZoom: 3 minZoom: 3
} }

View File

@@ -151,6 +151,7 @@ export default {
tileUrl += `?geoCoordSys=${this.mapTileList[this.mapTileIndex].coordinateSystem}&accessToken=${this.$store.getters.token}` tileUrl += `?geoCoordSys=${this.mapTileList[this.mapTileIndex].coordinateSystem}&accessToken=${this.$store.getters.token}`
let source = new VectorTileSource({ let source = new VectorTileSource({
format: new MVT(), format: new MVT(),
tileSize: 256,
url: tileUrl url: tileUrl
}) })
let layer = new VectorTileLayer({ let layer = new VectorTileLayer({