搜索
This commit is contained in:
parent
f152675253
commit
be4df03f64
|
|
@ -262,7 +262,7 @@
|
|||
//点击搜索按钮
|
||||
$(document).on('click', '.confirm', function () {
|
||||
var zoom = map.getZoom();
|
||||
console.log(map)
|
||||
// console.log(map)
|
||||
var data = {lat: lat, lng: lng, zoom: zoom, address: address,city_code:city_code};
|
||||
if (fromtype !== totype) {
|
||||
var result = gcoord.transform([data.lng, data.lat], gcoord[fromtype], gcoord[totype]);
|
||||
|
|
|
|||
|
|
@ -311,7 +311,8 @@
|
|||
this.reload(null, true)
|
||||
return
|
||||
};
|
||||
var keywords = keyword.replace(' ','').replace('/','').split('')
|
||||
var keywords = [keyword];
|
||||
// console.log(keywords);
|
||||
var data = this.labelList.filter(function(item) {
|
||||
item.num = 0
|
||||
keywords.forEach(function(key) {
|
||||
|
|
@ -321,7 +322,7 @@
|
|||
return item.num>(keywords.length==1?0:1)
|
||||
}).sort(function(a, b) {
|
||||
return b.num - a.num
|
||||
}).slice(0, 10)
|
||||
}).slice(0, 15)
|
||||
this.reload(data, true)
|
||||
}
|
||||
//关键词筛选数据(暂不用)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user