第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會有你想問的

如何在百度地圖上用地名代替經(jīng)緯坐標(biāo)搜索地區(qū) 江湖救急?。?!小弟先謝過了~ 下邊是百度API示例 請用地名代替經(jīng)緯度??!

<html> <head> <meta?http-equiv="Content-Type"?content="text/html;?charset=utf-8"?/> <meta?name="viewport"?content="initial-scale=1.0,?user-scalable=no"?/> <style?type="text/css"> body,?html{width:?100%;height:?100%;margin:0;font-family:"微軟雅黑";} #allmap{height:500px;width:100%;} #r-result{width:100%;?font-size:14px;} </style> <script?type="text/javascript"?src="http://api.map.baidu.com/api?v=2.0&ak=9FEKKMGvHGZ42Lak9F5mlltV"></script> <title>城市名定位</title> </head> <body> <div?id="allmap"></div> <div?id="r-result"> 經(jīng)度:?<input?id="longitude"?type="text"?style="width:100px;?margin-right:10px;"?/> 緯度:?<input?id="latitude"?type="text"?style="width:100px;?margin-right:10px;"?/> <input?type="button"?value="查詢"?onclick="theLocation()"?/> </div> </body> </html> <script?type="text/javascript"> //?百度地圖API功能 var?map?=?new?BMap.Map("allmap"); map.centerAndZoom(new?BMap.Point(116.331398,39.897445),11); map.enableScrollWheelZoom(true); //?用經(jīng)緯度設(shè)置地圖中心點(diǎn) function?theLocation(){ if(document.getElementById("longitude").value?!=?""?&&?document.getElementById("latitude").value?!=?""){ map.clearOverlays();? var?new_point?=?new?BMap.Point(document.getElementById("longitude").value,document.getElementById("latitude").value); var?marker?=?new?BMap.Marker(new_point);??//?創(chuàng)建標(biāo)注 map.addOverlay(marker);??????????????//?將標(biāo)注添加到地圖中 map.panTo(new_point);?????? } } </script>
查看完整描述

2 回答

?
lkkle

TA貢獻(xiàn)2條經(jīng)驗(yàn) 獲得超0個(gè)贊

26行換成

var point = map.centerAndZoom("北京", 12);

查看完整回答
反對 回復(fù) 2015-12-31
  • 荇箜下的楓
    荇箜下的楓
    不是這個(gè)意思。。。 示例上是用經(jīng)緯度查某地所在位置 我需要的是用地名查其所在
  • 2 回答
  • 0 關(guān)注
  • 2284 瀏覽
慕課專欄
更多

添加回答

了解更多

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號