Multimap Open API, Mashed Edition

June 20th, 2008

Last June a number of Multimap developers had a fantastic time at the BBC Yahoo! HackDay event, our own Andy Hume and ex-Multimapper Richard Rutter even won the award for “Most useful” hack.

This year we’re really excited to be one of the sponsors of the 2008 event, Mashed. We’ve taken the opportunity to refresh our free Open API offering in time for the event with some really cool additions. These include access to our REST APIs for geocoding, directions and POI search (including geo-tagged Wikipedia articles), high-resolution aerial and Bird’s Eye imagery from our friends at Microsoft Virtual Earth and lots more.

In the spirit of the event we’ve also been burning the midnight oil and, fingers crossed, will have a few last-minute goodies which we’ll link to from multimap.com/mashed08.

One such late addition is a transformation API for British National Grid Reference co-ordinates. We’ve noticed some of our Open API developers have geodata with grid references or eastings and northings which they’d like to convert to latitudes and longitudes to use with our JavaScript API. Although there are client-side conversion algorithms available we are able to provide a higher accuracy conversion server-side, taking into account the National Grid Transformation OSTN97 linear shifts.

Converting from British National Grid via the REST API

Our REST API supports single or multiple eastings (x) and northings (y) pairs or grid references and JSON, XML and KML output formats. The following examples convert two co-ordinate pairs and a grid reference:

JSON output: developer.multimap.com/API/convert/1.2/[apikey]?output=json&system=osng&x1=523000&y1=212324&x2=323000&y2=212324&grid3=NN166712

XML output: developer.multimap.com/API/convert/1.2/[apikey]?output=xml&system=osng&x1=523000&y1=212324&x2=323000&y2=212324&grid3=NN166712

KML output: developer.multimap.com/API/convert/1.2/[apikey]?output=kml&system=osng&x1=523000&y1=212324&x2=323000&y2=212324&grid3=NN166712

Converting from British National Grid via the JavaScript API

The JavaScript Open API provides a convenient wrapper to the REST API for client-side use. The MMConverter object will take an array of MMPoint objects, and via a callback mechanism returns an array of MMLocation objects, for example:

var locations = new Array();

locations.push(new MMPoint(523000,212324));  // OSTN97 OS National Grid co-ords
locations.push(new MMPoint(323000,212324));
locations.push(new MMPoint(423000,212324));

var funcRef = convertResultsLoaded;
var converter = new MMConverter( funcRef );
converter.convert(locations, ‘gb’);

function convertResultsLoaded() {
    console.log(converter.result_set);
}

Please feel free to come and find me or my colleagues at Mashed (look out for people wearing the fetching black Multimap t-shirts) if you have any questions about the Multimap or Virtual Earth APIs or location data and services in general.

Happy hacking!

  • Meta: permalink

Safari/NetNewsWire workflow

June 9th, 2007

My web browser usage is split between three applications, Safari for general browsing and reading (due to it’s excellent text rendering and look & feel), Firefox for development (due to the “can’t be productive without” Firebug and other developer tools) and NetNewsWire for quick reading of RSS feed articles and reliable session persistence for those pages that I really will read sometime soon, honest.

I use NetNewsWire for session persistence because, unlike Firefox, the implementation is incredibly solid and performance doesn’t seem to hit a wall when you have a stupidly large number of tabs open. The recently released NetNewsWire 3 has a lovely new Omniweb-esque tab style (page thumbnails in a scrollable right-hand column) which I find works really well for maintaining and scanning large numbers of stored pages in comparison to traditional tabs.

NetNewsWire has a ‘Open in Default Browser’ function which I often make use of, however I also often want to do the opposite, that is to dump the foreground Safari URL into NetNewsWire to persist it for later reading. I decided to have a quick excursion into AppleScript and try to script this “copy URL, switch to or start NetNewsWire, open new tab, paste URL” workflow. The script takes the front-most Safari URL (the current tab or window), adds this to NetNewsWire (it will be started in the background if not running) and confirms this via a Growl notification if you have Growl installed.

Here’s the script zipped up: safariaddtonnw.zip. This unzips to the file-name “Add front-most URL to NetNewsWire tabs”.

To use it, turn on the AppleScript menu using Applications → AppleScript → AppleScript Utility and check “Show Script Menu in menu bar”. I have “Show Library scripts” disabled to reduce clutter in the menu.

spacer

Switch to Safari, then go to the Script Menu → Open Scripts Folder → Open Safari Scripts Folder. Move the unzipped download into this folder, and you’re done.

spacer

To send a URL to NetNewsWire whilst in Safari, go to Script Menu → Add front-most URL to NetNewsWire tabs.

spacer

Please let me know if you have any problems with this, and feel free to modify it to fit your needs.

  • Meta: permalink

Multimap opens up its API

May 29th, 2007

I’m extremely pleased to report that Multimap has opened up its Javascript API to the general development community, to encourage innovation and experimentation on top of our best-of-breed draggable mapping, geocoding and routing services. We’re very proud of the breadth and depth of functionality available in the API, some highlights of which include:

  • Automatic de-cluttering and aggregation of markers
  • A full suite of customisable interface widgets, including a dynamic ‘where am I?’ location hierarchy, and customisable right-click context menus
  • Global high-quality geocoding
  • Multi-point and multi-modal (e.g., drive to here, then walk to here) routing with highway avoidance option

You can sign-up for a Multimap Open API key over here, or if you want to play with some demos, head over to the interactive documentation.

The Multimap API is fully supported through the Mapstraction abstraction library, so if you want to avoid coding directly to our API that option is available to you. Of course if you’ve developed against another API using Mapstraction, you’ve now got a new, feature-rich option available to you.

One feature of the Open API product that I’m particularly excited about is seamless integration of the grassroots Free the Postcode UK postcode database through our geocoding service, to supplement the partial postcode geocoding available through our TeleAtlas data.

I look forward to linking to some cool mash-ups and sites built on the Multimap Open API!

  • Meta: permalink

yahoo! hack day

May 27th, 2007

I’m really looking forward to attending the first Yahoo! Hack Day to be held in London, along with a few of my Multimap colleagues. It would be nice to do something non-mapping related for a change, but if you’re going along and are interested in hacking on the Multimap API’s mapping, geocoding, routing or spatial/non-spatial searching features, please drop me an e-mail on richard [dot] keen [at] gmail [dot] com or find me at the event. Can’t wait to see what people build!

  • Meta: permalink

hello

April 8th, 2007

The 10th anniversary of blogging seems as appropriate a time as any to finally start a blog myself. After a couple of incomplete attempts, due to over-ambition (the classic “write your own CMS syndrome”) and a long stretch of unrelenting day job work, I’m looking forward to writing about some work and personal projects, technology and life in general, and hopefully improving my writing!

  • Meta: permalink

gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.