Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

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?

— asked May 21st 2010 by Vinh Bui
  • android
  • forwardgeocoder
  • geocode
  • iphone
0 Comments

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();
    
    — answered November 30th 2011 by Tony Lukasavage
    permalink
    0 Comments
  • 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?

    — answered May 22nd 2010 by Chris Reed
    permalink
    0 Comments
  • KitchenSink fails forward/reverse geocode test

    1. code takes Appcelerator address,
    2. uses forward geocode to translate into lat/lon
    3. then uses reverse geocode to convert back to address

    so in KitchenSink what do we get…

    1. input: "444 Castro Street, Mountain View, CA 94041"

    2. lat:0 & lon: 0

    3. 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

    — answered May 22nd 2010 by Chris Reed
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.