unarity
unarity

Reputation: 2445

embed bing maps - pushpin

I am trying to embed bing maps into web page and it works, but I want to show pushpin in embeded map on web page. As I can see it is not possible. Does anyone know how to do this?

<div id="mapviewer"><iframe id="map" scrolling="no" width="500" height="400" frameborder="0" src="http://www.bing.com/maps/embed/?v=2&amp;cp=45.810280~15.957222&amp;lvl=4&amp;dir=0&amp;sty=r&amp;cid=AF2FECA12C1AA81D!196&amp;form=LMLTEW&amp;emid=8841ff8b-025d-e5a7-e37f-39b4d31b3b93"></iframe><div id="LME_maplinks" style="line-height:20px;"><a id="LME_largerMap" href="http://www.bing.com/maps/?v=2&amp;cp=45.810280~15.957222&amp;lvl=4&amp;dir=0&amp;sty=r&amp;cid=AF2FECA12C1AA81D!196&amp;form=LMLTEW" target="_blank" style="margin:0 7px">View Larger Map</a><a id="LME_directions" href="http://www.bing.com/maps/?v=2&amp;cp=45.810280~15.957222&amp;lvl=4&amp;dir=0&amp;sty=r&amp;cid=AF2FECA12C1AA81D!196&amp;form=LMLTEW&amp;rtp=%7Epos.45.810279846_15.957221984000004_" target="_blank" style="margin:0 7px">Driving Directions</a></div></div>

Upvotes: 1

Views: 12222

Answers (1)

Nicolas Boonaert
Nicolas Boonaert

Reputation: 2952

You can use pushpin in embedded maps with the 'pushpins' parameter, see the MSDN about this:

http://msdn.microsoft.com/en-us/library/ee692180.aspx

Here is an example:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
   <head>
      <title>Embedded Map</title>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   </head>
   <body style="font-family:Arial">
      <p>A simple embedded map.</p>
      <iframe width="400" height="300" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"
         src="http://dev.virtualearth.net/embeddedMap/v1/ajax/aerial?zoomLevel=10&center=47.5_-122.5&pushpins=47.5_-122.5"/>
   </body>
</html>

Here is an example of what are the options available:

mapMode
The style of the map. Valid values are: Road, Aerial, AerialWithLabels, Birdseye, BirdseyeWithLabels

zoomLevel An int indicating a valid zoom level for the map style.

center
Two doubles separated by an underscore that are the latitude and longitude values of the coordinate of the center of the map.

heading
A double specifying the orientation of the map in degrees.

pushpins
Two doubles separated by an underscore that are the latitude and longitude values of the coordinate of the pushpin. Multiple pushpin locations are separated by a ~.

culture
A valid culture string. The default value is “en-us”.

Upvotes: 5

Related Questions