<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2"></script>
<script type="text/javascript">
var map = null;
var LA = new VELatLong(34.0540, -118.2370);
var pinPoint = null;
var pinPixel = null;
function GetMap()
{
map = new VEMap('myMap');
map.LoadMap(LA, 14, VEMapStyle.Road, false, VEMapMode.Mode2D, true, 1);
AddPin();
}
function getInfo()
{
var info;
if (map.IsBirdseyeAvailable())
{
var be = map.GetBirdseyeScene();
info = "ID: " + be.GetID() + "\n";
info += "orientation: " + be.GetOrientation()+ "\n";
info += "height: " + be.GetHeight() + "\n";
info += "width: " + be.GetWidth() + "\n";
var pixel = be.LatLongToPixel(map.GetCenter(), map.GetZoomLevel());
info += "LatLongToPixel: " + pixel.x + ", " + pixel.y + "\n";
// Check to see if the current birdseye view contains the pushpin pixel point.
info += "contains pixel " + pinPixel.x + ", " + pinPixel.y + ": " +
be.ContainsPixel(pinPixel.x, pinPixel.y, map.GetZoomLevel()) + "\n";
// Check to see if the current view contains the pushpin LatLong.
info += "contains latlong " + pinPoint + ": " + be.ContainsLatLong(pinPoint) + "\n";
// This method may return null, depending on the selected view and map style.
info += "latlong: " + map.PixelToLatLong(pixel);
alert(info);
}
else
{
var center = map.GetCenter();
info = "Zoom level:\t" + map.GetZoomLevel() + "\n";
info += "Latitude:\t" + center.Latitude + "\n";
info += "Longitude:\t" + center.Longitude;
alert(info);
}
}
function AddPin()
{
// Add a new pushpin to the center of the map.
pinPoint = map.GetCenter();
pinPixel = map.LatLongToPixel(pinPoint);
map.AddPushpin(pinPoint);
}
</script>
</head>
<body onload="GetMap();">
<div id='myMap' style="position:relative; width:400px; height:400px;"></div>
<input id="btnGetInfo" type="button" value="Get Scene Information" name="getinfo" onclick="getInfo();">
<br/>
(zoom out 5 clicks to get latitude/longitude and zoom level)
</body>
</html>
網上收集整理
分享到:
相关推荐
标题中的“Bing Map”指的是微软的Bing地图服务,这是一个全球性的在线地图应用程序,提供了丰富的地理信息和卫星图像。Bing地图不仅提供基本的导航功能,还支持各种定制化的地图应用,例如在地图上标注、绘图以及...
在本文中,我们将深入探讨如何在Silverlight Bing地图中加载Google地图。Silverlight是一种由Microsoft开发的客户端插件技术,用于在Web浏览器中提供丰富的交互式用户体验,而Bing Maps则是微软提供的一个强大的地图...
Bing Map 在 Vue 项目中的使用详解 Bing Map 是微软公司开发的一款地图服务,提供了强大的地图功能和 API 接口,广泛应用于 Web 开发、移动应用开发等领域。本文将主要介绍 Bing Map 在 Vue 项目中的使用详解,帮助...
【winphone7的bingmap实例sample】是一个专为Windows Phone 7平台设计的示例项目,它详细展示了如何集成和使用Bing Maps服务。这个样本集成了Bing Maps API,帮助开发者了解如何在Windows Phone应用中实现地图功能,...
### GoogleMap与BingMap接口分析 #### 一、GoogleMap API详解 ##### 1.1 前言 在地图开发领域,Google Maps API 是一个广泛使用的工具集,为开发者提供了丰富的功能来构建交互式地图应用。这些API不仅支持基本的...
Bing Maps Control提供了丰富的地图服务,包括卫星视图、地形图、交通状况以及自定义图层等功能。它使用JavaScript或.NET Framework进行编程,提供了一套强大的工具和接口,方便开发者进行地图定制和交互操作。 要...
《基于SilverLight和BingMap的车辆监控系统详解》 在现代信息技术的推动下,车辆监控系统的开发已经成为交通管理、物流调度以及安全防范等领域的重要工具。本篇文章将深入探讨一个利用SilverLight和BingMap技术构建...
1. **高级地图服务**:Bing Maps 集成了微软强大的地图服务,提供高分辨率的地图图像、卫星图片以及街景视图等功能。 2. **全面的数据支持**:Bing Maps 支持多种数据类型,包括地点、路线规划、实时交通状况等,为...
<maps:Map x:Name="bingMap" CredentialsProvider="Your Bing Maps Key" /> ``` 这里的`CredentialsProvider`属性是至关重要的,你需要从Bing Maps账户中获取一个有效的API密钥,用以验证你的应用有权访问Bing ...
在这个"Silverlight-bing map demo"项目中,我们可以看到如何将Silverlight的交互性与Bing Maps的强大功能相结合。开发者可能使用了以下关键技术点: 1. **地图控件集成**:在Silverlight应用中,通过引用Bing Maps...
MMM-Bingmap 基于必应地图的交通地图 需求Bing API创建一个帐户以使用api https://www.bingmapsportal.com/ 使用静态地图制作器来确定大小和位置 https://staticmapmaker.com/bing/ 设定档 { module: 'MMM-Bing...
【BingMapsIOS】是一个专为iOS平台设计的Bing Maps SDK包,它包含了开发者在集成Bing Maps服务到自己的iOS应用中所需的关键组件。这个压缩包提供了几个关键的资源和库文件,使得开发者能够轻松地在iOS应用中集成强大...
### Bing Maps 教程知识点详解 #### 学习篇 ##### 1.1 开发前的准备工作 在开始使用 Bing Maps 进行开发之前,首先需要确保开发环境满足一定的要求。由于 Bing Maps Silverlight Control 基于 Silverlight 3 发布...
ArcBruTile display tiles from OpenStreetMap, Bing, Google, SpatialCloud and TMS/WMS-C Services in ArcGIS Desktop.
本篇文章将深入探讨Bing Map App SDK的核心组件及其在Silverlight中的运用。 首先,我们要了解的是`Microsoft.Maps.Core.dll`,它是Bing Maps SDK的基础库,包含了SDK的主要功能和接口。这个DLL文件提供了地图服务...
<Bing.Maps.MapControl.Map x:Name="myMap" CredentialsProvider="YOUR_BING_MAPS_KEY" ZoomLevel="10" Center="47.6097,-122.3331"/> ``` 记住替换`YOUR_BING_MAPS_KEY`为你的Bing Maps API密钥,可在Bing ...
- 实验的目标是使开发者熟悉Bing Maps for Windows Phone,掌握Bing Map控件和数据绑定的使用,以及如何获取和显示地图数据。 - 开始实验前,需要安装Visual Studio、Windows Phone开发工具以及具备稳定的互联网...
Microsoft (Bing) Maps Angular 应用程序用于 Bing 地图的简单可重用 AngularJS 应用程序。 使用 AngularJS 1.2 和 Microsoft Maps Ajax Control 7.0。文档Microsoft 地图 API 参考: : AngularJS 1.2: ://code....