Multimap XML Location Map Version 1.0 Implementation Guidelines / Software Development Kit (SDK)
This document is for developers and webmasters implementing the Multimap's XML Location Map service.
This document explains how to set up and use Multimap's XML Location Map service; it assumes that you have a good working knowledge of XML, DTDs and are familiar with the basic features and scope of Multimap's XML Location Map service.
We assume you have a Multimap service client account for your XML Location Map service. If you do not, please contact your Multimap account manager or the Multimap Sales team for your account information, or free trial account and password.
This document explains how to set up the Multimap XML Location Map service and provides implementation guidelines on how to incorporate Multimap's services into your own website or services. We do not suggest how you design your own web pages. Please see Multimap's online documentation for guidelines on using Multimap Document Type Definitions (DTDs).
Please note that the maps and data used to provide Multimap services represent copyrighted information, which is owned by our data partners. Do not copy, store, cache, or manipulate in any way any of the maps generated by Multimap services. Any violation of this instruction could result in the cancellation of your service.
Please ensure that every web page that you use to provide a Multimap service for your users maintains a link to Multimap's Terms and Conditions of Use of map images and data.
Please note you may use geocoding provided by Multimap only as part of a Multimap service. If you use the geocoded information for any application other than Multimap's, additional charges apply. The fee charged is based on the data used and the number of addresses geocoded. This limitation is necessary owing to the contractual requirements of our data partners.
If you have a Multimap service that includes records for stores located in the People's Republic of China (PRC) that have been geocoded to street level, please see Multimap's Client Zone documentation.
Multimap's XML Location Map service is generally used to show the location of one or more sites, such as stores, shops, properties, hotels or dealerships on a map. It includes features that let users navigate north, south, east and west (known as panning) and zoom in and out. The XML Location Map service also provides traffic reports of the number of deliveries of maps this service provides.
Multimap provides maps of most of the world, although map coverage varies by country and region.
We currently provide street-level mapping and geocoding for over 35 countries which are listed below. This list is not exhaustive and is being continually updated as new countries are added. If required, please contact your account manager for the latest update. If you discover that you are not able to search for streets in a country, please contact your Multimap account manager. Your account may need to be activated to access that country.
| Australia | Finland* | Macedonia* | Serbia* |
| Austria* | France* | Moldova* | Singapore |
| Belarus* | Germany* | Montenegro* | Slovakia* |
| Belgium* | Great Britain and Northern Ireland (UK)* | Netherlands* | Slovenia* |
| Bosnia and Herzegovina* | Greece* | New Zealand | Spain* |
| Canada* | Hungary* | Norway* | Sweden* |
| Croatia* | Italy | Poland* | Switzerland* |
| Czech Republic* | Latvia* | Portugal* | Ukraine* |
| Denmark* | Lithuania* | Republic of Ireland* | United States |
| Estonia* | Luxembourg* | Romania* |
Countries indicated with an asterisk (*) in this list are included in Multimap's 'pan-European' coverage option.
If the country you are interested in is not listed, it does not necessarily mean it is not covered. Additional countries are being added to this service all the time, so please ask your Multimap account manager for an up-to-date list of countries.
Where street-level maps do not cover an entire country, these are the locations for which street-level maps are available:
| Country | Cities covered |
|---|---|
| Egypt | Cairo |
| Greece | Athens |
| Ireland (Republic of) | Dublin, Cork, Galway, Waterford, Limerick, Arklow, Athlone, Bray, Carlow, Clondalkin, Drogheda, Dundalk, Greystones, Kildare, Kilkenny, Killarney, Leixlip, Maynooth, Mullingar, Naas, Navan, Newbridge, Portlaoise, Portmarnock, Skerries, Sligo, Swords, Tralee, Wexford |
| Kuwait | Kuwait City |
| Lebanon | Beirut |
| Malaysia | Western coast of peninsular Malaysia |
| Oman | Masqat, Suhar, Al Uwaynat, As Sahm, Sur |
| Poland | Warsaw (and outskirts), Wroclaw, Gdansk, Szczecin, Poznan, Katowice, Krakow |
| Qatar | Al Dawah |
| Romania | Bucharest |
| Saudi Arabia | Az Zahran, Ar Riyad, Mecca, Jiddah, Medina |
| South Africa | Johannesburg |
| Taiwan | Taipei |
| Thailand | Bangkok, Chiang Mai, Pattaya, Phuket |
| Turkey | Istanbul, Ankara and coastal tourist areas |
| United Arab Emirates | Abu Dhabi |
Multimap's geocoding is currently accurate to street level in the following countries:
| Australia | Germany | Norway | United States |
| Austria | Great Britain | Portugal | |
| Belgium | Ireland | Singapore | |
| Canada | Italy | Spain | |
| Czech Republic | Luxembourg | Sweden | |
| Denmark | Malaysia | Switzerland | |
| Finland | Netherlands | Thailand | |
| France | New Zealand | Turkey |
| Great Britain | In Great Britain, more precise results are often achievable with postcode searches than with street searches. Multimap does not currently offer street-level maps for the Channel Islands or the Isle of Man. Geocoding is possible to street level in Northern Ireland, but street-level maps are available only for Belfast. |
| Ireland | Dublin, Cork, Galway, Waterford, Limerick, Arklow, Athlone, Bray, Carlow, Clondalkin, Drogheda, Dundalk, Greystones, Kildare, Kilkenny, Killarney, Leixlip, Maynooth, Mullingar, Naas, Navan, Newbridge, Portlaoise, Portmarnock, Skerries, Sligo, Swords, Tralee, Wexford |
| Malaysia | Major population areas |
| Thailand | Major population areas |
| Turkey | Istanbul, Ankara and coastal or tourist areas |
Multimap provides the XML Location Map service as an XML feed which you can implement on your own website. To show a map of one or more locations in your Multimap table of addresses, geocode your addresses with the Multimap geocoding engine. Your service can then request the map using your unique identifier of each location record. This is achieved by adding a parameter to the HTTP request called "f_client_id", which instructs our software to filter the data in your table of addresses on a field that contains a unique value for each record. Alternatively, you can request a map to show a location by its geographic coordinates; for details, please see the Example map using coordinates.
The XML Location Map service is made up of an HTTP request to Multimap's browse.cgi program, which shows results on a map. Typically, a user enters a unique record identifier or set of coordinates and this generates a request to browse.cgi. On receipt of this request by browse.cgi, Multimap responds with the MultimapPresentation XML document. Please see the section on Invoking Display Results (browse.cgi) for a full description of how this works. For an illustration of this typical successful case, please see the typical case diagram. This diagram shows the request response cycle that occurs in a typical case of a user searching for a map with a unique record identifier or set of coordinates and achieving a successful result.
Client Zone acts as a password-protected extranet portal which lets you view and manage your Multimap services. Specifically, Client Zone lets you:
For details on logging in to Client Zone, please see Multimap's Client Zone documentation.
To present your stores or assets accurately on a map, Multimap must first geocode your table of addresses. This involves comparing the addresses of your stores with our extensive database of addresses and locations, and generating longitude and latitude values for each store address. For details, please see Multimap's Client Zone documentation.
The success of geocoding depends on the structure of your table of addresses. The information required for geocoding to street level is street, town, postal code and country.
Geocoding of addresses in countries can be accurate to building number, or to the segment of the street on which the address is located. Where we are not able to geocode addresses to the street segment, we geocode them to a nominal street midpoint.
First we try to match the full postcode in the pc field against the most up-to-date postcode database. If the postcode is not matched, we use the street and town, if they exist and are in your table of addresses. If building numbers are supplied along with street name, we use the numbers to locate the building as precisely as possible within the correct street segment.
In countries other than those listed in the section on Geographic Coverage, we geocode addresses to town level. The fields required for geocoding are town and country. For example, if you have an address in Nairobi, Kenya, our geocoding tools assign the record the coordinates of the nominal center of that city.
This section describes how to integrate the XML Location Map service with your own website.
These are the stages in setting up store data for your XML Location Map service:
These topics are covered in detail in Multimap's Client Zone documentation.
To request a location from your database in Client Zone, identify that location in an HTTP request by specifying in a URL a database field that identifies that location uniquely. The default field in your table of addresses for requesting a map is client_id and is reserved for the unique identifying field of each record on your database, such as the unique code of a property, a directory listing, a store, dealer, stockist, hotel or guesthouse. Ensure that you include the parameter f_client_id in your HTTP request.
Please note that this parameter is case-sensitive, so that the value that you supply in your URL must match your template. Additionally, this field must always contain data and should never have a NULL value.
Here is an example of a table used in Client Zone to create coordinates from an address:
| client_id | name | street | town | statey | pc | country |
|---|---|---|---|---|---|---|
| 331578 | City Hotel | Carrington Street | Sydney | NSW | 2000 | Australia |
| 275175 | Central Hotel | Wall Street | New York | NY | 10038 | United States |
To request the map of a specific location, include the unique identifier f_client_id as a parameter in an HTTP request:
http://classic.multimap.com/clients/browse.cgi?client=[clientname]&f_client_id=331578
If you have subscribed to the Secure version of the service, replace http in
the URL with https:
https://classic.multimap.com/clients/browse.cgi?client=[clientname]&f_client_id=331578
If you know the coordinates for your location, the URL to show a map would resemble:
http://classic.multimap.com/clients/browse.cgi?client=[clientname]&lon=2.3552&lat=48.8606
Longitude and latitude coordinates need to be stated as decimal degrees (not degrees, minutes and seconds). Please note that longitudes east of the Greenwich Meridian have negative values, as do latitudes south of the Equator, for example:
| Southern Hemisphere | Northern Hemisphere | |
|---|---|---|
| Latitude | -31.8895 | 48.8606 |
| Longitude | 116.0608 | 2.3552 |
By using coordinates it is possible to show a map of any location regardless of whether you have uploaded it as a store record in your table of addresses in Client Zone.
The HTTP request determines where the web page should look for the map image. It is made up of two parts:
name=value pairs which tell the software what your service client name is and which location you are looking for.If, for any reason, your XML implementation is not configured for the domain classic.multimap.com, your HTTP client library must be configured to follow 301 Permanent Redirects. If you are making HTTP POST requests, you must ensure that your implementation refers to classic.multimap.com, since your HTTP client library will not follow redirects.
Here are some more examples:
| Street-level map of a location in Lyon, France | http://classic.multimap.com/clients/browse.cgi? client=[clientname]&lon=4.8342&lat=45.7679&scale=5000 |
| City-level map of Canberra, Australia | http://classic.multimap.com/clients/browse.cgi? client=[clientname]&lon=149.0414&lat=-35.3514&scale=100000 |
| National map of Switzerland, specifying the map's size | http://classic.multimap.com/clients/browse.cgi? client=[clientname]&lat=46.625&lon=8.0848&width=200 &height=200&scale=10000000&scale=100000 |
Both height and width can be any integer between 200 and 900; a map any smaller than this cannot clearly display the copyright message that we are legally required to include.
A full list of XML Location Map's URL parameters and their explanations is given below:
| Name | Description | Permissible Values | Example |
|---|---|---|---|
| client | Client identifier | Client Zone service client name | client=[clientname] |
| width | Map width in pixels | Any integer > 200 | width=300 |
| height | Map height in pixels | Any positive integer | height=250 |
| scale | Map scale | This parameter specifies as an integer the scale at which to draw a map. Please see Multimap's online documentation for a list of permissible map scale values for Multimap products. Some countries are not available at all scales. Please check with your Multimap account manager if you find you are unable to access maps at the scale you require. | scale=50000 |
| f_ | client_id prefix | Name of any unique field in your table of addresses, prefixed with "f_" | f_client_id=331578 |
| lon | Longitude | Any decimal between -180 and 180 | lon=-2.295 |
| lat | Latitude | Any decimal between -90 and 90 | lat=48.86 |
| lllist | List of longitude and latitude pairs | Comma-separated list of longitudes and latitudes Please note that, with this parameter, you must specify longitude before latitude in each pair of coordinates. | lllist= |
| X,Y | Coordinates of a point on which to center a map when panning or zooming it (These parameters must be in upper case.) | Any pair of coordinates for which a map is available | X=500000&Y=150000 |
| coordsys | Specifies the coordinate system to use with X and Y coordinates when panning or zooming a map. | "mercator" (outside Great Britain) "gb" (Great Britain only) | coordsys=mercator |
Use HTTP requests to execute Multimap's browse.cgi program to display results. Invoke browse.cgi by directing requests to:
http://classic.multimap.com/clients/browse.cgi
The browse.cgi application lets users:
The browse.cgi searching features are delivered to your systems in an XML document called MultimapPresentation. This document contains two main objects within the body of the root element:
At least one mapData object gives details of the size, shape, coordinates and URL for a map. The tree structure of the mapData object is described below:

The locationData object may contain geocoded address information, such as the locations of vehicles and other tracked assets, which can be overlaid on the map.

Here is an example of a URL requesting details of a location in Sydney, Australia:
http://classic.multimap.com/clients/browse.cgi?client=[clientname]
&f_client_id=AU01&scale=10000
The URL returns the following response:
<?xml version="1.0" encoding="iso-8859-1" ?> <MultimapPresentation version="2.2" client="[clientname]"> <mapData name="main"> <imageUrl type="gif" width="500" height="300">http://classic.multimap.com/clients/gif.cgi? &client=[clientname] &file=b6M67332Y-15954S10W500H300.gif&units=&lang= &pdel_id=200702273717901178&service_seq=14164</imageUrl> <mapScales current="10000"> <validScale>5000</validScale> <validScale>10000</validScale> <validScale>25000</validScale> <validScale>50000</validScale> <validScale>100000</validScale> <validScale>200000</validScale> <validScale>500000</validScale> <validScale>1000000</validScale> <validScale>2000000</validScale> <validScale>4000000</validScale> <validScale>10000000</validScale> <validScale>20000000</validScale> <validScale>40000000</validScale> </mapScales> <mapExtent system="mercator" units="m" xmin="16832176" xmax="16833824" ymin="-3988994" ymax="-3988005" /> <centrePoint> <coordinate system="mercator" units="m" x="16833000" y="-3988500" /> </centrePoint> <circlePoint> <pinPosition visibility="hidden" xpix="0" ypix="0" /> <coordinate system="mercator" units="m" x="" y="" /> </circlePoint> <copyrightInfo> <conditions> <para /> <infoUrl/> http://clients.multimap.com/about/legal_and_copyright/</infoUrl> <logoUrl /> </conditions> </copyrightInfo> <multimapTerms>Powered by Multimap.com: online maps to everywhere</multimapTerms> </mapData> <locationData type="storefinder"> <locationCount>1</locationCount> <location id="1"> <record> <param name="client_id">AU01</param> <param name="name">Australian Museum</param> <param name="street">6 College Street</param> <param name="town">Sydney</param> <param name="pc">2010</param> <param name="state">NSW</param> <param name="country">AU</param> <param name="telephone">+612 9320 6000</param> <param name="fax" /> <param name="email" /> <param name="url" /> <param name="id">1</param> <param name="GeoQuality">2b</param> <param name="GeocodeDate">2007-02-13</param> <param name="GeocodeSource">AU0441</param> <param name="lon">151.212400</param> <param name="lat">-33.875300</param> <param name="xpix">215</param> <param name="ypix">75</param> <param name="pix_visible">visible</param> <param name="CurrentRecord">1</param> </record> <locationPoint> <pinPosition visibility="visible" xpix="215" ypix="75" /> <coordinate system="mercator" units="m" x="" y="" /> </locationPoint> </location> </locationData> </MultimapPresentation>
| Code | Notes |
|---|---|
<?xml version="1.0" encoding="iso-8859-1" ?> |
The XML declaration contains a reference to the MultimapPresentation DTD, which is hosted by Multimap. |
<MultimapPresentation version="2.2" client="[clientname]"> |
The root element shows the version of MultimapPresentation used by your XML Location Map service and the service client name provided by your Multimap account manager. You can use this DTD to validate the documents that Multimap returns. |
<mapData name="main"> |
One mapData object occurs for each map within the document. Although it is usual to have only one map per document, you can show more than one map if your system demands it or if you would like it. You can use the name attribute to uniquely distinguish this map from others. Please discuss this with your Multimap account manager. |
<imageUrl type="gif" width="500" |
The imageUrl element contains the URL of the map image hosted on Multimap servers.The width and height attributes show the dimensions of the map.The type attribute shows the format specified in the imageURL element which is currently "gif". |
<mapScales current="10000"> | The mapScales element shows all available map scales. The current attribute indicates which of the scales is currently on display. |
<mapExtent system="mercator" |
The mapExtent element describes the coordinates of the four corners of the map by way of the attributes xmin, xmax, ymin and ymax.In this example, the coordinate system attribute is set to "mercator" and the units attribute is set to "m" (and so measures meters). |
<centrePoint> |
The centrePoint element uses its child element, coordinate system, to describe the center of the map.The coordinate system element contains the units and x and y attributes. |
<circlePoint> |
The circlePoint element refers to the default red circle or other icon that identifies the position on the map of the search location.The visibility attribute of the pinPosition element shows as "hidden" when the coordinates of an individual location (contained in the mapExtent element), fall outside the limits of the map, for example, after you pan the map away from that location.When the visibility attribute of the pinPosition element is set to "visible", the xpix and ypix attributes specify the position at which your client application should place its icon on the map. Their values refer to the number of pixels between the top left of the map and the top left of the icon on your map.You can have your client application change the values of these attributes to adjust your icon's position. For example, if you wish to center an icon that is 20 pixels wide by 16 pixels high over your location, you should subtract exactly half the width of the icon from the xpix (10) and half the height of the icon from the ypix (8).
|
<copyrightInfo /> |
The copyrightInfo element contains the map data providers' copyright-notice-text in the para child element. The infoUrl child element contains a link to a Multimap page that shows the full terms and conditions of map and data use. The logoUrl parameter may contain a link to a logo.If a map is presented on your website, all copyright text must be reproduced and be visible near to where the map is displayed. |
<multimapTerms>Powered by Multimap.com: online maps to everywhere</multimapTerms> |
The multimapTerms element contains Multimap promotional text. It is optional to include this text, but if it is present, then it must be made visible close to the map displayed on your web page. |
<mapData> |
The mapData object closes here. |
<locationData type="storefinder"> |
The locationData object opens here and closes at </locationData>. |
<location id="1"> |
The locationData object contains a record which has a unique identifier. |
<record> |
The record element shows populated name=value pairs that are contained in your table of addresses.pix_visible, xpix and ypix are repetitions of data found in the earlier pinPosition element.
A value of "visible" for the pix_visible element specifies that your icon should appear on the map. |
<locationPoint> |
The locationPoint element gives the physical and pixel coordinates of the location in the same terms as the circlePoint element. |
You can pan a map north, south, east or west or zoom in and out by re-invoking browse.cgi against an existing XML response.
To pan across a map that has been generated from an XML response, have your software:
mapExtent element(s) and inserting it as a parameter in the new URL.mapExtent element(s) as its centrePoint x or centrePoint y value (or both, in the case of diagonal panning).| Panning north | Take the current response's northernmost mapExtent element (ymax) and use that to generate the new centrePoint y value, keeping the existing centrePoint x value. |
| Panning south | Take the current response's southernmost mapExtent element (ymin) and use that to generate the new centrePoint y value, keeping the existing centrePoint x value. |
| Panning east | Take the current response's easternmost mapExtent element (xmax) and use that to generate the new centrePoint x value, keeping the existing centrePoint y value. |
| Panning west | Take the current response's westernmost mapExtent element (xmin) and use that to generate the new centrePoint x value, keeping the existing centrePoint y value. |
Please note that subsequent URLs use the upper-case internal parameters X and Y instead of lon and lat parameters, together with the appropriate coordsys parameter. This parameter gains its value from the original XML response, and should not be changed from:
Although Multimap's XML responses generate centrePoint x and centrePoint y coordinates in lower case, you must convert them to upper case when including them as parameters in a URL.
Here is an XML response for a location in Perth, Western Australia:
<mapExtent system="mercator" units="m"
xmin="12859653.4879706" xmax="12940347.4879706"
ymin="-3761708.52286029" ymax="-3713292.52286029" />
<centrePoint><coordinate system="mercator" units="m"
x="12900000.4879706" y="-3737500.52286029" /></centrePoint>
which can be used to generate a new URL that pans south:
http://classic.multimap.com/clients/browse.cgi?client=[clientname]
&coordsys=mercator&X=12900000.4879706&Y=-3761708.52286029
To pan again, this time to the east, take the coordinates from the second XML response
<mapExtent system="mercator" units="m" >
xmin="12859552.4879706" xmax="12940449.4879706"
ymin="-3786769.52286029" ymax="-3738231.52286029" />
<centrePoint><coordinate system="mercator" units="m"
x="12900000.4879706" y="-3762500.52286029" /></centrePoint>
to generate a further URL that pans east:
http://classic.multimap.com/clients/browse.cgi?client=[clientname]
&coordsys=mercator&X=12940449.4879706&Y=-3762500.52286029
A response for a location in Great Britain contains the data
<mapExtent system="gb" units="m"
xmin="523422.687257467" xmax="536579.687257467"
ymin="176053.911348558" ymax="183947.911348558" />
<centrePoint><coordinate system="gb" units="m"
x="530000.687257467" y="180000.911348558" /> </centrePoint>
which can be used to generate a new URL that pans west:
http://classic.multimap.com/clients/browse.cgi?client=[clientname]
&coordsys=gb&X=523422.687257467&Y=180000.911348558
To zoom in or out, have your software create a new browse.cgi request that supplies a different scale parameter. For example, a response that contains the data
<browseURL>browse.cgi?client=[clientname]
&GridE=-80.19356&GridN=25.77327
&lon=-80.19356&lat=25.77327&place=MIAMI,+FL,+33131
&db=US&scale=4000000</browseURL>
can be used to generate a new URL for a map of a different scale:
http://classic.multimap.com/clients/browse.cgi?client=[clientname]
&GridE=-80.19356&GridN=25.77327&lon=-80.19356&lat=25.77327
&place=MIAMI,+FL,+33131&db=US&scale=200000
Please see Multimap's online documentation for a list of permissible map scale values for Multimap products.
If you would like to show more than one location on your map, supply a URL that contains a list of either client_id fields or coordinates. The map scales automatically to show all your locations; if you wish to specify a scale, use the scale parameter. If a map shows multiple locations, your users can click on any of those icons to display a new map centered on that location at a scale of 1:10,000. Users can also use the controls on the template to pan north, south, east or west or to zoom in and out.
f_client_idTo display multiple geocoded locations on a map, concatenate the client_id fields of the records you want to show in a comma-separated list:
http://classic.multimap.com/clients/browse.cgi?client=[clientname]&f_client_id=01,02,03,04
Show multiple locations on a single map by concatenating all coordinates in the lllist parameter. This parameter supplies coordinates in a list of lon,lat pairs:
Test any changes you make to your data in your preview environment by accessing your Multimap services from your browser, using HTTP requests such as:
http://preview.multimap.com/clients/browse.cgi?client=[clientname]&f_client_id=AU01
http://preview.multimap.com/clients/browse.cgi?client=[clientname]&lon=-71.0765&lat=42.3492
To view the active data in your live environment, use HTTP requests such as:
http://www.multimap.com/clients/browse.cgi?client=[clientname]&f_client_id=AU01
http://www.multimap.com/clients/browse.cgi?client=[clientname]&lon=-71.0765&lat=42.3492
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 |