Multimap logo Multimap Open API V1.2 Example

Browser Compatibility Example

The Multimap Open API relies on a set of JavaScript features being available within the map viewer. Because the lack of these features causes the viewer not to display correctly, a function has been made available that can be used to confirm whether the user's browser is compatible. This function is called MMIsSupportedBrowser() and returns true if the browser should be capable of viewing the map viewer.

If JavaScript is not enabled in a user's browser, the MMIsSupportedBrowser() function cannot run. In this circumstance, we would recommend the use of <noscript></noscript> tags. It is also worth noting that, if JavaScript is turned on but the browser is not supported, the browser is unlikely to support any more modern technologies such as the DOM, in which case the most basic JavaScript must be used.

The Multimap Open API now also allows you to show a static map to non-JavaScript users instead of a draggable map; for details, please see the the Static Maps "Fallback" example.

Function(s) introduced:

MMIsSupportedBrowser()

What You Should See

What you see on this page will vary depending on the browser that you use and whether or not JavaScript is turned on in your browser. If you view this in a compatible browser you should see a Multimap draggable map centered on Carrington Street, Sydney, Australia, at zoom factor 15.

The example uses a combination of <noscript></noscript> and JavaScript to handle incompatible browsers. It first uses JavaScript and the MMIsSupportedBrowser() function to determine if the browser is compatible. If not, a line of text is output using the document.write() method informing the user that the browser is not supported. Following this, <noscript></noscript> tags are used in case JavaScript is not enabled in the browser. Finally, MMIsSupportedBrowser() is used again to confirm that the browser is compatible in the onload function, to ensure that it is safe to try generating the map viewer.

If you are not using a compatible browser, but JavaScript is turned on, you should see this message:
"Sorry! Your browser is not supported by the Multimap Open API.". If JavaScript is turned off you should see the message: "Your browser does not appear to support JavaScript, or JavaScript is not turned on.".

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