Multimap API V1.2 JavaScript Example
The Multimap API V1.2 JavaScript now uses localized language settings when displaying map information.
This example shows how you can adapt the Multimap API to different languages and geographic areas.
To do so, add a locale parameter in the <script> tag as shown below:
<script type="text/javascript" src="http://clients.multimap.com/API/maps/1.2/[API_KEY]?locale=[LOCALE_CODE]"></script>
For example, to display a map in German, add "locale=de-DE" to the <script> tag:
<script type="text/javascript" src="http://clients.multimap.com/API/maps/1.2/[API_KEY]?locale=de-DE"></script>
The locale parameter enables you to create different versions of the Multimap API
by specifying the relevant [LOCALE_CODE], which consists of a combination of the user's language and geographic area for:
To know more about the
locale parameter and to see a list of supported languages and regions,
please see the Locale
documentation.
If you view this in your browser you should see a draggable map centered on Holborn, London, Great Britain, at zoom factor 16.
On the right-hand side of the map is a Change Map Control Locale drop-down list of locales in which the mapping controls can be displayed. If you change the language to French (France) and click the Go button, the text of the controls displayed on the map (such as the Map Type Widget and Pan/Zoom Widget) changes to French.
However, the map and the copyright information are still displayed in the default English (United States) language.
|
|
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/[API_KEY]?locale=[LOCALE_CODE]"></script>
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/.
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 |