OperationCode / operationcode_old_site

Our open source website. We're on a mission to help the military community learn software development, enter the tech industry, and code the future.
https://www.operationcode.org/
MIT License
229 stars 155 forks source link

Issue #699 Implemented marker clustering #703

Closed ghost closed 7 years ago

ghost commented 7 years ago

Added the leaflet marker clustering plugin.

jjhampton commented 7 years ago

@rickr FYI - I noticed that there are no markers displayed currently on the map at https://operationcode.org/veterans/map - maybe some kind of DB issue? @walleyyang noticed that the lat longs are not being populated to data-lat-longs.

I was able to see the markers/clusters when running this PR's branch locally on my machine, after manually running bundle install before running the default make command.

jjhampton commented 7 years ago

@walleyyang That looks great! I was wondering what it might look like w. a large dataset like that.On Mar 18, 2017 4:08 PM, Walley Yang notifications@github.com wrote:@walleyyang commented on this pull request.

In app/assets/javascripts/veterans.js.coffee:

@@ -9,6 +9,7 @@ $ -> osmUrl = '//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png' osmAttrib = 'Map data © ' osmAttrib += 'OpenStreetMap contributors'

  • markers = L.markerClusterGroup()

@jjhampton Great point! What do you think of this? It's at maxClusterRadius:25.

—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or mute the thread.