Tag Archive for 'mapping api'

OS Grid References and the Multimap API (2)

var locations = new Array();

var xy1 = new MMPoint(523000,212324);  // OSTN97 OS National Grid
var xy2 = new MMPoint(323000,212324);
var xy3 = new MMPoint(423000,212324);

locations.push(xy1);
locations.push(xy2);
locations.push(xy3);

var funcRef = convertResultsLoaded;
var converter = new MMConverter( funcRef );
converter.convert(locations, 'osng');

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

A while ago I blogged about using OS Grid References in the Multimap API.  Web mapping developers in the UK often grew up with Ordnance Survey (OS) maps, are used to using the associated OS grid references (rather than lat/lon) to specifiy location and want to use them in mapping APIs.

Previously Multimap released a new feature in the API to allow developers to convert grid references to lat/lon for use in the API.  Multimap have a fantastic technical writing team and they have just released documentation on this feature (which is called Coordinate Transformation). 

The documentation on how to use the features in the Multimap JavaScript API is here and the documentation on how to use the features with the Multimap Web Services is here.

Thanks to Manu Gaur for this great documentation.

Happy coordinate transforming!

Love OS grid references but want web mapping?

If you are like me and grew up with Ordnance Survey maps you will have grid references ingrained in your spatial thinking and want to use them in you mapping API.  However the snag with global mapping sites and APIs (which they nearly all are now) you need to use a global projection system. for example if you are working on an application for the emergency services in the UK they will want to have a location given as a Grid Reference (Lat/Lon might as well be Greek).  So that leaves you a bit stumped?

The good news is that Multimap have recently released support for the conversion of British National Grid eastings and northings to latitudes and longitudes via the Multimap REST API.  This feature is so new it is not fully documented yet but Richard Keen’s blog has some further information and examples and there is more information on the Multimap Blog.