Hi!
I’m working now with markers. I’m getting all my info from a database.
I was able to add as many markers as I have into the database with my custom icon.
Also, I was able to put those markers into a cluster if I add them in the code, following this example.
var points = [ { coordinates: [-0.13389631465156526, 51.510387047712356], properties: { id: 1, name: 'Checkpoint A' } }, ... ];
So, my issues are the following:
1
If I’m trying to add new markers to the cluster from my database, this never shows on the map.
That’s how I’m doing it:
var points = []; ... points.push({ coordinates: [data.long, data.lat], properties: { id: i, name: data.office } });
I tried using a refreshMarkers(); just after the push, but doesn’t work.
2
Is it possible to have two or more groups of clusters?
For example, I have two types of stores: pizza and drinks, but I don’t want to mix them in the same cluster. Can I have a cluster per each group of stores? Even if there are closing stores, there will be 2 clusters because are different stores.
3
Is it possible to change the marker icon using clusters?