With Windows Live Local, you can create a hyperlink that always opens Windows Live Local to a specific location, map view, zoom level, and with specific search panels and your scratch pad. You create your own Windows Live Local URL by starting with the base URL for Windows Live Local (the base address). You can then use parameters to define the location, zoom level, map view, search panels, and more.
To build your own URL:
Start with the base address (http://local.live.com/default.aspx).
Add a question mark (?).
Add the first parameter you want to use, and set the value of the parameter by using an equal sign (=).
Add the other parameters that you want to use, separating each parameter with an ampersand (&).
The following tables list the parameters currently supported by the Windows Live Local URL application programming interface (API).
Note Because this is a Beta release of Windows Live Local, these parameters may change in future versions.
| Parameter |
Definition |
Data type |
Details |
|---|---|---|---|
v (required) |
Version |
Integer |
Defines the version of the URL API. Because the API may change as new features are added, you must include the v parameter to ensure backward compatibility. If you omit this parameter, the latest version of the API is used by default. |
cp (optional) |
Center point |
Double~Double |
Defines the center point of the map. Use the following format for the cp parameter: Latitude~Longitude. Both values must be expressed in decimal degrees and use the WGS84 datum. |
lvl (optional) |
Level |
Integer |
Defines the zoom level (map scale). Valid values are 1–19. This parameter is ignored if you omit the cp parameter. |
style (optional) |
Map view |
String |
Defines the map view. Valid values for this parameter are a (for the aerial photo map view), r (for the road map view), h (for the aerial map view with labels), and o for bird's eye (oblique) images. Note If you set the view to o, you must also provide the scene parameter. |
scene (optional, but required if style=o) |
Bird's eye (oblique) image reference |
Integer |
Specifies the ID of the bird's eye (oblique) image tile to display. |
trfc (optional) |
Traffic layer |
Boolean |
Specifies whether the traffic layer should be displayed. Set trfc=1 to show traffic. |
This example opens Windows Live Local with the map centered on a specific location with a zoom level of 12, and sets the map view to the road map view:
http://local.live.com/default.aspx?cp=43.901683~-69.522416&lvl=12&style=r&v=2
This example opens Windows Live Local with the map centered on a specific location, uses the bird's eye (oblique) image map view, and specifies the zoom level and scene to use:
http://local.live.com/default.aspx?cp=47.644209~-122.140437&style=o&lvl=1&scene=3050&v=2
| Parameter |
Definition |
Data type |
Details |
|---|---|---|---|
ss (optional) |
Search string |
String |
Defines the searches that you want to display in one or more search results panels. Separate multiple search strings with a tilde (~). If you use a tilde in a search string, the tilde is automatically converted to a space. You can include a maximum of three search strings, each containing up to 100 characters. Note In version 1.0 of the URL API, multiple searches were delimited with pipe (|) characters. |
where1 (optional) |
Location string |
String |
Defines the location on which to center the map. This parameter represents the text that a user types in the upper search box in Windows Live Local. The string can represent an address or a place name. This parameter takes precedence over the cp parameter. |
This example opens Windows Live Local to a specific address:
http://local.live.com/default.aspx?where1=One%20Microsoft%20Way,%20Redmond,%20WA%2098052&v=2
This example opens Windows Live Local with three search panels:
http://local.live.com/default.aspx?ss=Pizza~Beer~Bowling&v=2
Note In version 1 of the URL API, the example looked like this: http://local.live.com/default.aspx?ss=Pizza|Beer|Bowling&v=1
This example opens Windows Live Local with three search panels and centers the map on a landmark:
http://local.live.com/default.aspx?ss=Pizza~Beer~Bowling%20Alley&where1=Space%20Needle&v=2
| Parameter |
Definition |
Data type |
Details |
|---|---|---|---|
rtp (optional) |
Route |
String |
Defines the waypoints of a route to draw on the map. The route is defined as a series of waypoints, each separated by a tilde (~). Each waypoint is defined by either a pos (position) or adr (address) identifier, described in the next table. A complete route contains at least two waypoints. For example, a route with two waypoints is defined by the following pattern: rtp="A"~"B". You can also specify an incomplete route. For example, you can define only the start of a route: rtp="A"~ or the end of a route: rtp=~"B" If you provide only one waypoint, the driving directions panel is displayed with the provided waypoint, but no route is drawn. |
| Identifier |
Definition |
Details |
|---|---|---|
pos (used with the rtp parameter) |
Position |
Defines a waypoint as a specific position on the map. Use the following format: rtp=pos.latitude_longitude_name |
adr (used with the rtp parameter) |
Address |
Defines a waypoint as an address. Use the following format: rtp=adr.address |
The following example displays a route on the map from a specific address to a specific point:
http://local.live.com/default.aspx?v=2&rtp=adr.One%20Microsoft Way,
%20Redmond,%20WA%2098052~pos.45.23423_-122.1232_MyPlace
The following example opens the driving directions panel with a start address only:
http://local.live.com/default.aspx?v=2&rtp=adr.Seattle , WA
| Parameter |
Definition |
Data type |
Details |
|---|---|---|---|
sp (optional) |
Scratch Pad |
String, or pairing(category.value) |
Defines a specific entity, address, or annotation (pushpin) to add to the scratch pad. Scratch pad items are defined as a pairing: the category and the value, separated by a period. There are three valid categories: adr, an, and yp, each of which is described in the next table. Separate multiple scratch pad items with tildes (~). If the item you specify contains a tilde, make sure the tilde is encoded as %7E. |
cid (optional) |
Collection ID |
String |
Specifies the GUID of the collection you want to display. |
| Category |
Definition |
Details |
|---|---|---|
adr |
Address |
Specifies an address to add to the scratch pad. For the address, the value can be the address string, the address string and title, or the address string, title, and description: sp=adr.addressString sp=adr.addressString_title sp=adr.addressString_title_description Make sure that the addresses you provide are as specific as possible. |
an |
Annotation |
Specifies a custom annotation to add to the scratch pad. For annotations, the value includes the latitude, longitude, title, and description to display, separated by underscores (_): sp=an.latitude_longitude_title_description |
yp |
Yellow pages listing |
Specifies yellow page listings. For yellow page listings, the value is a valid yellow pages entity id: sp=yp.listingID |
The following example opens Windows Live Local and adds a specific yellow page listing to the scratch pad:
http://local.live.com/default.aspx?v=2&sp=yp.6678972
The following example opens Windows Live Local and adds the address "1 Microsoft Way, Redmond, WA 98052" to the scratch pad:
http://local.live.com/default.aspx?v=2&sp=adr.1%20Microsoft%20Way%2C%
20Redmond%2C%20WA%2098052
The following example opens Windows Live Local and adds an address and two yellow page listings to the scratch pad:
http://local.live.com/default.aspx?v=2&sp=yp.6678972~yp.10260032~adr.1%
20Microsoft%20Way%2C%20Redmond%2C%20WA%2098052
The following example opens a fictitious collection in Windows Live Local:
http://local.live.com/?v=2&cid=1234567890ABCDEF!
You can also build a URL that opens a specific details page. The steps are the same, but you start with a different base address: http://local.live.com/details.aspx
The following table lists the parameters that are supported for the details page.
| Parameter |
Definition |
Data type |
Details |
|---|---|---|---|
v (required) |
Version |
Integer |
Defines the version of the URL API. Because the API may change as new features are added, you must include the v parameter to ensure backward compatibility. If you omit parameter, the latest version of the API is used by default. |
dt (required) |
Details |
A pair of values (eaid.eid) |
Defines the entity for which you want to display detailed information. Entities are defined as a pairing of the entity authority ID (eaid) and the entity ID (eid), separated with a period. You can only specify a single entity for each details page. If you pass more than one entity in a URL for a details page, only the first entity is used. |
style |
Map view |
String |
Defines the map view. Valid values for this parameter are a (for the aerial photo map view), r (for the road map view), and h (for the aerial photo map view with labels). |
The following example opens the details page for a specific entity and specifies the road map view:
http://local.live.com/details.aspx?dt=yp.6678972&style=r&v=2