简体   繁体   English

必应地图如何在地图(网址)上设置图钉?

[英]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: 我拥有所有代码,对我而言唯一缺少的是如何在该URL中放置图钉:

http://www.bing.com/maps/default.aspx?v=2&cp=50.22599~50.81103&lvl=10 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 我的图钉链接是: 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 我想做这样的事情: 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. 或者,如果bing地图有其图钉,那也很好。 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); 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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