@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/dist/catchUtil.min.esm.js +1 -1
- package/dist/catchUtil.min.js +1 -1
- package/package.json +1 -1
- package/src/util.js +1 -1
package/package.json
CHANGED
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 =
|
|
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})
|