【发布时间】:2020-04-24 03:58:42
【问题描述】:
我一直在尝试使用 ngx-leaflet 的自定义集群选项,但遇到了困难。现在我只想更改所有标记集群以显示单词“hello”,
演示 https://github.com/Asymmetrik/ngx-leaflet-markercluster/tree/master/src/demo/app 包含变量,但没有进一步说明,文档 https://github.com/Asymmetrik/ngx-leaflet-markercluster#leafletmarkerclusteroptions 指向传单自己的文档。
据我所知,我应该这样做:
markercluster-demo.component.ts
markerClusterGroup: L.MarkerClusterGroup;
markerClusterData: L.Marker[] = [];
markerClusterOptions = L.markerClusterGroup({
iconCreateFunction(cluster) {
return L.divIcon({ html: '<b>hello</b>' });
}
});
谁有它工作的例子?
谢谢
【问题讨论】:
标签: angular typescript leaflet ngx-leaflet