status

location
Washington, DC
Subscribe to GeoRSS Subscribe to KML


GreaseRoute – Mapping the web

Published in Geolocation, Google, Howto, Javascript, Maps, Open-Source, Programming, Technology, 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:

<div class="adr">
 <div class="street-address">1517 N. Main St.</div>
 <div class="extended-address">Box 203</div>
 <span class="locality">Royal Oak</span>,
 <span class="region">MI</span>
 <span class="postal-code">48067</span>
 <div class="country-name">US</div>
</div>

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.

Similar Posts

Comments are closed.