Wikitude
play_for_work
Forum
FAQ
Documentation
Download
wikitude.com
How can we help you today?
Enter your search term here...
Search
Start a new topic
Discussions
Cordova, Titanium, Unity, Xamarin
Cordova Questions or Problems
How I get my location in javascript by phonegap and calculate the distance
k
kunchit surachon
started a topic
over 9 years ago
How I get my location in javascript by phonegap and calculate the distance
2 Comments
Oldest First
Popular
Newest First
Sorted by
Oldest First
k
kunchit surachon
said
over 9 years ago
How I get my location in javascript by phonegap and calculate the distance between my location and my destination.
Ö
Önder ALTINTA?
said
over 9 years ago
not wikitude related answer but it is easy job, you get location with phonegap geolocation plugin:
http://docs.phonegap.com/en/3.0.0/cordova_geolocation_geolocation.md.html#Geolocation
you calculate the distance between 2 locations can be done by converting them in metric coordinate system from lat,lon. You can use google's (900913)
then calculating the distance between 2 points is:
point1(x1,y1) , point2(x2,y2)
distance=sqrt((x1-x2)^2+(y1-y2)^2)
Login
or
Signup
to post a comment
More topics in
Cordova Questions or Problems
Show POI only on Radar, not on camera
Capture Screen
Phonegap + SenchaTouch or other frameworks
PhoneGap App Issues
iOS App Compilation Error
JSon data WikitudeSDK + PhoneGap
onExit() , Avoid to close the AR on "BackButton" - Wikitude - PhoneGap
HTMLDrawable in Phonegap Plugin
Video not playing (wikitude sdk 1.1.1 + phonegap)
Bug when using PhoneGap and opening AR view multiple times
See all 577 topics
© 2021 Wikitude, a Qualcomm company
kunchit surachon