bluehalo / ngx-leaflet-markercluster

MIT License
61 stars 23 forks source link

Sub-plugin support? #57

Open turbolego opened 3 years ago

turbolego commented 3 years ago

Leaflet.markercluster has "sub-plugins".

One of these "sub-plugins" is Leaflet.MarkerCluster.List by @adammertel which is more "mobile friendly" than the regular clusters.

However, I'm unable to add this sub-plugin and I'm wondering if "sub-plugins" are supported by ngx-leaflet-markercluster?

Thanks for reading! 😄

Edit: This is related to issues #26 and #42 which are both sub-plugins leaflet.markercluster.freezable and leaflet.markercluster.layersupport by @ghybs Seems like I'm not the only one who cannot get sub-plugins to work with ngx-leaflet-markercluster?

reblace commented 2 years ago

Depending on how the sub-plugin works, you should be able to use dependency injection to get a reference to the parent directive for the markercluster. From there, you should be able to access the markercluster instance and the Leaflet map. That's how the ngx-leaflet-markercluster works with respect to it being a "sub-plugin" to leaflet itself.