This commit is contained in:
parent
38469c30c3
commit
853db1af9c
|
@ -69,7 +69,25 @@ export function addMarker(map,pointMap,orderList,clickCellBack){
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
export function amapLocations(map){
|
||||||
|
AMap.plugin('AMap.Geocoder', function() {
|
||||||
|
var geocoder = new AMap.Geocoder({
|
||||||
|
enableHighAccuracy: true,
|
||||||
|
});
|
||||||
|
var lnglat = [125.433131,43.878774];
|
||||||
|
|
||||||
|
geocoder.getAddress(lnglat, function (status, result) {
|
||||||
|
if (status === "complete" && result.info === "OK") {
|
||||||
|
// result为对应的地理位置详细信息
|
||||||
|
console.log('result=================.',result);
|
||||||
|
return result;
|
||||||
|
}else{
|
||||||
|
console.error('定位失败','失败原因排查信息:'+result.message+result.originMessage);
|
||||||
|
return result.message;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
export function amapLocation(map){
|
export function amapLocation(map){
|
||||||
AMap.plugin('AMap.Geolocation', function() {
|
AMap.plugin('AMap.Geolocation', function() {
|
||||||
var geolocation = new AMap.Geolocation({
|
var geolocation = new AMap.Geolocation({
|
||||||
|
|
Loading…
Reference in New Issue