As another proof of concept I wrote a little “geo:” URI JavaScript parser.
Basically it scans all anchors in a given text for “geo:” links, extracts location and meta information (e.g. coordinates and corresponding text), places them on a map and appends the map to the text.
I choose to go with a Google Map because I already knew the API, so it was the easiest way. Of course one could modify the script to use any other mapping API’s, create a KML or even transfer the data to a GIS application. If I can free some time in the next weeks I’ll spice the script a little up, some more user defined parameters (e.g. map dimension, marker symbols) and the interpretation of query arguments would be nice though.
See a quick example here: the locations of a few cultural venues are marked with “geo:” anchors, scanned by the script and dynamically shown in the map below.
However, if you’re interested you can download the JavaScript file here. You’ll need a copy of jQuery (I used version 1.1.2) and a valid Google Maps key for your domain too. Then just add the corresponding 3 script elements (Google key, jQuery and geouriparser.js) into the head of your document and let the script find and display the geoURIs in your text.
The idea is heavily inspired by Gutenkarte, a presentation of MetaCarta Labs I remembered from last year’s Where 2.0 conference. Gutenkarte is based on MetaCarta’s Geoparser API, which is of course far more complex than my few lines JavaSrcipt code.