forwardGeocoder broken
See this post:
https://developer.appcelerator.com/question/26321/forwardgeocoder-only-works-for-one-address
This is still the case as of today. We can only get forwardGecoder to work for the address in KS. This used to work, has google made a breaking change to their APIs?
3 Answers
-
Please see this ticket for details on how we are handling this: TIMOB-4880
In the meantime, you can do the forward geocoding yourself very easily, something like this:
xhr = Titanium.Network.createHTTPClient(); var query = 'Pittsburgh PA 15202'; // or whatever you want to forward geocode xhr.open('GET', 'http://maps.googleapis.com/maps/geo?output=json&q=' + query); xhr.onload = function() { var json = JSON.parse(this.responseText); Ti.API.info(json); }; xhr.send();
-
Right - this used to work…
Titanium.Geolocation.forwardGeocoder(a,function(evt){ Titanium.App.Properties.setString('selectedLatitude',evt.latitude); Titanium.App.Properties.setString('selectedLongitude',evt.longitude); });
but now returns 0 and 0.
Ahem, the forwardGeocoder method does not exist in the docs.
and there doesn't seem to be any reference in release notes to changes to it? -
KitchenSink fails forward/reverse geocode test
- code takes Appcelerator address,
- uses forward geocode to translate into lat/lon
- then uses reverse geocode to convert back to address
so in KitchenSink what do we get…
input: "444 Castro Street, Mountain View, CA 94041"
lat:0 & lon: 0
output: "1 infinity loop, Cupertino, 15014"
Test: Fail
And according to this page, the google maps API hasn't changed in almost 4 weeks.
http://code.google.com/p/gmaps-api-issues/wiki/JavascriptMapsAPIChangelog