@mapcatch/util 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mapcatch/util",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "main": "./dist/catchUtil.min.js",
5
5
  "repository": "",
6
6
  "author": "wanyanyan",
@@ -7,14 +7,14 @@ export default [
7
7
  { // 影像地图
8
8
  type: 'raster',
9
9
  tileSize: 256,
10
- tiles: ['http://t0.tianditu.gov.cn/DataServer?T=img_w&x={x}&y={y}&l={z}&tk=bfc12ce6bd94a4449ad626b8a0b709d0'],
10
+ tiles: ['https://t0.tianditu.gov.cn/DataServer?T=img_w&x={x}&y={y}&l={z}&tk=bfc12ce6bd94a4449ad626b8a0b709d0'],
11
11
  maxzoom: 18,
12
12
  layerType:'bmap'
13
13
  },
14
14
  { // 影像标注
15
15
  type: 'raster',
16
16
  tileSize: 256,
17
- tiles: ['http://t0.tianditu.gov.cn/DataServer?T=cia_w&x={x}&y={y}&l={z}&tk=bfc12ce6bd94a4449ad626b8a0b709d0'],
17
+ tiles: ['https://t0.tianditu.gov.cn/DataServer?T=cia_w&x={x}&y={y}&l={z}&tk=bfc12ce6bd94a4449ad626b8a0b709d0'],
18
18
  maxzoom: 18,
19
19
  layerType:'bmap'
20
20
  }
@@ -28,14 +28,14 @@ export default [
28
28
  { // 矢量淡雅
29
29
  type: 'raster',
30
30
  tileSize: 256,
31
- tiles: ['http://t0.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=bfc12ce6bd94a4449ad626b8a0b709d0'],
31
+ tiles: ['https://t0.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=bfc12ce6bd94a4449ad626b8a0b709d0'],
32
32
  maxzoom: 18,
33
33
  layerType:'bmap'
34
34
  },
35
35
  {
36
36
  type: 'raster',
37
37
  tileSize: 256,
38
- tiles: ['http://t0.tianditu.gov.cn/DataServer?T=cva_w&x={x}&y={y}&l={z}&tk=bfc12ce6bd94a4449ad626b8a0b709d0'],
38
+ tiles: ['https://t0.tianditu.gov.cn/DataServer?T=cva_w&x={x}&y={y}&l={z}&tk=bfc12ce6bd94a4449ad626b8a0b709d0'],
39
39
  maxzoom: 18,
40
40
  layerType:'bmap'
41
41
  }
package/src/util.js CHANGED
@@ -116,9 +116,10 @@ export function diffLayers(newList, oldList = []) { // 任务详情中的任务
116
116
  if (_.isEqual(layer, oldNode)) {
117
117
  continue
118
118
  }
119
+ // 有属性更新
119
120
  if (['point', 'line', 'polygon'].includes(type)) {
120
121
  cmds.push(['updateAnnotations', layer])
121
- } if (opacity !== oldOpacity) {
122
+ } else if (opacity !== oldOpacity || (type === 'geojson' && !_.isEqual(layer.metadata, oldNode.metadata))) {
122
123
  cmds.push(['updateLayer', layer])
123
124
  } else if (visible !== oldVisible){
124
125
  cmds.push([visible?'addLayer':'removeLayer', layer])