Multimap API V1.2 JavaScript Example
This example repeats the basic search example with multiple locations.
You should manage your table of addresses through Multimap's Client Zone extranet portal; for details of how to use this, please see Multimap's Client Zone documentation.
Our sample database of addresses in Great Britain contains the following records:
| client_id | name | street | town | pc |
|---|---|---|---|---|
| 46 | SS Great Britain | Gas Ferry Road | BRISTOL | BS1 6TY |
| 456 | National Gallery | Trafalgar Square | London | WC2N 5DN |
| 474 | Tower of London | Tower Hill | LONDON | EC3N 4AB |
| 526 | Liverpool Football Club & Stadium Tour | Anfield Road | LIVERPOOL | L4 0TH |
| 539 | Castle Rising Castle | KING'S LYNN | PE31 6AH |
Multimap stores each of these locations as a record in a table of addresses, with separate fields for name, street, town and postal (or ZIP) code: other fields (not shown in this example) contain each record's geographic coordinates, which have been geocoded by Multimap. Each record also contains a field called "client_id", which has a unique value.
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 the city of Bristol, UK, at zoom factor 15.
Links are provided to move the map to other locations in the same country (London, Liverpool and King's Lynn), each of which is automatically generated as a result of a separate request for a map, using the record's "client_id" field as a parameter.
|
|
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 API JavaScript code, please read the API documentation at: http://clients.multimap.com/share/documentation/api/1.2/classes/.
The Multimap API allows you to upload your store data via Multimap's Client Zone extranet and test it in a preview environment before making the data live. To view your preview data on a web page similar to this one, specify
<script type="text/javascript" src="http://preview.multimap.com/API/maps/1.2/demo">
instead of
<script type="text/javascript" src="http://clients.multimap.com/API/maps/1.2/demo">
in the <HEAD> section of your web page.
For further details of your preview and live environments, please see Multimap's Client Zone documentation.
If you require further help with your Multimap service implementation, additional Multimap services or general account enquiries, please contact Multimap:
| Sales: | +44 (0)20 7632 7800 |
| Customer Support: | +44 (0)20 7632 7777 |
| email: | mminform@microsoft.com |