Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12598] iOS: Reverse Geocoder returning invalid parameters for all latitudes & longitudes

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionCannot Reproduce
Resolution Date2013-04-05T08:37:09.000+0000
Affected Version/sRelease 3.0.0, Release 3.1.0
Fix Version/sRelease 3.0.2
ComponentsiOS
LabelsSupportTeam
ReporterEduardo Gomez
AssigneeShameer Jan
Created2013-02-05T23:13:43.000+0000
Updated2017-03-31T20:28:42.000+0000

Description

Issue

Recently several Developers are experiencing problems with it, on *both iOS & Android*. ReverseGeocoder failed to get too common locations. - [London](https://www.google.com.mx/search?num=100&hl=en&safe=off&client=firefox-a&hs=wpp&tbo=d&rls=org.mozilla%3Aen-GB%3Aofficial&q=london+lat+lon&oq=london+lat+lon&gs_l=serp.3..0l2j0i7i30j0i30l3j0i7i30l2j0i5i30l2.364190.364971.0.365291.6.6.0.0.0.1.202.659.4j1j1.6.0.les%3B..0.0...1c.1.2.serp.W80lmVkSzU4)
Ti.Geolocation.reverseGeocoder(51.5171, -0.1062, function (e) {
    alert('e: ' + JSON.stringify(e));
});
- [New York](https://www.google.com.mx/search?q=new+york+lat+lon&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-GB:official&client=firefox-a)
Ti.Geolocation.reverseGeocoder(40.7142, -74.0064, function (e) {
    alert('e: ' + JSON.stringify(e));
});

Tested on

iOS 6 simulator and iPhone device

Runnable JS

Ti.Geolocation.getCurrentPosition(function(evt_loc) {
	data.lat = evt_loc.coords.latitude;
	data.lng = evt_loc.coords.longitude;
	Ti.Geolocation.reverseGeocoder(parseFloat(evt_loc.coords.latitude), parseFloat(evt_loc.coords.longitude), function(evt_addr) {
		if (evt_addr.success) {
			data.address = evt_addr.places[0].address;
			data.city = evt_addr.places[0].city;
			data.zip = evt_addr.places[0].zipcode;
		} else {
			alert('We were not able to determine your location. Please ensure GPS service and try again.');
		}
	});
});

Output

{'message' : 'Inavalid Parameters', 'success' : false }

Community thread associated

http://developer.appcelerator.com/question/147885/reverse-geocoder-returning-invalid-parameters-for-all-latitudes--longitudes#comment-157532

Comments

  1. Shameer Jan 2013-04-05

    Issue does not reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 Titanium SDK version: 3.0.2 iOS iPhone Simulator: iOS SDK version: 6.0
  2. Lee Morris 2017-03-07

    Unable to reproduce this issue, tested with the following environment; iPhone 7 and Simulator (10.2) MacOS 10.11.6 (15G31) Studio 4.8.1.201612050850 Ti SDK 6.0.2 GA Appc NPM 4.2.8 Appc CLI 6.1.0 Ti CLI 5.0.11 Alloy 1.9.5 Arrow 1.10.1 Xcode 8.2 (8C38) Node v4.6.0 Java 1.7.0_80

JSON Source