Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

UI: current location using geolocation #70

Open
sagar1911 opened this issue Aug 18, 2017 · 4 comments
Open

UI: current location using geolocation #70

sagar1911 opened this issue Aug 18, 2017 · 4 comments

Comments

@sagar1911
Copy link

sagar1911 commented Aug 18, 2017

Hi,
I am using geolocation plugin in NS-core to get the current location.
Here is the code

var location = geolocation.getCurrentLocation({desiredAccuracy: 3, updateDistance: 10, maximumAge: 20000, timeout: 20000}).
then(function(loc) {
if (loc) {
console.log("Current location is: " + JSON.stringify(loc));
}
}, function(e){
console.log("Error: " + e.message);
});

the code is giving the values of latitude, longitude, altitude, horizontalAccuracy, verticalAccuracy, direction, timestamp, android ..

My question is to which function I have to feed those values to get the current location(string) ??

@radeva
Copy link
Contributor

radeva commented Aug 18, 2017

Hi @sagar1911 ,

What kind of string do you expect? Could you give an example?

Best regards,
Veselina

@sagar1911
Copy link
Author

sagar1911 commented Aug 18, 2017

Hi @radeva,
Location like Hyderabad .. Can I get like that ??

@radeva
Copy link
Contributor

radeva commented Aug 18, 2017

Hi @sagar1911 ,

Currently the plugin doesn't offer such functionality. To achieve this you need to use GeoCoder for Android and CLGeocoder for iOS (5+). We might consider implementing this in the future, but I cannot promise anything.

Till then, feel free to submit a PR with this feature.

Best regards,
Veselina

@angeltsvetkov angeltsvetkov added this to the vFuture milestone Sep 1, 2017
@dnlmelo
Copy link

dnlmelo commented Aug 10, 2022

Hello!
Do you have some update about geocoder abstraction in NS?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants