|
@@ -210,12 +210,13 @@
|
|
|
AMap.plugin(
|
|
|
['AMap.Autocomplete', 'AMap.PlaceSearch', 'AMap.Geocoder', 'AMap.DistrictSearch'],
|
|
|
function() {
|
|
|
+ var autocomplete
|
|
|
if(AMap.Autocomplete){
|
|
|
- var autocomplete = new AMap.Autocomplete({
|
|
|
+ autocomplete = new AMap.Autocomplete({
|
|
|
input: 'searchValue',
|
|
|
})
|
|
|
}else{
|
|
|
- var autocomplete = new AMap.AutoComplete({
|
|
|
+ autocomplete = new AMap.AutoComplete({
|
|
|
input: 'searchValue',
|
|
|
})
|
|
|
}
|
|
@@ -232,7 +233,7 @@
|
|
|
level: 'city',
|
|
|
showbiz: false,
|
|
|
});
|
|
|
-
|
|
|
+ console.log(autocomplete)
|
|
|
AMap.event.addListener(autocomplete, 'select', function(e) {
|
|
|
that.marker.setMap(that.map)
|
|
|
if (e.poi.location) {
|