輸入提示
- 獲取輸入提示數(shù)據(jù)
使用 Autocomplete
獲取輸入提示信息航罗。
<script src="https://webapi.amap.com/maps?v=1.4.12&key=您申請(qǐng)的key值&plugin=AMap.Autocomplete"></script>
<script type="text/javascript" src='https://a.amap.com/jsapi_demos/static/demo-center/js/prety-json.js'></script>
<script>
// 獲取輸入提示信息
function autoInput(){
var keywords = document.getElementById("input").value;
AMap.plugin('AMap.Autocomplete', function(){
// 實(shí)例化Autocomplete
var autoOptions = {
city: '全國(guó)'
}
var autoComplete = new AMap.Autocomplete(autoOptions);// 以全國(guó)為區(qū)域范圍搜索
autoComplete.search(keywords, function(status, result) {
// 搜索成功時(shí)萎羔,result即是對(duì)應(yīng)的匹配數(shù)據(jù)
var node = new PrettyJSON.view.Node({
el: document.querySelector("#input-info"),
data: result
}); // 該類(lèi)可將數(shù)據(jù)自動(dòng)渲染到dom樹(shù)上
})
})
}
autoInput();
document.getElementById("input").oninput = autoInput;
</script>
- 輸入提示 聯(lián)想輸入
使用Autocomplete
進(jìn)行聯(lián)想輸入熄捍。
<input id='tipinput' type="text">
<script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.12&key=您申請(qǐng)的key值&plugin=AMap.Autocomplete"></script>
<script type="text/javascript">
var map = new AMap.Map("container", {
resizeEnable: true
});
//輸入提示
var auto = new AMap.Autocomplete({
input: "tipinput"
});
</script>
- 獲取搜索數(shù)據(jù)
使用 AMap.PlaceSearch
獲取地址搜索信息贷腕。
<script src="https://webapi.amap.com/maps?v=1.4.12&key=您申請(qǐng)的key值&plugin=AMap.PlaceSearch"></script>
<script type="text/javascript" src='https://a.amap.com/jsapi_demos/static/demo-center/js/prety-json.js'></script>
<script>
// 獲取搜索信息
function autoInput(){
var keywords = '軟件基地';
AMap.plugin('AMap.PlaceSearch', function(){
var autoOptions = {
city: '全國(guó)'
}
var placeSearch = new AMap.PlaceSearch(autoOptions);
placeSearch.search(keywords, function(status, result) {
// 搜索成功時(shí)廷痘,result即是對(duì)應(yīng)的匹配數(shù)據(jù)
var node = new PrettyJSON.view.Node({
el: document.querySelector("#input-info"),
data: result
});
})
})
}
</script>
- 關(guān)鍵字搜索
<div id="panel"></div>
<script>
var map = new AMap.Map("container", {
resizeEnable: true
});
AMap.service(["AMap.PlaceSearch"], function() {
//構(gòu)造地點(diǎn)查詢(xún)類(lèi)
var placeSearch = new AMap.PlaceSearch({
pageSize: 5, // 單頁(yè)顯示結(jié)果條數(shù)
pageIndex: 1, // 頁(yè)碼
city: "010", // 興趣點(diǎn)城市
citylimit: true, //是否強(qiáng)制限制在設(shè)置的城市內(nèi)搜索
map: map, // 展現(xiàn)結(jié)果的地圖實(shí)例
panel: "panel", // 結(jié)果列表將在此容器中進(jìn)行展示套耕。
autoFitView: true // 是否自動(dòng)調(diào)整地圖視野使繪制的 Marker點(diǎn)都處于視口的可見(jiàn)范圍
});
//關(guān)鍵字查詢(xún)
placeSearch.search('北京大學(xué)');
// 多關(guān)鍵字查詢(xún)
// placeSearch.search('方恒國(guó)際中心|大恒科技大廈');
});
</script>
- 周邊服務(wù)
PlaceSearch.searchNearBy
,在中心點(diǎn)附近一定范圍進(jìn)行關(guān)鍵字搜索
<div id="container"></div>
<div id="panel"></div>
<script type="text/javascript">
var map = new AMap.Map("container", {
resizeEnable: true
});
AMap.service(["AMap.PlaceSearch"], function() {
//構(gòu)造地點(diǎn)查詢(xún)類(lèi)
var placeSearch = new AMap.PlaceSearch({
type: '餐飲服務(wù)', // 興趣點(diǎn)類(lèi)別
pageSize: 5, // 單頁(yè)顯示結(jié)果條數(shù)
pageIndex: 1, // 頁(yè)碼
city: "010", // 興趣點(diǎn)城市
citylimit: true, //是否強(qiáng)制限制在設(shè)置的城市內(nèi)搜索
map: map, // 展現(xiàn)結(jié)果的地圖實(shí)例
panel: "panel", // 結(jié)果列表將在此容器中進(jìn)行展示惶凝。
autoFitView: true // 是否自動(dòng)調(diào)整地圖視野使繪制的 Marker點(diǎn)都處于視口的可見(jiàn)范圍
});
var cpoint = [116.405467, 39.907761]; //中心點(diǎn)坐標(biāo)
placeSearch.searchNearBy('', cpoint, 200, function(status, result) {
});
});
// 興趣點(diǎn)類(lèi)別吼虎,多個(gè)類(lèi)別用“|”分割,如“餐飲|酒店|電影院”
// POI搜索類(lèi)型共分為以下20種:
// 汽車(chē)服務(wù)|汽車(chē)銷(xiāo)售|汽車(chē)維修|摩托車(chē)服務(wù)|餐飲服務(wù)|購(gòu)物服務(wù)|生活服務(wù)|體育休閑服務(wù)|
// 醫(yī)療保健服務(wù)|住宿服務(wù)|風(fēng)景名勝|(zhì)商務(wù)住宅|政府機(jī)構(gòu)及社會(huì)團(tuán)體|科教文化服務(wù)|
// 交通設(shè)施服務(wù)|金融保險(xiǎn)服務(wù)|公司企業(yè)|道路附屬設(shè)施|地名地址信息|公共設(shè)施
// 默認(rèn)值:餐飲服務(wù)苍鲜、商務(wù)住宅思灰、生活服務(wù)
</script>
- 詳情查詢(xún)
PlaceSearch.getDetails
,根據(jù)POIID
獲取某個(gè)POI
的詳細(xì)信息混滔。POI
指Point of Interest
興趣點(diǎn)洒疚。
//詳情查詢(xún)
placeSearch.getDetails("B000A83U0P", function(status, result) {
if (status === 'complete' && result.info === 'OK') {
placeSearch_CallBack(result); // 回調(diào)
}
});
function placeSerach_CallBack(data){
console.log(data)
}
- 輸入提示后查詢(xún)
組合使用Autocomplete
和PlaceSearch
進(jìn)行POI
搜索。
<input id="tipinput"/>
<script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.12&key=您申請(qǐng)的key值&plugin=AMap.Autocomplete,AMap.PlaceSearch"></script>
<script>
//輸入提示
var autoOptions = {
input: "tipinput"
};
var auto = new AMap.Autocomplete(autoOptions);
var placeSearch = new AMap.PlaceSearch({
map: map
}); //構(gòu)造地點(diǎn)查詢(xún)類(lèi)
AMap.event.addListener(auto, "select", select);//注冊(cè)監(jiān)聽(tīng)坯屿,當(dāng)選中某條記錄時(shí)會(huì)觸發(fā)
function select(e) {
placeSearch.setCity(e.poi.adcode);
placeSearch.search(e.poi.name); //關(guān)鍵字查詢(xún)查詢(xún)
}
</script>
- 根據(jù)搜索結(jié)果添加Marker
var placeSearch = new AMap.PlaceSearch({
// city 指定搜索所在城市油湖,支持傳入格式有:城市名、citycode和adcode
city: '021'
})
placeSearch.search('東方明珠', function (status, result) {
// 查詢(xún)成功時(shí)领跛,result即對(duì)應(yīng)匹配的POI信息
console.log(result)
var pois = result.poiList.pois;
for(var i = 0; i < pois.length; i++){
var poi = pois[i];
var marker = [];
marker[i] = new AMap.Marker({
position: poi.location, // 經(jīng)緯度對(duì)象肺魁,也可以是經(jīng)緯度構(gòu)成的一維數(shù)組[116.39, 39.9]
title: poi.name // 鼠標(biāo)懸停展示
});
// 將創(chuàng)建的點(diǎn)標(biāo)記添加到已有的地圖實(shí)例:
map.add(marker[i]);
}
map.setFitView();
})
駕車(chē)路線(xiàn)規(guī)劃
- 駕車(chē)規(guī)劃路線(xiàn)
使用 AMap.Driving
進(jìn)行駕車(chē)路線(xiàn)規(guī)劃。
<div id="container"></div>
<div id="panel"></div>
<script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.12&key=您申請(qǐng)的key值&plugin=AMap.Driving"></script>
<script>
//基本地圖加載
var map = new AMap.Map("container", {
resizeEnable: true
});
//構(gòu)造路線(xiàn)導(dǎo)航類(lèi)
var driving = new AMap.Driving({
policy: AMap.DrivingPolicy.LEAST_TIME, // 其它policy參數(shù)請(qǐng)參考 https://lbs.amap.com/api/javascript-api/reference/route-search#m_DrivingPolicy
// 駕車(chē)策略 LEAST_TIME 最快捷 LEAST_FEE 最經(jīng)濟(jì) LEAST_DISTANCE 最短距離 REAL_TRAFFIC 考慮實(shí)時(shí)路況
ferry: 1, // 是否可以使用輪渡
province: '鄂', // 車(chē)牌省份的漢字縮寫(xiě)
map: map,
panel: "panel" // panel 屬性會(huì)將具體導(dǎo)航信息渲染到id為"panel"的DIV上 可不設(shè)置隔节。
});
// 根據(jù)起終點(diǎn)經(jīng)緯度規(guī)劃駕車(chē)導(dǎo)航路線(xiàn) 三個(gè)參數(shù) 起點(diǎn) 終點(diǎn) 回調(diào)函數(shù)
driving.search(new AMap.LngLat(116.379028, 39.865042), new AMap.LngLat(116.427281, 39.903719), function(status, result) {
// result 即是對(duì)應(yīng)的駕車(chē)導(dǎo)航信息鹅经,相關(guān)數(shù)據(jù)結(jié)構(gòu)文檔請(qǐng)參考 https://lbs.amap.com/api/javascript-api/reference/route-search#m_DrivingResult
if (status === 'complete') {
log.success('繪制駕車(chē)路線(xiàn)完成')
} else {
log.error('獲取駕車(chē)數(shù)據(jù)失敗:' + result)
}
});
// 根據(jù)起終點(diǎn)名稱(chēng)規(guī)劃駕車(chē)導(dǎo)航路線(xiàn) 兩個(gè)參數(shù) 起終點(diǎn)的數(shù)組 回調(diào)
driving.search([
{keyword: '北京市地震局(公交站)',city:'北京'},
{keyword: '亦莊文化園(地鐵站)',city:'北京'}
], function(status, result) {
if (status === 'complete'&& result.info === 'OK') {
log.success('繪制駕車(chē)路線(xiàn)完成')
} else {
log.error('獲取駕車(chē)數(shù)據(jù)失斣踅搿:' + result)
}
});
</script>
- 自定義繪制規(guī)劃駕車(chē)路線(xiàn)
// 根據(jù)起終點(diǎn)經(jīng)緯度規(guī)劃駕車(chē)導(dǎo)航路線(xiàn)
driving.search(new AMap.LngLat(116.379028, 39.865042), new AMap.LngLat(116.427281, 39.903719), function(status, result) {
// result即是對(duì)應(yīng)的駕車(chē)導(dǎo)航信息瘾晃,相關(guān)數(shù)據(jù)結(jié)構(gòu)文檔請(qǐng)參考 https://lbs.amap.com/api/javascript-api/reference/route-search#m_DrivingResult
if (status === 'complete') {
if (result.routes && result.routes.length) {
// 繪制第一條路線(xiàn),也可以按需求繪制其它幾條路線(xiàn)
drawRoute(result.routes[0])
log.success('繪制駕車(chē)路線(xiàn)完成')
}
} else {
log.error('獲取駕車(chē)數(shù)據(jù)失敾眉恕:' + result)
}
});
function drawRoute (route) {
var path = parseRouteToPath(route)
var startMarker = new AMap.Marker({
position: path[0],
icon: 'https://webapi.amap.com/theme/v1.3/markers/n/start.png',
map: map
})
var endMarker = new AMap.Marker({
position: path[path.length - 1],
icon: 'https://webapi.amap.com/theme/v1.3/markers/n/end.png',
map: map
})
var routeLine = new AMap.Polyline({
path: path,
isOutline: true,
outlineColor: '#ffeeee',
borderWeight: 2,
strokeWeight: 5,
strokeColor: '#0091ff',
lineJoin: 'round'
})
routeLine.setMap(map)
// 調(diào)整視野達(dá)到最佳顯示區(qū)域
map.setFitView([ startMarker, endMarker, routeLine ])
}
// 解析DrivingRoute對(duì)象蹦误,構(gòu)造成AMap.Polyline的path參數(shù)需要的格式
// DrivingResult對(duì)象結(jié)構(gòu)參考文檔 https://lbs.amap.com/api/javascript-api/reference/route-search#m_DriveRoute
function parseRouteToPath(route) {
var path = []
for (var i = 0, l = route.steps.length; i < l; i++) {
var step = route.steps[i]
for (var j = 0, n = step.path.length; j < n; j++) {
path.push(step.path[j])
}
}
return path
}
- 使用
AMap.DrivingRender
直接對(duì)路徑規(guī)劃的結(jié)果進(jìn)行駕車(chē)路線(xiàn)可視化展示
當(dāng)AMap.Driving
構(gòu)造類(lèi)中使用了panel
和map
屬性后,在調(diào)用driving.search
完成后就會(huì)自動(dòng)繪制路線(xiàn)信息和路線(xiàn)肉津,回調(diào)用來(lái)把握路線(xiàn)繪制完成后做何操作强胰,而Lib.AMap.DrivingRender()).autoRender()
則是在回調(diào)中進(jìn)行繪制渲染。
<script type="text/javascript" src="https://cache.amap.com/lbs/static/DrivingRender1230.js"></script>
<div id="container"></div>
<div id="panel"></div>
<script type="text/javascript">
var map = new AMap.Map("container", {
resizeEnable: true
});
//駕車(chē)導(dǎo)航妹沙,您如果想修改結(jié)果展現(xiàn)效果偶洋,請(qǐng)參考頁(yè)面:https://lbs.amap.com/fn/css-style/
var drivingOption = {
policy:AMap.DrivingPolicy.LEAST_TIME
};
var driving = new AMap.Driving(drivingOption); //構(gòu)造駕車(chē)導(dǎo)航類(lèi)
//根據(jù)起終點(diǎn)坐標(biāo)規(guī)劃駕車(chē)路線(xiàn)
driving.search([{keyword:'北京市地震局(公交站)'},{keyword:'亦莊文化園(地鐵站)'}], function(status, result){
if(status === 'complete' && result.info === 'OK'){
(new Lib.AMap.DrivingRender()).autoRender({
data: result,
map: map,
panel: "panel"
});
log.success('繪制駕車(chē)路線(xiàn)完成')
}else{
log.error('獲取駕車(chē)數(shù)據(jù)失敗:' + result)
}
});
</script>
- 可拖拽駕車(chē)路線(xiàn)規(guī)劃
var map, route, marker;
//基本地圖加載
map = new AMap.Map("container", {
resizeEnable: true
});
//繪制初始路徑
var path = [];
path.push([116.303843, 39.983412]);// 起點(diǎn)
path.push([116.321354, 39.896436]); // 途經(jīng)點(diǎn)
path.push([116.407012, 39.992093]); // 終點(diǎn) 如果只有兩個(gè)就是起終點(diǎn)
map.plugin("AMap.DragRoute", function() {
route = new AMap.DragRoute(map, path, AMap.DrivingPolicy.LEAST_FEE); //構(gòu)造拖拽導(dǎo)航類(lèi)
route.search(); //查詢(xún)導(dǎo)航路徑并開(kāi)啟拖拽導(dǎo)航
// 每次拖動(dòng)的如果不是起點(diǎn) 終點(diǎn) 途經(jīng)點(diǎn)中的一個(gè) 則會(huì)新增加一個(gè)途經(jīng)點(diǎn)
});
- 途經(jīng)點(diǎn)
driving.search(new AMap.LngLat(116.379028, 39.865042), new AMap.LngLat(116.427281, 39.903719),{
waypoints:[new AMap.LngLat(116.379028, 39.885042)]
// 第三個(gè)參數(shù)為途經(jīng)點(diǎn)對(duì)象 對(duì)象中有waypoints屬性(數(shù)組)
}, function(status, result) {
// result 即是對(duì)應(yīng)的駕車(chē)導(dǎo)航信息距糖,相關(guān)數(shù)據(jù)結(jié)構(gòu)文檔請(qǐng)參考 https://lbs.amap.com/api/javascript-api/reference/route-search#m_DrivingResult
if (status === 'complete') {
log.success('繪制駕車(chē)路線(xiàn)完成')
} else {
log.error('獲取駕車(chē)數(shù)據(jù)失斝选:' + result)
}
});
貨車(chē)路線(xiàn)規(guī)劃
- 位置經(jīng)緯度 + 貨車(chē)路線(xiàn)規(guī)劃
使用 AMap.TruckDriving
與經(jīng)緯度信息進(jìn)行貨車(chē)路線(xiàn)規(guī)劃。
<script type="text/javascript" src='https://webapi.amap.com/maps?v=1.4.12&key=您申請(qǐng)的key值&plugin=AMap.TruckDriving'></script>
var map = new AMap.Map("container", {});
var truckOptions = {
map: map,
city:'beijing',
policy: 0, // 規(guī)劃策略
size: 1, // 車(chē)型大小
width: 2.5, // 寬度
height: 2, // 高度
load: 1, // 載重
weight: 12, // 自重
axlesNum: 2, // 軸數(shù)
province: '京', // 車(chē)輛牌照省份
isOutline: true,
outlineColor: '#ffeeee',
panel: 'panel'
};
var driving = new AMap.TruckDriving(truckOptions);
var path = []; // 添加的是對(duì)象 經(jīng)緯度查詢(xún)
path.push({lnglat:[116.303843, 39.983412]});//起點(diǎn)
path.push({lnglat:[116.321354, 39.896436]});//途徑
path.push({lnglat:[116.407012, 39.992093]});//終點(diǎn)
var path1 = [ // 添加的是對(duì)象 關(guān)鍵字查詢(xún)
{keyword:'北京站',city:'010'},//起點(diǎn)
{keyword:'北京西站',city:'010'},//途徑
{keyword:'北京大學(xué)',city:'010'}//終點(diǎn)
];
driving.search(path, function(status, result) {
// result即是對(duì)應(yīng)的貨車(chē)導(dǎo)航信息悍引,相關(guān)數(shù)據(jù)結(jié)構(gòu)文檔請(qǐng)參考 https://lbs.amap.com/api/javascript-api/reference/route-search#m_DrivingResult
if (status === 'complete') {
log.success('繪制貨車(chē)路線(xiàn)完成')
// 也可以在獲取規(guī)劃數(shù)據(jù)后自定義繪制
// if (result.routes && result.routes.length) {
// drawRoute(result.routes[0]) 函數(shù) 用來(lái)自定義繪制路線(xiàn)
// }
} else {
log.error('獲取貨車(chē)規(guī)劃數(shù)據(jù)失敹髦:' + result)
}
});
步行路線(xiàn)規(guī)劃
- 位置經(jīng)緯度 + 步行路線(xiàn)規(guī)劃
使用AMap.Walking
進(jìn)行步行路線(xiàn)規(guī)劃。
<script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.12&key=您申請(qǐng)的key值&plugin=AMap.Walking"></script>
//步行導(dǎo)航
var walking = new AMap.Walking({
map: map,
panel: "panel"
});
//根據(jù)起終點(diǎn)坐標(biāo)規(guī)劃步行路線(xiàn)
walking.search([116.399028, 39.845042], [116.436281, 39.880719], function(status, result) {
// result即是對(duì)應(yīng)的步行路線(xiàn)數(shù)據(jù)信息趣斤,相關(guān)數(shù)據(jù)結(jié)構(gòu)文檔請(qǐng)參考 https://lbs.amap.com/api/javascript-api/reference/route-search#m_WalkingResult
if (status === 'complete') {
log.success('繪制步行路線(xiàn)完成')
} else {
log.error('步行路線(xiàn)數(shù)據(jù)查詢(xún)失敗' + result)
}
});
// 根據(jù)地點(diǎn)關(guān)鍵字規(guī)劃步行路線(xiàn)
walking.search([
{keyword: '北京市地震局(公交站)',city:'北京'},
{keyword: '亦莊文化園(地鐵站)',city:'北京'}
], function(status, result) {} });
// 使用 AMap.WalkingRender 對(duì)『步行路線(xiàn)規(guī)劃結(jié)果數(shù)據(jù)』進(jìn)行可視化展示
// var walking = new AMap.Walking(); //構(gòu)造路線(xiàn)導(dǎo)航類(lèi)
walking.search(new AMap.LngLat(116.464996,39.971433), new AMap.LngLat(116.396034,39.923271), function(status, result){
if(status === 'complete'){
(new Lib.AMap.WalkingRender()).autoRender({
data: result,
map: map,
panel: "panel"
});
log.success('繪制步行路線(xiàn)完成')
}
});
騎行路線(xiàn)規(guī)劃
使用AMap.Riding
進(jìn)行騎行路線(xiàn)規(guī)劃
<script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.12&key=您申請(qǐng)的key值&plugin=AMap.Riding"></script>
//騎行導(dǎo)航
var riding = new AMap.Riding({
map: map,
panel: "panel"
});
// 配置項(xiàng)
// var ridingOption = {
// map: map,
// panel: "panel",
// policy: 1,
// hideMarkers: false,
// isOutline: true,
// outlineColor: '#ffeeee',
// autoFitView: true
// }
//根據(jù)起終點(diǎn)坐標(biāo)規(guī)劃騎行路線(xiàn)
riding.search([116.397933,39.844818],[116.440655,39.878694], function(status, result) {});
// 根據(jù)關(guān)鍵點(diǎn)規(guī)劃騎行路線(xiàn)
riding.search([
{keyword: '臨泓路6號(hào)院',city:'北京'},
{keyword: '龍?zhí)豆珗@',city:'北京'}
], function(status,result) {})
公交路線(xiàn)規(guī)劃
使用AMap.Transfer
進(jìn)行公交路線(xiàn)規(guī)劃俩块。
<script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.12&key=您申請(qǐng)的key值&plugin=AMap.Transfer"></script>
var map = new AMap.Map("container", {
resizeEnable: true,
center: [116.397428, 39.90923],
zoom: 13 //地圖顯示的縮放級(jí)別
});
var transOptions = {
map: map,
city: '北京市',
panel: 'panel',
//cityd:'烏魯木齊',//跨城進(jìn)行公交路徑規(guī)劃時(shí),目的地所在城市
policy: AMap.TransferPolicy.LEAST_TIME,
nightflag: true, // 是否計(jì)算夜班車(chē)
};
//構(gòu)造公交換乘類(lèi)
var transfer = new AMap.Transfer(transOptions);
//根據(jù)起浓领、終點(diǎn)坐標(biāo)查詢(xún)公交換乘路線(xiàn)
transfer.search(new AMap.LngLat(116.291035,39.907899), new AMap.LngLat(116.427281, 39.903719), function(status, result) {
// result即是對(duì)應(yīng)的公交路線(xiàn)數(shù)據(jù)信息玉凯,相關(guān)數(shù)據(jù)結(jié)構(gòu)文檔請(qǐng)參考 https://lbs.amap.com/api/javascript-api/reference/route-search#m_TransferResult
if (status === 'complete') {
log.success('繪制公交路線(xiàn)完成')
// 也可以搜索到了即刻展示 之前配置項(xiàng)里面就不需要再配map和panel
// (new Lib.AMap.TransferRender()).autoRender({
// data:result,
// map:map,
// panel:"panel"
// });
} else {
log.error('公交路線(xiàn)數(shù)據(jù)查詢(xún)失敗' + result)
}
});
//根據(jù)起、終點(diǎn)名稱(chēng)查詢(xún)公交換乘路線(xiàn)
transfer.search([
//元素city缺省時(shí)取transOptions的city屬性
{keyword: '地震局',city:'北京'},
{keyword: '望京西園4區(qū)',city:'北京'}
], function(status, result) {});