1

I'm looking to make a map using Leaflet in R, where the clusters shows the sum of a variable associated with the markers, instead of the number of markers in the area.

For example: If there are 4 markers in a cluster. Each marker has a number of dollars associated with that location: Point 1: 10 Point 2: 15 Point 3: 15 Point 4: 1

The cluster should read 41 instead of 4. Is there a way to do this in leaflet?

Also I have too many data points and dollar amounts to break each point down into 1 voucher for each dollar.

  • Are you referring to the Marker Cluster Plugin ? Or are you referring to points that are clustered in space by some criteria? – GISKid Feb 10 at 21:26
  • Cluster Marker plug in: leaflet(Waitlist_gc) %>% addTiles() %>% addMarkers( clusterOptions = markerClusterOptions(), label=~as.character(Map) – Jimmi Chips Feb 10 at 21:39
  • 2
    Does this help ? stackoverflow.com/questions/53245984/… (If not please update/edit your q with your code and what isn't working / what would be expected) – GISKid Feb 11 at 0:03
  • 1
    That's the exact code I was looking for, I really appreciate the help! – Jimmi Chips Feb 11 at 1:15
  • 1
    I'm voting to close this question as off-topic because duplicate of stackoverflow.com/questions/53245984/… – Spacedman Feb 11 at 8:37

Browse other questions tagged or ask your own question.