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

UI: current location using geolocation #70

Open

Description

@sagar1911

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) ??

Activity

  1. radeva commented on Aug 18, 2017

    @radeva
    Contributor

    Hi @sagar1911 ,

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

    Best regards,
    Veselina

  2. sagar1911 commented on Aug 18, 2017

    @sagar1911
    Author

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

  3. radeva commented on Aug 18, 2017

    @radeva
    Contributor

    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

  4. added this to the vFuture milestone on Sep 1, 2017
  5. dnlmelo commented on Aug 10, 2022

    @dnlmelo

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions