Make a Map View #55

ryanatwork opened this Issue May 23, 2012 · 10 comments

6 participants

Code for America member

Using MapBox

Code for America member

Or leaflet maybe? Can @mlevans recommend something other than Google Maps?

Code for America member

I'd definitely go for Leaflet.

@andyhull andyhull was assigned Apr 18, 2013

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.

Code for America member

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.

Code for America member


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:


Ok given this functionality I think it would be great to go with Leaflet/Mapbox.

Code for America member

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:

  • "place" (string) – where the Brigade is located, i.e. city or region name
  • "latitude" (float)
  • "longitude" (float)

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?

Code for America member
Code for America member

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:

  1. Brigade locations

    • customizable placemark(s)
    • tooltip or panel display of brigade's profile information
    • TBD things that can be pulled from either, Meetup API or GitHub API
      • thumbnails of captains, # of members, link to next meetup, # apps deployed
    • Link to brigade's full profile under
  2. Heatmap or other non-invasive map of member locations

@ondrae ondrae added the wontfix label Feb 27, 2015
@ondrae ondrae closed this Feb 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment