yangyanggu / vue-amap

高德地图封装 for vue2 vue3.0
https://vue-amap.guyixi.cn/
MIT License
277 stars 16 forks source link

vue3.0 组件怎么调用geocoder 进行逆地理编码? #54

Open Emmpty opened 1 year ago

Emmpty commented 1 year ago

使用版本

请填写使用版本: `

var geocoder; //加载地理编码插件 mapObj.plugin(["AMap.Geocoder"], function() { //加载地理编码插件 geocoder = new AMap.Geocoder({ radius: 1000, //以已知坐标为中心点,radius为半径,返回范围内兴趣点和道路信息 extensions: "all" //返回地址描述以及附近兴趣点和道路信息,默认“base” }); //返回地理编码结果 geocoder.on("complete", geocoder_CallBack); //逆地理编码 geocoder.getAddress(new AMap.LngLat(116.359119, 39.972121)); });

`

问题描述

yangyanggu commented 1 year ago

你这都已经写完了。。。

Emmpty commented 1 year ago

是想通过组件实例去调用 或者类似 hooks useGeocoder() 能引入这个模块进行调用

yangyanggu commented 1 year ago

目前还没有提供hooks的想法