What's new

Closed HTML & Javascript - Paano mapapa improve ang current location ng user

Status
Not open for further replies.

1nn0c3ntv5

Honorary Poster
Joined
Feb 10, 2020
Posts
143
Reaction
215
Points
133
Age
25
Yung web app na kailangan kong gawin ay kailangan makuha ng user location, may alam po ba kayo kung paano makukuha ang accurate o nearly accurate na coordinates na kinatatayuan ng user?

Ito yung mga solusyon na mga naisip ko:

1. GetCurrentPosition - Dito nirereturn niya yung position ng isang user na nasa iisang lugar

function getData() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(providePosition,showError);
} else {
x.innerHTML = "Geolocation is not supported by this browser.";
}
}
PROBLEM: Paano kung lumipat yung user sa iba pang lubar (example: Nasa Point A (Makati) si user tapos sumakay siya ng Jeep papuntang Point B (Manila) yung problema dito, most likely i rereturn na value ay Point A at hindi Point B, yung ginawa kong solusyon ay nasa #2)

2. WatchPosition - Dito parang minomonitor niya yung bawat paggalaw ng isang user mula sa isang lugar papunta sa iba pang lugar

function getData() {
if (navigator.geolocation) {
navigator.geolocation.watchPosition(providePosition,showError);
} else {
x.innerHTML = "Geolocation is not supported by this browser.";
}
}
PROBLEM: Hindi gaano kaaccurate ang data at minsan nag rereturn ng mga coordinates na hindi mo pa nadadaanan.

May alam pa ba kayong paraan kung paano makakakuha ng isang accurate o near accurate na coordinate gamit ang Javascript, C# o iba pang langgwahe?
 
parang may kulang yung gamit mo sa watchPosition


JavaScript:
      geolocation.watchPosition(handleSuccess, errorCallback, {
        enableHighAccuracy: true,
        maximumAge: 5000 // 5 sec.
      });
 
Do you have permission to track your users? Is this tracking for the benefit of the user or for the benefit of whom?
Yeah there's a permission with regards to the user being tracked. It was defined on the project scope and user agreement together with a personal validation.
 
Parang spy app. hmm mahirap gumawa ng ganyan html/c# palang tinuro samen pero good luck sayo ts
 
Status
Not open for further replies.

Similar threads

Back
Top