Multimap Open API V1.2 Example
The Multimap Open API now allows you to geocode multiple addresses in a single geocoding request in order to show several locations on a single map. The feature is currently available only for postcodes in Great Britain.
The geocoder returns results in UTF-8 format. You should ensure that the encoding of your HTML page is set to UTF-8 using a header similar to the following:
<meta http-equiv="content-type" content="text/html;charset=UTF-8">
If you view this in your browser you should see a Multimap draggable map initially centered as a result of a geocoding request for an address in London, Great Britain, at zoom factor 14.
To the right of the map are three text boxes, each of which contains a full or partial UK postcode.
If you click on the Geocode button, the map viewer updates itself (and rescales itself, if necessary) to show up to three locations on a single map. Each location has a marker on which you can click in order to see an info box containing the location's postcode.
You can edit the contents of the text boxes and show various maps of many different locations: the example on this page allows you to submit up to three locations on a single map but you can adapt your own application to show as many as 20 separate locations.
|
|
|
There are three parts to the code below. The first is the line that links to the Multimap API. The second is an example of the HTML you must have in your page. The third is an example of the JavaScript required to implement the page.
<script type="text/javascript" src="http://clients.multimap.com/API/maps/1.2/demo"></script>
Sorry, JavaScript required...
Sorry, JavaScript required...
Sorry, JavaScript required...
For more information on the subject of Multimap Open API JavaScript code, please read the Multimap Open API documentation at: http://www.multimap.com/share/documentation/openapi/1.2/classes/.
If you require further help with your Multimap Open API implementation, please visit the Multimap Developer Forums.
For Open API news, announcements and other information, please see our blog.
For general account enquiries or further services, please contact the Multimap Sales team:
| London, Great Britain | +44 (0)20 7632 7800 |
| email: | sales@multimap.com |