diff --git a/src/config/map.js b/src/config/map.js
index 7730f03..214a927 100644
--- a/src/config/map.js
+++ b/src/config/map.js
@@ -9,7 +9,7 @@ export default {
zoom: Number(import.meta.env.APP_MAP_ZOOM) || 5,
}
-/** 天地图影像 + 注记(WGS84 lk 系列) */
+/** 天地图影像/矢量 + 注记(Web 墨卡托 w 系列) */
export function createTiandituLayerOptions(tk) {
return {
img: {
@@ -20,5 +20,27 @@ export function createTiandituLayerOptions(tk) {
urlTemplate: `https://t{s}.tianditu.gov.cn/cia_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=cia&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=${tk}`,
subdomains: ['0', '1', '2', '3', '4', '5', '6', '7'],
},
+ vec: {
+ urlTemplate: `https://t{s}.tianditu.gov.cn/vec_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=vec&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=${tk}`,
+ subdomains: ['0', '1', '2', '3', '4', '5', '6', '7'],
+ },
+ cva: {
+ urlTemplate: `https://t{s}.tianditu.gov.cn/cva_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=cva&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=${tk}`,
+ subdomains: ['0', '1', '2', '3', '4', '5', '6', '7'],
+ },
+ }
+}
+
+export function createTiandituBaseLayer(maptalks, tk, mode = 'satellite') {
+ const layers = createTiandituLayerOptions(tk)
+ if (mode === 'street') {
+ return new maptalks.GroupTileLayer('tianditu-base', [
+ new maptalks.TileLayer('tdt-vec', layers.vec),
+ new maptalks.TileLayer('tdt-cva', layers.cva),
+ ])
}
+ return new maptalks.GroupTileLayer('tianditu-base', [
+ new maptalks.TileLayer('tdt-img', layers.img),
+ new maptalks.TileLayer('tdt-cia', layers.cia),
+ ])
}
diff --git a/src/styles/prototype.css b/src/styles/prototype.css
index 761535c..35d3678 100644
--- a/src/styles/prototype.css
+++ b/src/styles/prototype.css
@@ -175,6 +175,7 @@ svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width:
.binding-line text { fill: #fff; font-size: 2.4px; text-anchor: middle; paint-order: stroke; stroke: rgba(34,77,111,.88); stroke-width: .8px; }
.map-view-all { height: 34px; padding: 0 10px; border-left: 1px solid var(--line); color: var(--blue); background: #fff; font-size: 11px; }
.map-view-all:hover { background: #f3f8fc; }
+.map-scale { position: absolute; z-index: 4; right: 12px; bottom: 14px; color: #fff; font-size: 10px; border-bottom: 2px solid #fff; padding: 0 16px 2px; text-shadow: 0 1px 3px #000; pointer-events: none; }
@keyframes marker-pulse { 50% { filter: drop-shadow(0 0 6px rgba(204,61,67,.7)); } }
.video-unavailable { color: var(--muted); font-size: 10px; }
diff --git a/src/views/MonitorView/MonitorView.vue b/src/views/MonitorView/MonitorView.vue
index 28d52c7..6a60119 100644
--- a/src/views/MonitorView/MonitorView.vue
+++ b/src/views/MonitorView/MonitorView.vue
@@ -162,11 +162,9 @@
- 天地图
-
-
-
-
+
+
+
@@ -175,6 +173,7 @@
告警
离线
+
{{ mapScaleText }}