×

Discussion Board

Results 1 to 2 of 2

Hybrid View

  1. #1
    Registered User
    Join Date
    Dec 2007
    Posts
    3

    Question reverseGeolocation - parts of address undefined

    Using code like herunder (where p is the location returned from getCurrentPosition), street and houseNumber remain undefined, while city and country are returned correctly. Anyone?

    Nico Witteman, Amsterdam

    =====================

    var SEARCH = new ovi.mapsapi.search.Manager();
    SEARCH.addObserver("state", function(observedManager, key, value){
    if (value == "finished") {
    if (observedManager.locations.length > 0) {
    if (observedManager.locations[0].address.street) {
    document.getElementById("lblStreet").innerHTML = observedManager.locations[0].address.street;
    }
    if (observedManager.locations[0].address.city) {
    document.getElementById("lblCity").innerHTML = observedManager.locations[0].address.city;
    }
    if (observedManager.locations[0].address.houseNumber) {
    document.getElementById("lblHouseNumber").innerHTML = observedManager.locations[0].address.houseNumber;
    }
    if (observedManager.locations[0].address.country) {
    document.getElementById("lblCountry").innerHTML = observedManager.locations[0].address.country;
    }
    }
    }
    else
    if (value == "failed")
    alert("The automatically triggered search request in the Search example failed.");
    });
    alert(p.coords.latitude);
    alert(p.coords.longitude);
    var loc = new ovi.mapsapi.geo.Coordinate(p.coords.latitude, p.coords.longitude);

    SEARCH.reverseGeocode(loc);
    SEARCH.clear();

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: reverseGeolocation - parts of address undefined

    I would suspect that not all fields on the result necessarily have values, thus on some results the street and houseNumber can really be undefined, and wit some other queries, you might find other fields being also undefined.

    Also , is that API from the Map for the Web APIs ? I suspect that they are really not designed to be used with WRT Widgets in general.

Similar Threads

  1. parts of a nokia phone
    By maarteam in forum Open C/C++
    Replies: 2
    Last Post: 2008-08-18, 16:36
  2. how to append parts of a file......
    By noanyx in forum Symbian
    Replies: 2
    Last Post: 2006-08-30, 04:41
  3. Series 40 - http download of parts of file not possible ?
    By sankotm in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2005-07-27, 12:35
  4. Random order of MMS parts
    By karib in forum General Messaging
    Replies: 3
    Last Post: 2002-10-29, 21:40
  5. Incorrect order parts of MMS (if parts qnty > 5)
    By marianwitkowski in forum General Messaging
    Replies: 1
    Last Post: 2002-08-29, 04:36

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×