Multimap Open API V1.2 Example
The Multimap Open API now allows you to control every aspect of your application's appearance and behavior when users interact with it. It replaces older features that controlled panning, zooming and dragging a map.
Controls and settings are available which allow you to determine the behavior of your map when a user performs various actions with a keyboard, mouse or both. It also controls which options are visible on the Context Menu (which appears when a user right-clicks on the map area) and determines whether units of distance are shown on the map in miles (and yards) or kilometers (and meters).
MultimapViewer: getOption(), setOptions()
If you view this in your browser you should see a Multimap draggable map centered on Saint James Avenue, Boston, Massachusetts, USA, at zoom factor 15.
Clicking on this drop-down lists selects the kind of action for which you wish to specify an effect to take place when the user performs an action such as double-clicking, right-clicking, scrolling the mousewheel (while the mouse's pointer has the map's focus) or dragging the map, possibly in accordance with a key such as Ctrl, Shift or Alt.
This list also include several settings which control the options that are visible in the Context Menu, whether or not the 'smooth panning' and 'smooth zooming' methods are switched on and whether the API displays metric or Imperial units.
Clicking on this list determines the effect that the action selected in the first drop-down list will have, or the setting that will change, when you press the "Change option" button.
Important Notes:
Clicking on this option displays all the default settings supplied in the Multimap Open API for the controls that this example describes and restores all actions and affordances to the settings that they had when the page was first opened.
|
|
|
There are three parts to the code below. The first is the line that links to the Multimap Open 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://developer.multimap.com/API/maps/1.2/OA08061815803962482"></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: | mminform@microsoft.com |