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

时间:2019-11-06 11:09:36

标签: vue.js geolocation 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/

0 个答案:

没有答案