Adding Location to Your Web Site

In the previous section you learned how to build some maps. You probably now have a neat map, with pop-up bubbles and all describing some of your favorite locations. However, just placing a map into a site can make it feel like an add-on, rather than an integral part of your web site.

It is more useful to integrate location and maps into your web site, dynamically adding locations based on the content of a blog post, the location of visitors to the site, or based on aggregated data from other sources.

In this section we will present some of the tools and techniques for integrating neogeography into your site. Once you add location to your site, users can then find your web site based on geographic location (e.g., a web site for a store). Services like GeoURL (http://geourl.org) and A2B (http://a2b.cc) maintain a directory of web sites based on their specified location.

Also, GeoTagThings (http://geotagthings.com) is another site that stores user-specified locations of web sites. Using a browser bookmarklet, you can quickly associate any web page with a location. A bookmarklet is a small JavaScript bookmark that you can add to your browser's bookmark list or bar and then click to activate some functionality. In this case, you will be taken to a form to locate the page on GeoTagThings.

Location of a Page

The first thing you may want to do is to mark the location of an entire page. The <meta> tags in the HTML area can be used for specifying the location. ...

Get Introduction to Neogeography now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.