API Enhancement brings geotagging to search results

Geotags for search results are now being returned in the Search Records API. We're still updating the docs, but the field is called geo_co_ords and it returns a semicolon-separated list of lat,lng pairs.

This means you can finally create awesome google maps of locomotives with the DigitalNZ API.

You can even jump to a street view (drag the small orange humanoid from the top left onto the map pin) and see how things have changed.

But perhaps the most exciting thing is that You can geotag any image on DigitalNZ and have it appear on the map moments later. Try this:

  • start with a subject you love, let's say lighthouses. Everyone loves lighthouses.
  • click the Geotagged: No filter. This will show all the non-geotagged images of lighthouses in DigitalNZ, as thumbnails.
  • scroll through the list until you see find an image that you think you could place on a map.
  • click the small map pin in the bottom right of the image. You might like to try this lighthouse at Tairoa Head. Scroll down the page and click the Add a Location tab above the map.
  • sign in (or register: it's quick and painless and you know you can trust us not to spam you).
  • zoom in on the map to where you think the image belongs (the mouse scroll wheel can help), and click where you want to place the pin. Click Save to save the location.

When you return to the lighthouses map a few minutes later, you should see a clickable pin where you placed your lighthouse image. Take a moment to appreciate that feeling of having made the world a better place.

To build something yourself with the DigitalNZ API and google maps, view source on any of my map pages to see the javascript and see the Google Maps API documentation for details.

Elliott Young
DigitalNZ Tech Lead