Closed (fixed)
Project:
Drupal.org customizations
Component:
Code
Priority:
Critical
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
13 Jul 2010 at 05:53 UTC
Updated:
23 May 2014 at 18:23 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
drummTag
Comment #2
drummFor 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
Comment #3
damien tournoud commentedGiven 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....
Comment #4
drummIP-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.
Comment #5
damien tournoud commentedThere 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.
Comment #6
c4rl commentedSubscribing
Comment #7
c4rl commentedThe 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.
Comment #8
drummCommtted
Comment #9
drummI 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}"
Comment #10
lisarex commentedOh 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...
Comment #11
drummAdding a geographic field to events is not straightforward.
Comment #12
drummComment #13
drummThe map is now updating decently. Needs caching and transparency on the dot images, but is okay for design review.
Comment #14
drummCaching is now added.