|
@@ -339,7 +339,7 @@ import VueAMap from "vue-amap";
|
|
|
// Vue.use(VueAMap)
|
|
|
VueAMap.initAMapApiLoader({
|
|
|
key: "b1e6ac2eb28902ce91a490edf194e000",
|
|
|
- plugin: ["AMap.Geolocation", "AMap.PlaceSearch", "AMap.Geocoder"],
|
|
|
+ plugin: ["AMap.Geolocation", "AMap.PlaceSearch", "AMap.Geocoder", "Geocoder"],
|
|
|
v: "1.4.4",
|
|
|
});
|
|
|
|
|
@@ -404,12 +404,12 @@ export default {
|
|
|
events: {
|
|
|
init(o) {},
|
|
|
zoomchange: (e) => {
|
|
|
- console.log(e);
|
|
|
+ // console.log(e);
|
|
|
},
|
|
|
zoomend: (e) => {
|
|
|
//获取当前缩放zoom值
|
|
|
- console.log(this.$refs.map.$$getInstance().getZoom());
|
|
|
- console.log(e);
|
|
|
+ // console.log(this.$refs.map.$$getInstance().getZoom());
|
|
|
+ // console.log(e);
|
|
|
},
|
|
|
click: (e) => {
|
|
|
this.getpoient(e);
|
|
@@ -535,7 +535,11 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
getpoient(e) {
|
|
|
- let geocoder = new AMap.Geocoder();
|
|
|
+ // let geocoder = new AMap.Geocoder()
|
|
|
+ let geocoder = null
|
|
|
+ AMap.plugin(["AMap.Geocoder"], function() {
|
|
|
+ geocoder = new AMap.Geocoder()
|
|
|
+ })
|
|
|
let that = this;
|
|
|
geocoder.getAddress(e.lnglat, function (status, result) {
|
|
|
if (status === "complete" && result.regeocode) {
|