xy-map 1.0.44 → 1.0.45

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": "xy-map",
3
- "version": "1.0.44",
3
+ "version": "1.0.45",
4
4
  "description": "地图组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -295,6 +295,7 @@ export const addLayerImagePoint = async (option, layerId) => { // 点
295
295
  const img = image.imageList[i]
296
296
  const loadImg = new Promise((resolve, reject) => {
297
297
  loadImage(img.url, image.width, image.height).then(image => {
298
+ if (map.hasImage(`${img.id}`)) map.removeImage(`${img.id}`)
298
299
  map.addImage(`${img.id}`, image)
299
300
  resolve()
300
301
  })
@@ -305,6 +306,7 @@ export const addLayerImagePoint = async (option, layerId) => { // 点
305
306
  } else {
306
307
  const img = image.src || require('../image/marker.png')
307
308
  loadImage(img, image.width, image.height).then(image => {
309
+ if (map.hasImage(`${id}-marker`)) map.removeImage(`${id}-marker`)
308
310
  map.addImage(`${id}-marker`, image)
309
311
  afterOperation()
310
312
  })
@@ -53,7 +53,7 @@ export const getLayerAll = () => {
53
53
  } = mapSdk
54
54
 
55
55
  let data = map.getStyle().layers
56
- console.log(data)
56
+ // console.log(data)
57
57
  return data
58
58
  }
59
59
 
@@ -31,7 +31,7 @@
31
31
  </template>
32
32
 
33
33
  <map-full-screen class="ml-20"
34
- dom="fullScreen"
34
+ :dom="fullDom"
35
35
  v-if="showFullBtn">
36
36
  </map-full-screen>
37
37
  </div>
@@ -51,6 +51,10 @@ export default {
51
51
  mapFullScreen
52
52
  },
53
53
  props: {
54
+ fullDom: {
55
+ type: String,
56
+ default: 'fullScreen',
57
+ },
54
58
  list: {
55
59
  type: Array,
56
60
  default: () => [],