No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Hows the right way to do this cordova geolocation

    Framework
    1
    1
    406
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      donvie last edited by

      <template>

      </template>

      <script>

      document.addEventListener(‘deviceready’, () => {
      navigator.geolocation.getCurrentPosition(this.onMapSuccess(), this.onMapError(), { maximumAge: 3000, timeout: 5000, enableHighAccuracy: true })
      }, false)

      export default {
      methods: {
      onMapSuccess (position) {
      this.Latitude = position.coords.latitude
      this.Longitude = position.coords.longitude
      }
      }
      }
      </script>

      1 Reply Last reply Reply Quote 0
      • First post
        Last post