Multimap API V1.2 JavaScript Example
This example shows how to use the API's optional Local Information module to add a fully-functional Local Information Widget to your map so that the API can show points of interest of various types within the bounds of a map.
You can place a Local Information Widget on your map among other types of widget, as described in the Widgets example.
The appearance of widgets is set with a style sheet; this example shows widgets in the Multimap style, but these can be changed to whatever appearance is desired by changing the style sheet. For more information on this, please see the Advanced Widgets example.
Your applications can overlay the widget on top of your maps or, if you prefer, you can place it in a separate DOM container. This might be useful, for example, if you wish to maintain the clarity of your maps by avoiding covering them with many widgets simultaneously. This example demonstrates widgets both on and off the map.
If you view this in your browser you should see a Multimap draggable map centered on Fleet Street, London, Great Britain.
On the right-hand side of the map is a list of controls which determine the appearance and behavior of the Local Information Widget.
If you click any of the top five controls to the right of the map, you should see a list of different types of point of interest appear. Depending on which link you select, you can control whether the widget:
By checking the links in the lower list, you can:
If you right-click anywhere on the map the Context Menu appears, allowing you to zoom in, zoom out or re-center the map.
|
|
Select options for the Local Information Widget:
Inside map viewer Modify the Local Information Widget:
Stop widget updating |
Outside widgets will be placed here...
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 the JavaScript functions that are called by the links in this 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...
Sorry, JavaScript required...
For more information on the subject of Multimap API JavaScript code, please read the API documentation at: http://www.multimap.com/share/documentation/api/1.2/classes/.
If you require further help with your map API implementation, please contact the Multimap Customer Support team:
| Australia, Sydney | + 61 (0) 2 9262 6551 |
| Great Britain, London | +44 (0)20 7632 7777 |
| United States, Boston | + 1 617 423 4510 |
| email: | info@multimap.com |
For general account enquiries or further services, please contact the Multimap Sales team:
| Australia, Sydney | + 61 (0) 2 9262 6551 |
| Great Britain, London | +44 (0)20 7632 7800 |
| United States, Boston | + 1 617 423 4510 |
| email: | sales@multimap.com |