简体   繁体   中英

Bing maps How to set a pin on a map (url)?

I have all the code, the only thing that missing for me is how to put a pushpin in that url:

http://www.bing.com/maps/default.aspx?v=2&cp=50.22599~50.81103&lvl=10

My pushpin link is: http://s8.postimg.org/8uuikcaw1/pin.png

I want to make something like this: http://www.bing.com/maps/default.aspx?v=2&cp=50.22599~50.81103&lvl=10&pushpin=http://s8.postimg.org/8uuikcaw1/pin.png

Or if bing maps has their pushpin, it's also good. Just want to get a static image with a map and a pushpin on it, can someone help me?

Thanks :)

Here is an example of a map with a pushpin:

Pushpin in a map (with tooltip).

Replace the latitude and longitude with yours.

var pushpin= new Microsoft.Maps.Pushpin(new Microsoft.Maps.Location(47.6, -122.33)); 
map.entities.push(pushpin); 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM