@mapcatch/util 1.0.14-a → 1.0.14

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.14-a",
3
+ "version": "1.0.14",
4
4
  "main": "./dist/catchUtil.min.esm.js",
5
5
  "repository": "",
6
6
  "author": "wanyanyan",
package/src/util.js CHANGED
@@ -279,7 +279,7 @@ export function project(lngLat, zoom=12) { // 经纬度转墨卡托像素坐标
279
279
  export function addIcons2Map (map, icons) {
280
280
  icons.forEach(({url, sdf}) => {
281
281
  map.loadImage(url, (error, image) => {
282
- let iconName = url.split('/').pop().split('.')[0]
282
+ let iconName = path.split('/').pop().split('.')[0]
283
283
  if(map.hasImage(iconName)) return
284
284
  if (error) throw error
285
285
  map.addImage(iconName, image, {sdf})