小编QGI*_*ser的帖子

使用标记图标只有很棒的字体,没有周围的气球

我有这个代码工作正常,但我需要只显示图标,而不是带有阴影的"气球".

我尝试删除" markerColor...",但这只是更改为默认的蓝色标记/气球.

如何只显示图标及其大小和颜色?

pointToLayer: function(feature, latlng) {
  var con = feature.properties.concept;

  var hub;

  // icons for XX, YY and ZZ 
  if (kon === 'XX') {
    hub = new L.marker(latlng, {icon: L.AwesomeMarkers.icon({icon: 'truck', prefix: 'fa', markerColor: 'cadetblue'}) });
  } else if (kon === 'YY') {
    hub = new L.marker(latlng, {icon: L.AwesomeMarkers.icon({icon: 'envelope', prefix: 'fa', markerColor: 'blue'}) });
  } else if (kon === 'ZZ') {
    hub = new L.marker(latlng, {icon: L.AwesomeMarkers.icon({icon: 'bicycle', prefix: 'fa', markerColor: 'darkblue'}) });
  } else { …
Run Code Online (Sandbox Code Playgroud)

markers leaflet font-awesome

6
推荐指数
1
解决办法
4367
查看次数

标签 统计

font-awesome ×1

leaflet ×1

markers ×1