Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70440

GeoLocation and Map Integration in Ionic Vue App with capacitor

$
0
0

@Princeoo7 wrote:

i am looking for a solution where i can implement maps and show current user location on it in Ionic Vue app.

i did implemented the same in angular but the gps don’t always work properly.

code i use is as below for the angular version.

async getCurrentPosition() {
    const { Geolocation } = Plugins;

    try {
      const coordinates = await Geolocation.getCurrentPosition();
      this.zone.run(() => {
        this.singleCoords = coordinates.coords;
        console.log("Single Coords :", this.singleCoords);
      });
    } catch (e) {
      alert("WebView geo error");
      console.error(e);
    }
  }

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70440

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>