Building Links to MSN Maps & Directions Maps

On This Page
IntroductionIntroduction
Building URLsBuilding URLs
Finding an Address or PlaceFinding an Address or Place
Getting Driving DirectionsGetting Driving Directions
Appendix A: Values for the Parameters cnty1 and cnty2Appendix A: Values for the Parameters cnty1 and cnty2
Appendix B: Domain Names for International SitesAppendix B: Domain Names for International Sites
Appendix C: Unicode ValuesAppendix C: Unicode Values

Introduction

MSN Maps & Directions is one of the most popular mapping sites on the Internet, providing street-level maps and driving directions for addresses in Australia, Brazil, North America, and most of Europe, and maps for places throughout the rest of the world.

With this release of MSN Maps & Directions, you can build URLs that link to MSN Maps & Directions to incorporate the power of location-based services into your Web site or application. For example, you can build a URL that specifies your location as an end point, so that your customers can supply a starting address and receive a map and driving directions to your location. Or you might want to publish a link on your company's intranet site that shows employees the location of a meeting or conference. Linking to MSN Maps & Directions maps is ideal for small-to-medium sized organizations that are not ready to invest in a full-blown location-based solution.

This article describes how to build URLs that link to MSN Maps & Directions maps and provides example URLs that you can use as templates.

Top of pageTop of page

Building URLs

You can create URLs that return MSN Maps & Directions maps in the following ways:

By providing a street address or place name.

By providing the latitude and longitude for a location.

By providing a starting point, an end point, or both, to get a map and driving directions.

URL Syntax

Each URL begins with a prefix consisting of a domain name and page name. The prefix is followed by a number of parameters that define the location (or locations) to be displayed on the map.

The following example shows a URL for a named place called University Village. The prefix portion of the URL is shown in bold type, and the parameters, plce1 and regn1, are shown in italic type. The parameters are separated by an ampersand (&). Note that the values for parameters are not case-sensitive and can include spaces.

http://maps.msn.com/home.aspx?plce1=University Village&regn1=0

If you provide a place name or address that cannot be uniquely identified, MSN Maps & Directions returns a list of possible results, as shown in Figure 1. The user can then choose the correct result from the list, and then click Get Map to generate the map.

Figure 1. Result list

Figure 1. Result list

International Considerations

The MSN Maps & Directions Web site is translated into a number of languages. You can build a URL that references any MSN Maps & Directions international Web site by using the domain name for the locale you're interested in. For more information, see Appendix B: Domain Names for International Sites.

International place names and addresses often contain extended characters, such as diacritical marks. When specifying an extended character in a parameter value, use the Unicode value for the extended character instead of the character itself. The following example shows URL for a named place called Cathédrale Saint Michel in Brussels, Belgium. In the URL, the extended character "é" in Cathédrale has been replaced by its Unicode equivalent, %u00e9:

http://maps.msn.com/home.aspx?plce1=Cath%u00e9drale Saint Michel&regn1=1

For list of Unicode values for common characters, see Appendix C: Unicode Values.

Top of pageTop of page

Finding an Address or Place

When you create a URL that returns a map of a location, you can specify a particular street address, such as 1234 Main St.; a named place, such as the Taj Mahal in India; or latitude and longitude coordinates, such as 40 and –120.

Finding a Street Address

When you specify an address, the address on the map is marked by a pushpin.

Prefix

http://maps.msn.com/home.aspx?

Parameters

strt1

The street address—for example, 1 Microsoft Way.

city1

The city name—for example, Redmond.

stnm1

The state or province name—for example, Washington or WA. You can use either the entire state or province name, or a standard abbreviation.

Note This parameter is not required for finding addresses in the following countries/regions: Austria, Belgium, Denmark, Finland, France, Germany, Greece, Luxembourg, Netherlands, Norway, Portugal, United Kingdom, and Sweden.

zipc1

The ZIP Code or postal code—for example, 98052.

cnty1

Optional. A numeric value ranging from 0 through 19 that indicates the country/region in which the address is located. If this parameter is omitted, the default value 0 (United States) is used.

For a list of countries/regions for which street-level addresses are available and their corresponding numeric values, see Appendix A: Values for the Parameters cnty1 and cnty2.

Examples

The following example returns a map showing the Microsoft Corporation main campus in Redmond, Washington:

http://maps.msn.com/home.aspx?strt1=1 Microsoft Way&city1=Redmond&stnm1=WA&zipc1=981052&cnty1=0


In the following example, the stnm1 parameter is not required. This URL returns a map showing Grand-Place 1 in Brussels, Belgium:

http://maps.msn.com/home.aspx?strt1=Grand-Place 1&city1=Brussels&zipc1=1000&cnty1=7


Finding a Place by Name

A named place can include a landmark, such as Mount Rushmore or the Eiffel Tower; a point of interest, such as a civic building or airport; or a political entity, such as a city, state, or country. When you find a place by name, the place is labeled on the map and highlighted or marked depending on the type of place. For example, an airport is marked with an icon, and the borders of a state are highlighted in yellow.

Prefix

http://maps.msn.com/home.aspx?

Parameters

plce1

A named place—for example, Eiffel Tower.

regn1

Optional. A numeric value ranging from 0 through 4 that indicates the region in which the place is located. The following values are available for the regn1 parameter:

0—North America

1—Europe

2—World Atlas

3—Australia

4—Brazil

If this parameter is omitted, a default value of 0 is used.

Example

The following URL returns a map showing the Eiffel Tower in Paris, France:

http://maps.msn.com/home.aspx?plce1=eiffel tower&regn1=1


Finding a Place by Using Latitude and Longitude Coordinates

Latitude and longitude coordinates identify a location based how far it is from the equator and the prime meridian:

Latitude measures the distance north or south of the equator. Latitude values range from 0 through (+/-) 90.

Longitude measures the distance east or west of the prime meridian. Longitude values range from 0 through (+/-) 180.

You use decimal values to specify the latitude and longitude in a URL. With this type of URL, you can adjust the map view by specifying the altitude from which the map is shown. You can also opt to mark a place with a pushpin and label.

Prefix

http://maps.msn.com/maps.aspx?

Parameters

lats1

A numeric value representing the latitude of the location to be displayed on the map.

lons1

A numeric value representing the longitude to be displayed on the map.

alts1

A numeric value representing the altitude, in miles, from which the map should be displayed. The higher the altitude, the less detail is shown on the map.

Note If you set the altitude to a very high level, the place that you want to display may no longer be visible on the map.

If you're finding a specific address or a place such as a building or shopping mall, set the altitude to approximately 7 miles. If you're finding a larger place such as a city, set the altitude to approximately 143 miles.

name

Optional. The name of the place being displayed on the map. If you use this option, the location is centered on the map and marked with a pushpin and text label. The value for name cannot include angle brackets ( < > ).

regn1

Optional. A numeric value ranging from 0 through 4 that indicates the region in which the place is located. The following values are available for the regn1 parameter:

0—North America

1—Europe

2—World Atlas

3—Australia

4—Brazil

If this parameter is omitted, a default value of 0 is used.

Examples

The URLs in this section return a map showing the city of Leeds in the United Kingdom.

In the following example, thenameparameter is omitted:

http://maps.msn.com/map.aspx?&lats1=53.79448&lons1=-1.54655&alts1=143&regn1=1


In the map returned by this URL, Leeds is marked on the map with a black dot, as shown in Figure 2.

Figure 2. Default map showing a place

Figure 2. Default map showing a place

In the following example, the name parameter is used:

http://maps.msn.com/map.aspx?&lats1=53.79448&lons1=-1.54655&alts1=143&name=Fabrikam Co. Meeting&regn1=1


In the map returned by this URL, Leeds is marked on the map with a red pushpin and a custom label indicating the location for a company meeting, as shown in Figure 3.

Figure 3. Map with label and pushpin

Figure 3. Map with label and pushpin

Top of pageTop of page

Getting Driving Directions

You can create URLs that return driving directions between two addresses, between an address and a place or a place and an address, or between two places. When you create this type of URL, you can leave either the starting point or the end point blank, so that your customer can supply one of the points. This type of URL is ideal if you want to give your customers the capability to find driving directions to your location, or to give employees of your organization directions to an off-site meeting or conference. If you leave one of the points blank, the other point on the MSN Maps & Directions routing form is prepopulated with the point that you specify, as shown in Figure 4.


Figure 4. Prepopulated route form

Figure 4. Prepopulated route form


When building URLs for getting directions, you can specify whether MSN Maps & Directions should use the quickest (most time-efficient) route or the shortest route, and whether distance should be displayed in miles or kilometers.

Getting Directions from an Address to an Address

Use the parameters in this section to specify a street address as a starting point and another address as a destination.

Prefix

http://maps.msn.com/directionsFind.aspx?

Parameters

strt1

The street address of the starting point.

city1

The city name of the starting point.

stnm1

The state or province name of the starting point. You can use either the entire state or province name, or a standard abbreviation.

Note This parameter is not required for finding addresses in the following countries: Austria, Belgium, Denmark, Finland, France, Germany, Greece, Luxembourg, Netherlands, Norway, Portugal, United Kingdom, and Sweden.

zipc1

The ZIP Code or postal code of the starting point—for example, 98052.

cnty1

Optional. A numeric value ranging from 0 through 19 that indicates the country/region for the starting point. If this parameter is omitted, the default value 0 (United States) is used.

For a list of countries/regions for which street-level addresses are available and their corresponding numeric values, see Appendix A: Values for the Parameters cnty1 and cnty2.

strt2

The street address of the end point.

city2

The city name of the end point.

stnm2

The state or province name of the end point.

Note This parameter is not required for finding addresses in the following countries: Austria, Belgium, Denmark, Finland, France, Germany, Greece, Luxembourg, Netherlands, Norway, Portugal, United Kingdom, and Sweden.

zipc2

The ZIP Code or postal code of the end point.

cnty2

Optional. A numeric value ranging from 0 through 19 that indicates the country/region for the end point. If this parameter is omitted, the default value 0 (United States) is used.

For a list of countries/regions for which street-level addresses are available and their corresponding numeric values, see Appendix A: Values for the Parameters cnty1 and cnty2.

rtyp

Optional. A numeric value that specifies whether MSN Maps & Directions displays the quickest route or the shortest route. The following values are available:

Quickest—0

Shortest—1

If this parameter is omitted, MSN Maps & Directions displays the quickest route.

unit

Optional. A numeric value that specifies whether MSN Maps & Directions displays the driving distance in miles or kilometers. The following values are available:

Miles—0

Kilometers—1

If this parameter is omitted, MSN Maps & Directions displays the driving distance in miles.

Example

In the following example, the parameters stnm1 and stnm2 are not required. This URL specifies Grand-Place 1, Brussels 1000 as the starting point and Wollzeile 73, Vienna 1010 as the end point:

http://maps.msn.com/directionsFind.aspx?strt1=Grand-Place 1&city1=Brussels&zipc1=1000&cnty1=7
&strt2=Wollzeile 37&city2=Vienna&zipc2=1010&cnty2=5&rtyp=1&unit=0


Getting Directions from an Address to a Place

Use the parameters in this section to specify a street address as a starting point and a place as an end point.

Prefix

http://maps.msn.com/directionsFind.aspx?

Parameters

strt1

The street address of the starting point.

city1

The city name of the starting point.

stnm1

The state or province name of the starting point. You can use either the entire state or province name, or a standard abbreviation.

Note This parameter is not required for finding addresses in the following countries: Austria, Belgium, Denmark, Finland, France, Germany, Greece, Luxembourg, Netherlands, Norway, Portugal, United Kingdom, and Sweden.

zipc1

The ZIP Code or postal code of the starting point—for example, 98052.

cnty1

Optional. A numeric value ranging from 0 through 19 that indicates the country/region for the starting point. If this parameter is omitted, the default value 0 (United States) is used.

For a list of countries/regions for which street-level addresses are available and their corresponding numeric values, see Appendix A: Values for the Parameters cnty1 and cnty2.

plce2

A named place—for example, Eiffel Tower.

regn2

Optional. A numeric value that indicates the region in which the place is located. The following values are available:

0—North America

1—Europe

2—World Atlas

3—Australia

4—Brazil

If this parameter is omitted, a default value of 0 (North America) is used.

rtyp

Optional. A numeric value that specifies whether MSN Maps & Directions displays the quickest route or the shortest route. The following values are available:

Quickest—0

Shortest—1

If this parameter is omitted, MSN Maps & Directions displays the quickest route.

unit

Optional. A numeric value that specifies whether MSN Maps & Directions displays the driving distance in miles or kilometers. The following values are available:

Miles—0

Kilometers—1

If this parameter is omitted, MSN Maps & Directions displays driving distance in miles.

Example

The following URL specifies 1 Microsoft Way in Redmond, Washington as the starting point and the Seattle Art Museum in Seattle, Washington as the end point:

http://maps.msn.com/directionsFind.aspx?strt1=1 Microsoft Way&city1=Redmond&zipc1=98052&stnm1=WA
&plce2=Seattle Art Museum


In the following example, the stnm1 parameter is not required. This URL specifies Grand-Place 20, Brussels 1000 as the starting point and Cathédrale Saint Michel as the end point. Note that the extended character "é" in Cathédrale has been replaced by its Unicode equivalent, %u00e9:

http://maps.msn.com/directionsFind.aspx?strt1=Grand-Place 1&city1=Brussels&zipc1=1000&cnty1=7&regn2=1
&plce2=Cath%u00e9drale Saint Michel


Getting Directions from a Place to a Place

Use the parameters in this section to specify a place as a starting point and another place as an end point.

Prefix

http://maps.msn.com/directionsFind.aspx?

Parameters

plce1

A named place—for example, Eiffel Tower.

regn1

Optional. A numeric value that indicates the region in which the place is located. The following values are available:

0—North America

1—Europe

2—World Atlas

3—Australia

4—Brazil

If this parameter is omitted, a default value of 0 (North America) is used.

plce2

A named place—for example, Eiffel Tower.

regn2

Optional. A numeric value that indicates the region in which the place is located. The following values are available:

0—North America

1—Europe

2—World Atlas

3—Australia

4—Brazil

If this parameter is omitted, a default value of 0 (North America) is used.

rtyp

Optional. A numeric value that specifies whether MSN Maps & Directions displays the quickest route or the shortest route. The following values are available:

Quickest—0

Shortest—1

If this parameter is omitted, MSN Maps & Directions displays the quickest route.

unit

Optional. A numeric value that specifies whether MSN Maps & Directions displays the driving distance in miles or kilometers. The following values are available:

Miles—0

Kilometers—1

If this parameter is omitted, MSN Maps & Directions displays the driving distance in miles.

Example

The following URL specifies the Empire State Building in New York, New York as the starting point and Rockefeller Center in New York, New York as the end point:

http://maps.msn.com/directionsFind.aspx?plce1=Empire State Building&plce2=Rockefeller Center


Getting Directions from a Place to an Address

Use the parameters in this section to specify a place as a starting point and an address as an end point.

Prefix

http://maps.msn.com/directionsFind.aspx?

Parameters

plce1

A named place—for example, Eiffel Tower.

regn1

Optional. A numeric value that indicates the region in which the place is located. The following values are available:

0—North America

1—Europe

2—World Atlas

3—Australia

4—Brazil

If this parameter is omitted, a default value of 0 (North America) is used.

strt2

The street address of the end point.

city2

The city name of the end point.

stnm2

The state or province name of the end point.

Note This parameter is not required for finding addresses in the following countries: Austria, Belgium, Denmark, Finland, France, Germany, Greece, Luxembourg, Netherlands, Norway, Portugal, United Kingdom, and Sweden.

zipc2

The ZIP Code or postal code of the end point.

cnty2

Optional. A numeric value ranging from 0 through 19 that indicates the country/region for the end point. If this parameter is omitted, the default value 0 (United States) is used.

For a list of countries/regions for which street-level addresses are available and their corresponding numeric values, see Appendix A: Values for the Parameters cnty1 and cnty2.

rtyp

Optional. A numeric value that specifies whether MSN Maps & Directions displays the quickest route or the shortest route. The following values are available:

Quickest—0

Shortest—1

If this parameter is omitted, MSN Maps & Directions displays the quickest route.

unit

Optional. A numeric value that specifies whether MSN Maps & Directions displays the driving distance in miles or kilometers. The following values are available:

Miles—0

Kilometers—1

If this parameter is omitted, MSN Maps & Directions displays the driving distance in miles.

Examples

The following URL specifies the Empire State Building in New York, New York as the starting point and 11 West 53rd Street in New York, New York as the end point:

http://maps.msn.com/directionsFind.aspx?plce1=Empire State Building&strt2=11 West 53RD Street
&city2=New York&stnm2=NY&zipc2=10019


In the following example, the stnm2 parameter is not required. This URL specifies Cathédrale Saint Michel as the starting point and Grand-Place 20, Brussels 1000 as the end point. Note that the extended character "é" in Cathédrale has been replaced by its Unicode equivalent, %u00e9:

http://maps.msn.com/directionsFind.aspx?regn1=1&plce1=Cath%u00e9drale Saint Michel
&strt2=GrandPlace 1&city2=Brussels&zipc2=1000&cnty2=7


Top of pageTop of page

Appendix A: Values for the Parameters cnty1 and cnty2

The cnty1 and cnty2 parameters accept the numeric values listed in the following table. If the cnty1 or cnty2 parameter is omitted from a URL, 0 (United States) is used as a default.

Country/RegionValue

United States

0

Canada

1

United Kingdom

2

France

3

Germany

4

Austria

5

Switzerland

6

Belgium

7

Luxembourg

8

Denmark

9

Spain

10

Italy

11

Netherlands

12

Finland (Helsinki only)

13

Norway

14

Portugal

15

Sweden

16

Australia

17

Brazil

18

Greece (Athens only)

19

Top of pageTop of page

Appendix B: Domain Names for International Sites

The MSN Maps & Directions Web site is translated into a number of languages. You can build a URL that references any MSN Maps & Directions international Web site by using the domain name for the locale you're interested in. The following table lists the domain name for each international site.

Locale/LanguageDomain Name

Australia/English

http://maps.ninemsn.com.au

Austria/German

http://maps.msn.at

Belgium/Dutch

http://maps.msn.be

Belgium/French

http://maps.fr.msn.be

Canada/English

http://maps.sympatico.msn.ca

Canada/French

http://fr.maps.sympatico.msn.ca

France/French

http://maps.msn.fr

Germany/German

http://maps.msn.de

Italy/Italian

http://maps.msn.it

Netherlands/Dutch

http://maps.msn.nl

Spain/Spanish

http://maps.msn.es

Sweden/Swedish

http://maps.msn.se

United Kingdom/English

http://maps.msn.co.uk

United States/English

http://maps.msn.com

United States/Spanish

http://maps.latino.msn.com

Top of pageTop of page

Appendix C: Unicode Values

International place names and addresses often contain extended characters, such as diacritical marks. If a parameter value contains an extended character, use the Unicode value for the extended character instead of the character itself. For more information, see International Considerations earlier in this article.

The following table contains a list of Unicode values for common extended characters.

CharacterUnicode ValueCharacter Name

'

%u0027

Apostrophe

/

%u002f

Solidus (slash)

¡

%u00a1

Inverted exclamation

¨

%u00a8

Diæresis / umlaut

ª

%u00aa

Feminine ordinal

¯

%u00af

Macron accent

°

%u00b0

Degree symbol

´

%u00b4

Acute accent

¸

%u00b8

Cedilla

º

%u00ba

Masculine ordinal

¿

%u00bf

Inverted question mark

À

%u00c0

Capital A, grave accent

Á

%u00c1

Capital A, acute accent

Â

%u00c2

Capital A, circumflex

Ã

%u00c3

Capital A, tilde

Ä

%u00c4

Capital A, diæresis / umlaut

Å

%u00c5

Capital A, ring

Æ

%u00c6

Capital AE ligature

Ç

%u00c7

Capital C, cedilla

È

%u00c8

Capital E, grave accent

É

%u00c9

Capital E, acute accent

Ê

%u00ca

Capital E, circumflex

Ë

%u00cb

Capital E, diæresis / umlaut

Ì

%u00cc

Capital I, grave accent

Í

%u00cd

Capital I, acute accent

Î

%u00ce

Capital I, circumflex

Ï

%u00cf

Capital I, diæresis / umlaut

Ð

%u00d0

Capital Eth, Icelandic

Ñ

%u00d1

Capital N, tilde

Ò

%u00d2

Capital O, grave accent

Ó

%u00d3

Capital O, acute accent

Ô

%u00d4

Capital O, circumflex

Õ

%u00d5

Capital O, tilde

Ö

%u00d6

Capital O, diæresis / umlaut

×

%u00d7

Multiply sign

Ø

%u00d8

Capital O, slash

Ù

%u00d9

Capital U, grave accent

Ú

%u00da

Capital U, acute accent

Û

%u00db

Capital U, circumflex

Ü

%u00dc

Capital U, diæresis / umlaut

Ý

%u00dd

Capital Y, acute accent

Þ

%u00de

Capital Thorn, Icelandic

ß

%u00df

Small sharp s, German sz

à

%u00e0

Small a, grave accent

á

%u00e1

Small a, acute accent

â

%u00e2

Small a, circumflex

ã

%u00e3

Small a, tilde

ä

%u00e4

Small a, diæresis / umlaut

å

%u00e5

Small a, ring

æ

%u00e6

Small ae ligature

ç

%u00e7

Small c, cedilla

è

%u00e8

Small e, grave accent

é

%u00e9

Small e, acute accent

ê

%u00ea

Small e, circumflex

ë

%u00eb

Small e, diæresis / umlaut

ì

%u00ec

Small i, grave accent

ì

%u00ed

Small i, acute accent

î

%u00ee

Small i, circumflex

ï

%u00ef

Small i, diæresis / umlaut

ð

%u00f0

Small eth, Icelandic

ñ

%u00f1

Small n, tilde

ò

%u00f2

Small o, grave accent

ó

%u00f3

Small o, acute accent

ô

%u00f4

Small o, circumflex

õ

%u00f5

Small o, tilde

ö

%u00f6

Small o, diæresis / umlaut

÷

%u00f7

Division sign

ø

%u00f8

Small o, slash

ù

%u00f9

Small u, grave accent

ú

%u00fa

Small u, acute accent

û

%u00fb

Small u, circumflex

ü

%u00fc

Small u, diæresis / umlaut

ý

%u00fd

Small y, acute accent

þ

%u00fe

Small thorn, Icelandic

ÿ

%u00ff

Small y, diæresis / umlaut


Top of pageTop of page