GreaseRoute - Mapping the web

I've been fairly quiet for the past couple of weeks. I've been focused on some projects, including entries to the MapQuest OpenAPI developers' competition.

One of my entries, which may or may not actually be considered a "mashup", is a Firefox GreaseMonkey script called GreaseRoute that creates map and route icons for an Microformat formatted adr or geo locations. These are often used in an hcard.

One of the cooler parts is that the extension automatically determines the location of the person viewing the page. Using the HostIP IP-to-Location database, the user's location is automatically entered as the starting location. So when a user is viewing the webpage of, for example, a store or business, they can click the "route" link and get turn-by-turn directions to that location. No more copy & pasting street/city/state to a form or asking the person next to you "where are we?"

Microformats are a stepping stone on the way to the semantic web. They are a simple way to encode useful information for viewing and mining by users and other applications (ala mashups).

Example adr


The proper format of the adr is as follows:

1517 N. Main St.

Box 203

Royal Oak,
MI
48067

US


which will then be displayed as:

1517 N. Main St.

Box 203

Royal Oak,
MI
48067

US

Example geo


Instead of an address, one can instead just encode the latitude and longitude:

N 37° 24.491
W 122° 08.313

The Result


GreaseRoute has 2 version, the lite version and the embed version. The lite version displays a map and route icon next to the addresses found on the webpage:

The embed version displays a "route" link. When clicked, a pop-up map is displayed between the users location and the encoded address.

Give GreaseRoute a try and let me know what you think.

You can also go over to Userscripts.org, the GreaseMonkey script repository, and rate them and leave comments.

About this article

written on
posted in TechnologyProgrammingGeolocationMapsWebOpen-SourceJavascriptHowtoGoogle Back to Top

About the Author

Andrew Turner is an advocate of open standards and open data. He is actively involved in many organizations developing and supporting open standards, including OpenStreetMap, Open Geospatial Consortium, Open Web Foundation, OSGeo, and the World Wide Web Consortium. He co-founded CrisisCommons, a community of volunteers that, in coordination with government agencies and disaster response groups, build technology tools to help people in need during and after a crisis such as an earthquake, tsunami, tornado, hurricane, flood, or wildfire.