首页 > 代码库 > BingMap地图怎样显示中文
BingMap地图怎样显示中文
这是bingMap的js引用
<script type="text/javascript" src="http://www.mamicode.com/http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0&mkt=zh-cn"></script>
mkt=en-us:英文显示【默认选项】
mkt=zh-cn:中文显示
在BingMap的官网地图上我还真没有找到设置显示中文的选项。
Test code:
Html:
<form id="form1" runat="server"> <div id="divMap"> </div> </form>
Js:
<script type="text/javascript"> var map = null; var bingMapKey = "AvHCAx5M3rKrzF-3b_DpRotDCe5Bs53FsqmGhg6i4t0ISDPjadyZsCke61VGacfd"; var infobox = null; $(document).ready(function () { var mapOptions = { credentials: bingMapKey, enableClickableLogo: false, enableSearchLogo: false, showMapTypeSelector: true, showCopyright: false, mapTypeId: Microsoft.Maps.MapTypeId.road, //zoom: 10, //animate:false useInertia:false }; map = new Microsoft.Maps.Map($(‘#divMap‘)[0], mapOptions); var pushpin = new Microsoft.Maps.Pushpin(new Microsoft.Maps.Location(41, -72)); // Add a handler to the pushpin drag Microsoft.Maps.Events.addHandler(pushpin, ‘click‘, DisplayLoc); map.entities.push(pushpin); //Infobox var infoboxOptions = { width: 300, height: 100, title: "Title1", description: "Description1", animate: false, showPointer: false }; infobox = new Microsoft.Maps.Infobox(pushpin, infoboxOptions); map.entities.push(infobox); var _chartLayer = new Microsoft.Maps.EntityCollection(); map.entities.push(_chartLayer); }) </script>
BingMap地图怎样显示中文
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。