【发布时间】:2019-04-13 21:57:52
【问题描述】:
我在传单库中的标记上添加动画时遇到问题
我用
new L.Icon({ iconUrl: 'https://cdn.rawgit.com/pointhi/leaflet-color-markers/master/img/marker-icon-2x-green.png',
shadowUrl: 'https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/images/marker-shadow.png',
iconSize: [25, 41],
iconAnchor: [12, 41],
popupAnchor: [1, -34],
shadowSize: [41, 41]
})
HTML:
<div id='map' style="height:600px;"></div>`
我尝试使用https://github.com/mapshakers/leaflet-icon-pulse
但它不起作用。
那么你知道我该怎么做吗?
另外一个,className 在 Icon 或 divIcon 被忽略,当我把它放在 .css 文件中时
【问题讨论】:
-
嗨@Arek Szumacher 你检查我的答案了吗?它解决了你的问题吗?
-
我找到了方法。在 Angular 项目中,在结构中,不应该在 .css 中添加类,而是在全局样式 .scss 中添加类
标签: javascript angular leaflet openstreetmap ngx-leaflet