Quantcast
Viewing all articles
Browse latest Browse all 2

New version of ‘getlibraries’ multi-library google map

Announcing a new version of the getlibraries script! This follows a similar pattern to the last version, and can be seen inaction here on the Herefordshire Libraries website.

On the info windows, you will now see a little blowup map of the library location, and an [edit] link which will take you directly into the silkworm directory and show you a page for that location.  Assuming you have a user login with the directory, you can edit anything that is wrong and it will be reflected in the map within moments.
Installation

  1. Download getlibraries version 2
  2. The text file simply contains the query, and you will need to pop your library’s identifier in there.
  3. The js file will need your Talis API key, and the path to getlibraries-v2-sparql.txt
  4. upload these to your server.
  5. Add a script tag in your html page with the getlibraries-v2.js as the src attribute.
  6. Remember that you need to have a google maps API key and a script tag pointing there as well – see http://www.google.com/apis/maps/.
  7. Add a div to your page with attribute id=”map”.  You will probably want to add a style attribute too with the width and height defined.

Most changes are behind the scenes, i.e. handling of single locations and handling of locations that have no geodata.

I’m indebted to Sam Tunnicliffe of Talis who informed me, after I posted about the last version, that they had just enabled a new JSON ouput option for the SPARQL endpoint, and also added a query_uri parameter so that long queries (like one of mine!) can be passed without bumping up against the maximum length restrictions of GET requests (see the docs..).  He has also troubleshooted a few teething troubles: mostly because of my unfamiliarity with the SPARQL language.

Technorati Tags: , , , , , ,


Viewing all articles
Browse latest Browse all 2

Trending Articles