Coder Social home page Coder Social logo

Comments (5)

sebastianbaar avatar sebastianbaar commented on June 4, 2024

Hey @surajsingh23 ,
please fill out the bug template:

Thanks!


Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior or sample code/repo.

Expected behavior
A clear and concise description of what you expected to happen.

Plugin Version
vX.X.X

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6] or Emulator: [e.g. Nexus 7]
  • OS: [e.g. iOS8.1]

Additional context
Add any other context about the problem here.

from cordova-plugin-nativegeocoder.

surajsingh23 avatar surajsingh23 commented on June 4, 2024

hey, @sebastianbaar
my question is why "thoroughfare" and "subThoroughfare" always return a null value?

this is my code.

var options = {
      timeout: 5000,
      enableHighAccuracy: true,
    };
    this.geoLocation.getCurrentPosition(options).then(resp => {
      this.latitude = resp.coords.latitude;
      this.longitude = resp.coords.longitude
      this.reverseGeoCoding(resp.coords.latitude, resp.coords.longitude);
    })
  }
  reverseGeoCoding(lat, lng) {
    this.nativeGeocoder.reverseGeocode(lat, lng).then(resp => {
       this.address =  resp[0].subThoroughfare+ " ," resp[0].thoroughfare+ " ," resp[0].subLocality + " ," + resp[0].locality + " ," + resp[0].administrativeArea + " ," + resp[0].countryName + "," + resp[0].postalCode;
    })
  }


Plugin Version
v3.1.4

expected
resp[0].subThoroughfare = some value, resp[0].thoroughfare = some value;

actual result
but thoroughfare and subThoroughfare always return null;
resp[0].subThoroughfare = null, resp[0].thoroughfare = null;

Device
Device: nokia 6.1 Plus, google pixel 3

Thanks!

from cordova-plugin-nativegeocoder.

surajsingh23 avatar surajsingh23 commented on June 4, 2024

can u please reply

from cordova-plugin-nativegeocoder.

sebastianbaar avatar sebastianbaar commented on June 4, 2024

Hey @surajsingh23,

please try again with these location points:

public latitude: number =  52.51627;
public longitude: number = 13.37770;

This should return a valid thoroughfare (subThoroughfare is empty though - couldn't find a good example for subThoroughfare in the moment but it should be sufficient to fix your problem).

Cheers

from cordova-plugin-nativegeocoder.

sebastianbaar avatar sebastianbaar commented on June 4, 2024

Closed due to inactivity

from cordova-plugin-nativegeocoder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.