ngx-openlayers
ngx-openlayers copied to clipboard
Clustered Features
Hi Quentin,
Is Clustered Features like http://openlayers.org/en/latest/examples/cluster.html not include in this library?
cause when i'm implementing it using this code
<aol-layer-vector> <aol-source-cluster>
i've got
Error: Template parse errors: 'aol-source-cluster' is not a known element:
Thanks
Only a subset of OL4 is implemented. It's usually trivial to add things, just create a component and map all properties.
If no one else is already working on adding clusters, I will do it.
Happy with the new project name too, fits great.
@greggguru AFAIK, no one is publicly working on this right now. Would be greatly appreciated though!
Ack, best intention to get this done quickly has failed. I'm sorry. I still would like to implement this feature. Let's see what this weekend will allow me to complete.
@greggguru are you working on it currently? Would be extremely grateful if you complete implementation of that feature. I highly need that to my Angular 4 app but unfortunately I am not capable of creating that feature on my own. Keep my fingers crossed. Best regards, Mikołaj
Hi yall. I want to help with implementing this.
I had something in mind like the following
<aol-layer-vector>
<aol-source-cluster>
<aol-source-vector>
<aol-feature> ...
That ok ?
Was this implemented by anyone?
I see that <aol-source-cluster> exists in the code, but I couldn't understand how to use it...
You can find an example here => https://quentin-ol.github.io/ngx-openlayers/examples/cluster The source code is here
Link is dead, I found the following code in the example to show how cluster works:
<aol-layer-vector>
<aol-source-cluster [distance]="distance">
<aol-source-vector>
<aol-feature *ngFor="let p of points">
<aol-geometry-point>
<aol-coordinate [x]="p.x" [y]="p.y" [srid]="'EPSG:4326'"></aol-coordinate>
</aol-geometry-point>
</aol-feature>
</aol-source-vector>
<aol-style>
<aol-style-circle [radius]="10">
<aol-style-stroke [color]="'#fff'"></aol-style-stroke>
<aol-style-fill [color]="'#3399CC'"></aol-style-fill>
</aol-style-circle>
<aol-style-text [text]="'1'">
<aol-style-fill [color]="'#fff'"></aol-style-fill>
</aol-style-text>
</aol-style>
</aol-source-cluster>
</aol-layer-vector>
But I can't figure out how to get the feature instance of the cluster in order to set the text for the style. In the cluster documentation the style is set with a function that receives a feature, how does one implement this using this library?
P.S thanks for the quick response!
I now see that what I'm looking for is discussed here: #186, I'll move my question there.
I'm guessing this is implemented and can be closed, right? (So that future developers wouldn't think this is still not implemented since it is open).