I wasn't going to buy an
iPhone, but the last-minute
data plan price reduction was just enough to change my mind. (It still feels like a deal with the devil of course...)
The data plan includes free wifi access at any
Rogers-branded hotspot, so I decided to map out the locations. The address of each hotspot is provided by
this website but requires processing in order to be usable by Google Maps.
Process- Downloaded the
XLS version of the hotspot list
- Converted it to CSV format and imported it into the database
- Ran a modified version of
this PHP script from Google that geocodes addresses into latitudes and longitudes
- Wrote a PHP script that exports the database to KML format in a few different configurations
And presto! Here they are, viewed in Google Maps:
-
Rogers Wireless hotspots (352 entries, 142 KB)
-
Bell hotspots (704 entries, 292 KB)
-
Telus Mobility hotspots (127 entries, 54 KB)
-
All hotspots (1183 entries, 486 KB)
If you want to load the entries in Google Earth or another mapping tool, you can grab the raw KML files here:
http://www.techknight.com/kmlUpdateI got someone with an iPhone to try loading the maps on their device. (Mine won't arrive until next week.) It seems that KML support is spotty at best... In Safari the map loaded but wasn't interactive, while the actual Google Maps application could not load an external resource. So for now these are useful only when you're at your PC, about to leave home. :)
Screenshots
IssuesA few problems cropped up while geocoding. Addresses that returned french accents in the XML caused simplexml_load_string() to error out with "Entity: line 1: parser error : Input is not proper UTF-8". A
forum post here had a solution using iconv().
Another problem was that some addresses in the original file are out of date. For example, this entry for Emerald Hills Golf Club:
14001 Concession #5, Stouffville, ON
Doing a search for
emerald hills golf club ontario, it looks like "Concession #5" was renamed to "Warden Avenue", which causes the lookup to fail.
Also, there are some perfectly valid entries that show up in Google Maps but return a GGeoStatusCode of G_GEO_UNKNOWN_ADDRESS (602) when querying for them using the geocoding API. Examples:
Suite 220, 10610 Airport Drive, Grande Prairie, AB
1 First Canadian Place, Toronto, ON
7585 Market Crossing, Burnaby, BC
I'm guessing that the database used by the geocoding API differs from the database used by Google Maps proper. Other addresses in the original list are simply misspelled. Anyway, I thought at first that I would manually get co-ordinates for such entries, but there are 151 of them so I'm going to pass on that. :) (I did do some manual updates using
this tool for the few downtown Toronto locations that didn't work though.)
I'll try to get in touch with whoever is in charge of updates at
canadianhotspot.ca... Maybe if I give them a list of the non-working entries they can fix them.
Read the full article