如何使用vue和vue2-leaflet获取地理位置?

我正在使用vue2-传单。我想在用户当前位置显示中心属性。有没有简单的方法可以做到这一点?

我已经尝试过在mount()中使用navigator.geolocation.getcurrentPosition,并且在地图组件上使用v-if,一旦api调用完成,该组件就会显示地图。但这似乎不起作用。

Failed to create provisioning profile.
There are no devices registered in your account on the developer website. Plug in and select a device to have Xcode register it.

这里还有一个演示:https://beer-on-map.netlify.com/

ghostap 回答:如何使用vue和vue2-leaflet获取地理位置?

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3152781.html

大家都在问