Multimap logo Multimap Open API V1.2 Example

Pan Limiting Example

Although the ability to drag maps with a mouse is a core feature of the Multimap Open API, you may wish to disable this feature in your own applications. This example gives a demonstration of how you can use the Multimap Open API to limit the areas to which a user can pan.

Events used:

moveMap

What You Should See

If you view this in your browser you should see a Multimap draggable map centered on Fleet Street, London, Great Britain, at zoom factor 10. The map viewer has been set up to limit all types of panning to a rectangular area around the M25 motorway which encircles London. Regardless of which method is used to pan the map, the map does not allow the user to pan far outside the M25.

The Map

The Code

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.

The header code

<script type="text/javascript" src="http://developer.multimap.com/API/maps/1.2/OA08061815803962482"></script>

The body code

Sorry, JavaScript required...

The JavaScript code

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/.

Back to examples.

Further Help

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 enquiries about further Multimap services, please contact the Multimap Sales team:

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