The Bing Maps AJAX v7 API lets you create and embed a custom Bing Map in your own webpage containing Pushpins, LineStrings, and Polygons, custom overlays and specified map styles etc.
However, on many occasions you might not want, or need, to embed a map in your own site – you might be quite happy for your application to direct users to the webpage at www.bing.com/maps instead. In such cases, you generally want to load the www.bing.com/maps site to be centred on a particular location, with one or more locations highlighted on the map, or with a particular route highlighted.
Fortunately, all these can all be achieved by supplying parameters after the URL.
Unfortunately, the parameters that can be specified don’t seem to be documented anywhere. (Update: they are documented at http://onlinehelp.microsoft.com/en-us/bing/ff808440.aspx, but it seems pretty hard to find that page)
There are several old forum posts that refer to a page at http://help.live.com/Help.aspx?market=en-US&project=WL_Local&querytype=topic&query=WL_LOCAL_PROC_BuildURL.htm which apparently provided this information, but that page no longer seems to be available and I can’t find where, if at all, the information it used to contain is now published.
So, from my own memory, here’s a list of some useful parameters you can try passing to the page at http://www.bing.com/maps/default.aspx:
| Parameter | Example | Description |
| cp | cp=52.62~1.2 | Centres the map on the specified latitude/longitude. Format for coordinates is lat~long |
| where1 | where1=10 Downing Street, London, United Kingdom | Centres the map on the specified address, and adds a default pushpin and infobox at that location. |
| sty | sty=a | Sets the map style. Valid values are: r (road), a (aerial), h (hybrid = aerial with labels), b (birdseye), s (Ordnance Survey), c (London Street Map) |
| lvl | lvl=6 | Sets the zoom level of the map (from 1, most zoomed out to 20 most zoomed in) |
| rtp | rtp=pos.50_2~pos.48_5~pos.45_10~pos.52_14rtp=adr.Norwich,Norfolk~adr.Oxford,%20Oxon | Sets the list of waypoints for a route to be displayed on the map. Each waypoint can either be specified as a latitude/longitude coordinate using the syntax pos.latitude_longitude, or an address using the syntax adr.street address.Individual waypoints are separated from each other with ~. |
and here’s some examples:
Highlighting the address at 10 Downing Street, London on a London Street Map
http://www.bing.com/maps/default.aspx?where1=10 Downing Street, London&sty=c
Displaying the route from Norwich to Edinburgh via Oxford
Calculating a route between a set of lat/long coordinates and displaying that route on an aerial map
(route starts at (50,2), then goes through (48,5) and (45, 10) before ending at (52,14))
http://www.bing.com/maps/default.aspx?rtp=pos.50_2~pos.48_5~pos.45_10~pos.52_14&sty=a
Hope that helps someone!



