嵌入bing地图-图钉 [英] embed bing maps - pushpin

查看:76
本文介绍了嵌入bing地图-图钉的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将bing映射嵌入到网页中并且可以使用,但是我想在网页的嵌入地图中显示图钉.如我所见,这是不可能的.有人知道该怎么做吗?

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>

推荐答案

您可以在嵌入式地图中使用带有'pushpins'参数的图钉,有关此信息,请参见MSDN:

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

这里是一个示例:

<!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
地图的样式.有效值为:道路,天线,AerialWithLabels,Birdseye,BirdseyeWithLabels

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

zoomLevel 一个整数,指示地图样式的有效缩放级别.

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.

标题
一个double值,以度为单位指定地图的方向.

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 ~.

文化
有效的文化字符串.默认值为"zh-cn".

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

这篇关于嵌入bing地图-图钉的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆