Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-19875

Ti.Geolocation.reverseGeocoder gives twisted value of latitude,longitude.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Duplicate
    • Affects Version/s: Release 5.0.2
    • Fix Version/s: None
    • Component/s: Android
    • Labels:

      Description

      Recently I tried to solve issue in Q&A forum but I got same result as he got.

      So the problem is Ti.Geolocation.reverseGeocoder gives latitude & longitude in reverse order.

      Example :
      Ti.Geolocation.accuracy = Ti.Geolocation.ACCURACY_HIGH;

      Ti.Geolocation.getCurrentPosition(showAddress);

      function showAddress(e) {
      Ti.API.info("Latitude == " + e.coords.latitude);
      Ti.API.info("Longitude == " + e.coords.longitude);

      Ti.Geolocation.reverseGeocoder(e.coords.latitude , e.coords.longitude, function (data)

      { Ti.API.info("\nReverse Geocode address == " + JSON.stringify(data.places[0])); Ti.API.info("\nReverse Geocode Lat == " + data.places[0].latitude); Ti.API.info("Reverse Geocode Long == " + data.places[0].longitude); }

      );
      }

      OUTPUT :
      Latitude == 11.12345
      Longitude == 55.12345

      Reverse Geocode address ==

      {"street":"xxxx","city":"xxxx","address":"xxxxxxxx","state":"xxxxxx","country_code":"xxxx","country":"xxxx","longitude":11.12345,"latitude":55.12345,"zipcode":"xxxx"}

      Reverse Geocode Lat == 55.12345
      Reverse Geocode Long == 11.12345

      Reference Link :

      https://community.appcelerator.com/topic/3858/could-anyone-try-the-below-code-get-back-to-me-whether-it-is-really-a-bug-or-i-am-doing-something-wrong

        Attachments

          Activity

            People

            • Assignee:
              ssombhatla Srikanth Sombhatla (Inactive)
              Reporter:
              mitulbhalia Mitul Bhalia
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-20602
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code