Or leaflet maybe? Can @mlevans recommend something other than Google Maps?
I'd definitely go for Leaflet.
I'm going to work on this tomorrow during labs Friday. I'm thinking about D3 because we will need something other than a Mercator projection. If there is a compelling reason to use something else please let me know.
Fantastic @andyhull. Thanks for pursuing it.
During labs Friday I worked up a really basic D3 map:
Not much to it so far, but before going any further I want to nail down some specifics. We want points for all the CfA brigades and the ability to click on those points to show a link to their event page? Does that sound correct? This map will replace the current Gmap on the brigade home page, so we are going for the same dimensions?
I'm also going to try to work out an easy way to update the points on the map as well.
For now, let's consider the map separately from the dimensions & layout of the current homepage. I would like prominent, useful map.
Yes, close: we want the ability to click on those points and show a link to their brigade profile, ex:
(and, separately, we want the ability for those profiles to better include links to & widgets from event sites, forums, groups and the like)
@noneck pointed to a map he likes: http://okfn.org/local/
Ok given this functionality I think it would be great to go with Leaflet/Mapbox.
I've been looking at this with @andyhull today, but I have some questions about what data is to be shown on the map. There is a map view (app/views/home/map.html.erb) that shows all of the Locations on a map, but it seems that this issue is more related to showing the locations of Brigades (not the locations where apps have been deployed).
If we do wish to show Brigades, then we'll need to store the location of each brigade on the Brigade mode, or infer its locations based on app deployments. The simplest approach would probably be to add three fields to the Brigade model:
We could use the geocoder gem (as in the location model) to geocode the lat/long if missing, then write a method that will geoJSON based on this data to be shown on a map.
Does this make sense or would you prefer a different approach?
Also, where should this map be shown? Should we create a partial, or include it on a page somewhere?
We'll assume that changes to models and possibly relationships may be required in some cases to achieve desired results. Here's what I'd like to see:
Heatmap or other non-invasive map of member locations