javascript:Bing Maps AJAX Control, Version 7.0
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Map with valid credentials</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=7.0&mkt=zh-HK"></script>
<script type="text/javascript">
//参考网址:
/*
https://msdn.microsoft.com/en-us/library/gg427600.aspx 显示语言类型
https://www.microsoft.com/maps/choose-your-bing-maps-API.aspx
http://microsoft.github.io/windows/
http://cn.bing.com/dev/en-us/dev-center
https://code.msdn.microsoft.com/site/search?f%5B0%5D.Type=SearchText&f%5B0%5D.Value=bing%20maps
https://www.bingmapsportal.com/ISDK/AjaxV7#CreateMap1
*/
var map = null; function getMap()
{
map = new Microsoft.Maps.Map(document.getElementById('myMap'), {credentials: 'your key'});
}
</script>
</head>
<body onload="getMap();">
<div id='myMap' style="position:relative; width:400px; height:400px;"></div>
</body>
</html>
http://www.codeproject.com/Articles/79123/Sample-WPF-Application-Consuming-Bing-Maps-Web-Ser
Supported Cultures
The following table lists supported cultures for map labels, the navigation control and the Microsoft.Maps.Directions module. The Culture column lists values to specify for the mkt parameter.
Language - Country/Region | Culture | Map Labels | Navigation Control | Microsoft.Maps.Directions module |
---|---|---|---|---|
All |
ngt |
X |
||
Czech – Czech Republic |
cs-CZ |
X |
X |
|
Danish – Denmark |
da-DK |
X |
X |
|
Dutch - Belgium |
nl-BE |
X |
X |
|
Dutch – Netherlands |
nl-NL |
X |
X |
X |
English - Australia |
en-AU |
X |
X |
|
English – Canada |
en-CA |
X |
X |
X |
English - India |
en-IN |
X |
X |
X |
English - United Kingdom |
en-GB |
X |
X |
X |
English - United States |
en-US |
X |
X |
X |
Finnish – Finland |
fi-FI |
X |
X |
|
French-Belgium |
fr-BE |
X |
X |
|
French – Canada |
fr-CA |
X |
X |
X |
French-Switzerland |
fr-CH |
X |
X |
|
French – France |
fr-FR |
X |
X |
X |
German – Germany |
de-DE |
X |
X |
X |
Italian – Italy |
it-IT |
X |
X |
X |
Japanese - Japan |
ja-JP |
X |
X |
X |
Korean-Korea |
Ko-KR |
X |
X |
|
Norwegian (Bokmal) - Norway |
nb-NO |
X |
X |
X |
Polish - Poland |
pl-PL |
X |
X |
X |
Portuguese - Brazil |
pt-BR |
X |
X |
|
Portuguese - Portugal |
pt-PT |
X |
X |
|
Russian - Russia |
ru-RU |
X |
X |
X |
Spanish - Mexico |
es-MX |
X |
X |
X |
Spanish - Spain |
es-ES |
X |
X |
X |
Spanish – United States |
es-US |
X |
X |
X |
Swedish - Sweden |
sv-SE |
X |
X |
X |
Chinese – Hong Kong |
zh - HK |
X |
X |
X |
Chinese - Taiwan |
zh - TW |
X |
X |
X |
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Bing Map Demo</title> <script src="Scripts/jquery-2.0.3.min.js" type="text/javascript"></script>
<script type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0&mkt=zh-HK"> </script> <script type="text/javascript">
var gTheMap;
var gMarker1;
var gMarker2; $(document).ready(DocLoaded); function DocLoaded()
{
// golf course coordinates
var StartLat = 44.924254;
var StartLng = -93.366859; // what element to display the map in
var mapdiv = $("#map_div")[0]; // where on earth the map should display
var StartPoint = new Microsoft.Maps.Location(StartLat, StartLng); // create the map
gTheMap = new Microsoft.Maps.Map(mapdiv,
{
credentials: 'Asbsa_hzfHl69XF3wxBd_WbW0dLNTRUH3ZHQG9qcV5EFRLuWEaOP1hjWdZ0A0P17',
center: StartPoint,
zoom: 18,
mapTypeId: Microsoft.Maps.MapTypeId.aerial
}); // place two markers
marker1 = PlaceMarker(new Microsoft.Maps.Location(StartLat, StartLng + .0001));
marker2 = PlaceMarker(new Microsoft.Maps.Location(StartLat, StartLng - .0001)); DragEnd(null);
} // ---- PlaceMarker ------------------------------------ function PlaceMarker(location)
{
var marker = new Microsoft.Maps.Pushpin(location,
{
draggable : true
});
Microsoft.Maps.Events.addHandler(marker, 'dragend', DragEnd);
gTheMap.entities.push(marker);
return marker;
} // ---- DragEnd ------------------------------------------- var gLine = null; function DragEnd(Args)
{
var Distance = CalculateDistance(marker1._location, marker2._location); $("#message").text(Distance.toFixed(1) + ' yards'); // draw a line connecting the points
var Endpoints = [marker1._location, marker2._location]; if (gLine == null)
{
gLine = new Microsoft.Maps.Polyline(Endpoints,
{
strokeColor: new Microsoft.Maps.Color(0xFF, 0xFF, 0xFF, 0), // aRGB
strokeThickness : 2
}); gTheMap.entities.push(gLine);
}
else
gLine.setLocations(Endpoints);
} // ---- CalculateDistance ------------------------------------
//
// return Yards between two points function CalculateDistance(Position1, Position2)
{
var lat1 = Position1.latitude;
var lat2 = Position2.latitude;
var lon1 = Position1.longitude;
var lon2 = Position2.longitude; var EarthRadius = 6371; // km
var dLat = ToRadian(lat2 - lat1);
var dLon = ToRadian(lon2 - lon1);
var lat1 = ToRadian(lat1);
var lat2 = ToRadian(lat2); var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +
Math.sin(dLon / 2) * Math.sin(dLon / 2) * Math.cos(lat1) * Math.cos(lat2);
var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)); var Kmeters = EarthRadius * c;
var yards = Kmeters * 1000 * 1.0936133;
return yards;
} // ---- ToRadian -----------------------
//
// input degrees, output radians
function ToRadian(Value)
{
return Value * Math.PI / 180;
}
</script>
</head>
<body>
<div id="map_div" style="width: 100%; height: 100%; "> </div>
<span style="position:absolute; top:0px; right:6em; width: 6em; z-index:100;
text-align:center; background-color: yellow" id="message"></span>
<span style="position: absolute; top: 0px; right:2em; width:4em; background-color: yellow; text-align: center;" >
<a href="http://weblogs.asp.net/stevewellens/archive/2012/12/09/google-and-bing-map-apis-compared.aspx" target="_blank">BLOG</a></span> </body>
</html>
http://stevewellens.com/GoogleMapsDemo.html?ckattempt=2
http://stevewellens.com/BingMapsDemo.html?ckattempt=1
http://vejs.codeplex.com/
https://www.microsoft.com/maps/choose-your-bing-maps-API.aspx
https://www.bingmapsportal.com/ISDK/AjaxV7#TrafficModule1
http://cn.bing.com/dev/en-us/dev-center
https://code.msdn.microsoft.com/site/search?f%5B0%5D.Type=SearchText&f%5B0%5D.Value=bing%20maps
http://microsoft.github.io/windows/
https://code.msdn.microsoft.com/bing/Bing-Maps-for-JavaScript-84f1effc
https://msdn.microsoft.com/en-us/library/ff701733.aspx
http://www.codeproject.com/Articles/461691/Driving-route-path-direction-with-Bing-Maps-in-Csh
国测局GCJ-02坐标体系(谷歌、高德、腾讯、微软、雅虎等),与百度坐标BD-09体系的转换,在CSDN上有很详细的讲解:
C++:
const double x_pi = 3.14159265358979324 * 3000.0 / 180.0; void bd_encrypt(double gg_lat, double gg_lon, double &bd_lat, double &bd_lon)
{
double x = gg_lon, y = gg_lat;
double z = sqrt(x * x + y * y) + 0.00002 * sin(y * x_pi);
double theta = atan2(y, x) + 0.000003 * cos(x * x_pi);
bd_lon = z * cos(theta) + 0.0065;
bd_lat = z * sin(theta) + 0.006;
} void bd_decrypt(double bd_lat, double bd_lon, double &gg_lat, double &gg_lon)
{
double x = bd_lon - 0.0065, y = bd_lat - 0.006;
double z = sqrt(x * x + y * y) - 0.00002 * sin(y * x_pi);
double theta = atan2(y, x) - 0.000003 * cos(x * x_pi);
gg_lon = z * cos(theta);
gg_lat = z * sin(theta);
}
csharp:
const double x_pi = 3.14159265358979324 * 3000.0 / 180.0;
/// <summary>
///
/// </summary>
/// <param name="gg_lat"></param>
/// <param name="gg_lon"></param>
/// <param name="bd_lat"></param>
/// <param name="bd_lon"></param>
void bd_encrypt(double gg_lat, double gg_lon,out double bd_lat,out double bd_lon)
{
double x = gg_lon, y = gg_lat;
double z = Math.Sqrt(x * x + y * y) + 0.00002 * Math.Sin(y * x_pi);
double theta = Math.Atan2(y, x) + 0.000003 * Math.Cos(x * x_pi);
bd_lon = z * Math.Cos(theta) + 0.0065;
bd_lat = z * Math.Sin(theta) + 0.006; }
/// <summary>
///
/// </summary>
/// <param name="bd_lat"></param>
/// <param name="bd_lon"></param>
/// <param name="gg_lat"></param>
/// <param name="gg_lon"></param>
void bd_decrypt(double bd_lat, double bd_lon,out double gg_lat,out double gg_lon)
{
double x = bd_lon - 0.0065, y = bd_lat - 0.006;
double z = Math.Sqrt(x * x + y * y) - 0.00002 * Math.Sin(y * x_pi);
double theta = Math.Atan2(y, x) - 0.000003 * Math.Cos(x * x_pi);
gg_lon = z * Math.Cos(theta);
gg_lat = z * Math.Sin(theta);
}
javascript:Bing Maps AJAX Control, Version 7.0的更多相关文章
- 【Silverlight】Bing Maps学习系列(八):使用Bing Maps Silverlight Control加载自己部署的Google Maps
[Silverlight]Bing Maps学习系列(八):使用Bing Maps Silverlight Control加载自己部署的Google Maps 上个月微软必应地图(Bing Maps) ...
- 【Silverlight】Bing Maps学习系列(二):通过Bing Maps Silverlight Control如何显示地图(转)
[Silverlight]Bing Maps学习系列(二):通过Bing Maps Silverlight Control如何显示地图 如本系列第一篇你所介绍的,开发基于Silverlight的Bin ...
- SQL Server 2008空间数据应用系列十二:Bing Maps中呈现GeoRSS订阅的空间数据
原文:SQL Server 2008空间数据应用系列十二:Bing Maps中呈现GeoRSS订阅的空间数据 友情提示,您阅读本篇博文的先决条件如下: 1.本文示例基于Microsoft SQL Se ...
- SQL Server 2008空间数据应用系列八:基于Bing Maps(Silverlight)的空间数据存储
原文:SQL Server 2008空间数据应用系列八:基于Bing Maps(Silverlight)的空间数据存储 友情提示,您阅读本篇博文的先决条件如下: 1.本文示例基于Microsoft S ...
- SQL Server 2008空间数据应用系列七:基于Bing Maps(Silverlight) 的空间数据展现
原文:SQL Server 2008空间数据应用系列七:基于Bing Maps(Silverlight) 的空间数据展现 友情提示,您阅读本篇博文的先决条件如下: 1.本文示例基于Microsoft ...
- Bing Maps进阶系列九:使用MapCruncher进行地图切片并集成进Bing Maps
Bing Maps进阶系列九:使用MapCruncher进行地图切片并集成进Bing Maps 在Bing Maps开发中,由于各种应用功能的不同,更多的时候用户可能需要将自己的一部分图片数据作为地图 ...
- 【Silverlight】Bing Maps学习系列(五):绘制多边形(Polygon)图形(转)
[Silverlight]Bing Maps学习系列(五):绘制多边形(Polygon)图形 Bing Maps Silverlight Control支持用户自定义绘制多边形(Polygon)图形, ...
- 【Silverlight】Bing Maps学习系列(三):如何控制地图
[Silverlight]Bing Maps学习系列(三):如何控制地图 本篇主要介绍如何对地图的一些常用控制操作,包括地图加载模式.根据精度和纬度定位.变焦程度等. 一.动态设置地图加载模式 在本系 ...
- 【Silverlight】Bing Maps学习系列(一):开发前的准备工作
[Silverlight]Bing Maps学习系列(一):开发前的准备工作 微软推出的Bing Maps地图引擎,对外开放了Silverlight和Ajax两种客户端API,同时微软针对全球地图还推 ...
随机推荐
- IOS , plist 配置项说明
本文转载至 http://blog.csdn.net/fengsh998/article/details/8307424 Key:Application can be killed immediate ...
- iOS开发——iOS学习路线
iOS学习路线 版权声明:欢迎转载,请贴上源地址:http://www.cnblogs.com/iCocos/(iOS梦工厂) 一:自学初步学习路线 二:高级完整学习路线 三:完整知识与能力体系 思维 ...
- EPLAN P8导线颜色的设置
P8里的导线应称为"连接",连接的颜色代表了其电位的传递路径,如可以给三相电源设置成黑色,PE设为绿色,N设为蓝色等等. P8中电位在连接和元器件中传递的方法是由元器件的连接点属 ...
- C# 使用 SAP NCO3.0 调用SAP RFC函数接口
最近使用C#调用SAP RFC函数,SAP提供了NCO3.0组件. 下载组件安装,之后引用“sapnco.dll”和“sapnco_utils.dll”两个文件. 在程序中 using SAP.Mid ...
- NPM 与 left-pad 事件:我们是不是早已忘记该如何好好地编程?
转自:http://www.techug.com/npm-left-pad-have-we-forgotten-how-to-program 开发者朋友们,我们该谈一谈这个问题了.你们应该知道本周的 ...
- 关于Parallel.For/Foreach并行方法中的localInit, body, localFinally使用
对集合成员的操作往往可以通过并行来提高效率,.NET Parallel类提供了简单的方法来帮助我们实现这种并行,比如Paralle.For/ForEach/Invoke方法. 其中,For/ForEa ...
- 细数Qt开发的各种坑(欢迎围观)
1:Qt的版本多到你数都数不清,多到你开始怀疑人生.从4.6开始到5.8,从MSVC编译器到MINGW编译器,从32位到64位,从Windows到Linux到MAC.MSVC版本还必须安装对应的VS2 ...
- 跟随标准与Webkit源码探究DOM -- 获取元素之getElementById
按照ID获取元素 -- getElementById 标准 DOM 1,定义在HTMLDocument Interface 中,原型Element getElementById(in DOMStrin ...
- 在没安装OFFICE的服务器SSIS中进行EXCEL的ETL操作!
由于OFFICE 2010的安装包比较庞大,如果仅仅为了在服务器中实现操作EXCEL,完全没有必要安装整个OFFICE,是否可以不装OFFICE也实现与OFFICE文件的互相操作呢?答案是肯定的,在S ...
- linux中mysql密码找回的两种方式
方法一:修改my.cnf配置文件 1.首先确认服务器出于安全的状态,也就是没有人能够任意地连接MySQL数据库. 因为在重新设置MySQL的root密码的期间,MySQL数据库完全出于没有密码保护的 ...