Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23534] ReverseGeocoder Not getting the real address

GitHub Issuen/a
TypeBug
Priorityn/a
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsreversegeocoder
ReporterRodrigo Macazaga
AssigneeUnknown
Created2016-06-10T01:02:34.000+0000
Updated2018-02-28T19:54:51.000+0000

Description

The address for that lat and long values is: 701 N Vista Ridge Blvd Cedar Park, TX 78613 30.527807, -97.792323 // try to get address Titanium.Geolocation.reverseGeocoder(30.527935, -97.792357, function(evt) { //here we will store address information if (evt.success) { var places = evt.places; alert(JSON.stringify(places)); if (places && places.length) { street = places[0].street; cCityChannel = places[0].city; country = places[0].country_code; } else { cCityChannel = ''; address = "No address found"; } } }); Also with other positions i get different address. Using google api returns a correct value.

Comments

  1. Rodrigo Macazaga 2016-06-10

    With that lat and long position i´m getting this address: 2401 Hollis Ln Cedar Park, TX 78613 30.526457, -97.792140
  2. Nazmus Salahin 2016-06-12

    Hello, I am able to reproduce this issue with given code and given step. For the lat long Google Map gives the following address. 701 N Vista Ridge Blvd Cedar Park, TX 78613 30.527807, -97.792323 [Screenshot](https://i.imgsafe.org/cfcb82eac7.png) But following codes with Titanium.Geolocation.reverseGeocoder gives this address: 2401 Hollis Lane Cedar Park, TX 78613 30.526457, -97.792140 *Code:*
       var win1 = Titanium.UI.createWindow({
       	title : 'Tab 1',
       	backgroundColor : '#fff'
       });
       
       win1.open();
       
       win1.addEventListener("open", function(e) {
       	// try to get address
       	Titanium.Geolocation.reverseGeocoder(30.527935, -97.792357, function(evt) {
       		//here we will store address information
       
       		if (evt.success) {
       			var places = evt.places;
       			alert(JSON.stringify(places));
       			Ti.API.log(JSON.stringify(places)); // gives log here
       			
       			if (places && places.length) {
       				street = places[0].street;
       				cCityChannel = places[0].city;
       				country = places[0].country_code;
       			} else {
       				cCityChannel = '';
       				address = "No address found";
       			}
       
       		}
       	});
       });
       
    *Console Log:*
        [{"street1":"Hollis Lane","postalCode":"TX 78613","address":"Hollis Lane, Cedar Park, TX TX 78613, United States of America","displayAddress":"Hollis Lane, Cedar Park, TX TX 78613, United States of America","street":"Hollis Lane","countryCode":"US","region2":"","longitude":"-97.7920892","region1":"","latitude":"30.5264373","country_code":"US","country":"United States of America","city":"Cedar Park"}]
       
    *Environment*: *Device info:* Nexus7 (android 6.0.1) *Node.js Version:* 0.12.7 *npm Version:* 2.11.3 *Titanium SDKs:* 5.3.0.GA *Java Development Kit Version:* 1.8.0_73 *Titanium CLI Version:* 5.0.6 *Appcelerator CLI Version:* 5.2.2 *Appcelerator Studio:* 4.5.0

JSON Source