robogals / myrobogals

myRobogals is the global intranet and record-keeping tool for Robogals. It has been built to simplify many of our day-to-day tasks including organising school visits, maintaining a member database, communicating with members, storing records reliably for future generations and easily collecting statistics on a global scale.
https://my.robogals.org
10 stars 21 forks source link

Automatically generate chapter locations page for website #40

Closed U-238 closed 11 years ago

U-238 commented 11 years ago
  1. Add fields "latitude" and "longitude" to the Group (chapter) model. If blank, the latitude and longitude should be automatically filled by save() by querying the university name and location (these fields already exist) to the Google Maps API with a comma in-between these two values. Examples: "University of Melbourne, Melbourne, Australia" or "Imperial College London, London, UK". Such addresses appear to be sufficient for Google to return the coordinates - I tried a few on Google Maps. Only calculate latitude-longitude for chapters where status is "active" and university is not null (so we exclude the regions and global).
  2. Provide a URL that automatically generates a KML file like this: http://www.robogals.org/includes/robogals-chapter-map.kml

The KML should contain a special hardcoded entry for Global/Melbourne, as you can see in the existing KML file.

(The KML file will be used on this page: http://www.robogals.org/our-network/chapter-locations)

yfcheung commented 11 years ago

It seems the historical data for KML is not relevant.

yfcheung commented 11 years ago

Just a quick que: The lat and lng in retrieved from google querry are a little off compare to the file robogals-chapter-map, does that matter?

are the lat and lng in robogals-chapter-map hand-picked?

U-238 commented 11 years ago

The current ones were hand-picked using Google Maps. It doesn't matter if your values are a little off - so long as the pin is in the university.

U-238 commented 11 years ago

Some difficult universities can have the lat-lon entered manually. For example I tried searching "Tokyo Institute of Technology" on Google Maps and got multiple results. In that case we will just enter a hand-picked value.

yfcheung commented 11 years ago

done

U-238 commented 11 years ago

Tested and closed!

U-238 commented 11 years ago

Btw, this is now live at http://www.robogals.org/our-network/chapter-locations

U-238 commented 11 years ago

Indeed China is big. It looks even more prominent because Google Maps puts the Pacific Ocean in the middle of the map, which means that China is near the middle of the map. Luckily this also puts Australia in the middle, and Australia is very big too :)