https://infrastructure.drupal.org/drupal.org-style-guide/prototype/homep...

- Provide a hard-coded DrupalCon map pin.
- Make sure content is pulled correctly for all tabs (except More, which is omitted).
- Each bit of content may be placed on the map once data starts coming in, #690266: Start collecting user locations for the map.

CommentFileSizeAuthor
#7 drupalorg-852438-7.patch1.01 KBc4rl

Comments

drumm’s picture

Issue tags: +drupal.org redesign

Tag

drumm’s picture

For the map-
1. Use {sessions}.hostname for users who have opted in to share location, and queries like what drupalorg_news shows in the content to the right.
2. Translate to lat/lon using the database from http://www.maxmind.com/app/geolitecity
3. Translate to pixels. I think the map projection is Mercator, confirm and grab the math from Wikipedia or other reputable source.
4. Replace the existing test data

damien tournoud’s picture

Given the scale of the map and the privacy issues with using private data to draw this map, I would suggest we just use the public "Country" field and use a database of the geographic center of the country.

There is one available in the World Factbook [1], and we can probably derive that data from Geonames too.

[1] https://www.cia.gov/library/publications/the-world-factbook/fields/2011....

drumm’s picture

IP-based location would only be opt-in. Country would be a decent fallback for other users.

A lot of Drupal development happens in large countries, like US and Canada. One center point for each would not be too accurate.

damien tournoud’s picture

There are plenty of reasons not to use the session table here:

- IP is a private information that we probably shouldn't keep anyway
- IPs can change, and the same user can have several IPs
- If we rely on the session table, we cannot switch to an alternative session provider if we want

Using the public country field is the only way to go I see. True, it will not be that accurate for large countries, but if the only objective is to demonstrate that the community has worldwide activity, and that the Drupal worl never sleeps, it's probably enough.

c4rl’s picture

Subscribing

c4rl’s picture

StatusFileSize
new1.01 KB

The following patch is necessary for the template in order to get the sprited dot icons to appear correctly. See #852424: Clean up home page theme for a related CSS/image patch in comment #8.

drumm’s picture

Commtted

drumm’s picture

I did a round of work cleaning up this code and making it a bit more ready. $variables['map_content'] in drupalorg_preprocess_drupalorg_home() needs to be filled out a bit.

1. Make the DrupalCon pin configurable. drupalorg_settings_form() provides a place to put this.

2. The todo pin needs to be replaced with the results of 3 queries, updates to
- doc, nodes with book navigation
- forum, new forum nodes and/or new comments on those nodes
- commit, recent cvs commits
all inner joined with html5_user_geolocation for latitude and longitude.

Each pin is shown for 3 seconds now, so 20 of each provides 3 minutes of content before looping. Mix the three results and sort by date in PHP.

The content in each pin should be brief, something along the lines of "{user} committed a patch to {project}
{first 10ish words of commit message}"

lisarex’s picture

Oh sorry, I made a duplicate issue: #917428: Home page map content to reference Events calendar on g.d.o

here's my post:
We (gdemet, amazon, jredding, chrisstral) had a quick discussion and think the home page map should contain event/group data pulled from
http://groups.drupal.org/events

Is it pretty straightforward to add the geographic field to events as it has been done to profiles?

Also, the map popups need to stay within the map zone and not obscure any text, so images are going to need to be kept small.

Then after the map is populated w/ content from the (which will take some time), we can reevaluate if anything else should appear...

drumm’s picture

Adding a geographic field to events is not straightforward.

drumm’s picture

Assigned: Unassigned » drumm
drumm’s picture

The map is now updating decently. Needs caching and transparency on the dot images, but is okay for design review.

drumm’s picture

Status: Active » Fixed

Caching is now added.

Status: Fixed » Closed (fixed)
Issue tags: -drupal.org redesign

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit baa1e5b on 6.x-3.x, 7.x-3.x-dev by drumm:
    #852438 by c4rl. Dots
    
    
  • Commit 36bbeec on 6.x-3.x, 7.x-3.x-dev by drumm:
    #852438 Keep map bubbles in map
    
    
  • Commit 6d8246a on 6.x-3.x, 7.x-3.x-dev by drumm:
    #852438 Keep map bubbles in map
    
    
  • Commit aeb6089 on 6.x-3.x, 7.x-3.x-dev by drumm:
    #852438 2/3 of map content
    
    
  • Commit d21322d on 6.x-3.x, 7.x-3.x-dev by drumm:
    #852438 2/3 of map content
    
    
  • Commit d26dd18 on 6.x-3.x, 7.x-3.x-dev by drumm:
    #852438 cache map content.
    
    
  • Commit e8a8c88 on 6.x-3.x, 7.x-3.x-dev by drumm:
    #852438 make chicaco configurable and less intrusive.
    
    
  • Commit ed1cd06 on 6.x-3.x, 7.x-3.x-dev by drumm:
    #852438 Add CVS commits to map.