About Bookmarks Contact Library Map Photos Search Talks
August
18
2006
12:32 pm
Tags:
Post Meta :

I have created a Library 2.0 mashup (for TALIS competition) using data from http://visityourlibrary.net, and thealbertalibrary.ab.ca using the Google Maps API. I call this mashup LibraryMapApp. It is a javascript library that makes it easier to search for and display libraries using the google maps API. I have also created a working demostration of LibraryMapApp using data from the websites mentioned above.
The application can be viewed at http://paranoidagnostic.net/map/

This application will allow you to search for libraries of all sorts in Alberta, Canada. The data was geocoded using Google Maps. Unfortunately the data I got form visityourlibrary.net was not that accurate. I have subsequently created a geocoding helper which can be seen at http://paranoidagnostic.net/map/geocode.html. The Geocoder Helper, allows you to search for an address, enter in extra information about the location (name, homepage etc.), and finally you can zoom and get fine positioning of the latitude and longitude.

The data from the geocoder helper has not yet made it into my “Find a Library in Alberta” demonstration. However, there are a team of intreprid librarians working on that right now (thanks Anne!).

The source code for all of this is available under the GPL 2.0 license and can be downloaded from http://paranoidagnostic.net/map/libmapapp.zip

Forgive, the scanty details right now (tired, need sleep). The basic usage of LibraryMapApp is like this:

  1. Create an HTML file with three divs: one for a map, one for map details, one for a search box
  2. In the head of the script include your Google Map API script with your API key
  3. In the head of the script include ablibapp.js
  4. Write a function called “load()” that will create a new LibraryMapApp and load data for the libraries you wish to search and display. In my case I just put the all in a javascript file.
  5. Library data is just a JSON object with the following properities (at a minimum)
  1. id
  2. name
  3. address
  4. phone
  5. homepage
  6. lat (latitude… the included geocoder helper can help get this)
  7. lng (longitude)

This first version needs much improvement. I have data for each library that identifies its type (public, academic, special, government, health etc.) and its “zone” (what region of the province it is from). The next version of LibraryMapApp will allow libraries to be grouped together, each with a different icon color and the ability to search within groups or to search all groups but have them displayed differently (so public libraries might show up with green markers, and academic with blue).

The API also needs to be reworked from the ground up to make it more re-usable. This is a good first step, but it counts more as an exercise than real API.