Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Aug 2011

    Trying to geocode and add markers from array of addresses

    Hey there you guys, you are all developing quite above my level but I gots me one of them NOOB type questions

    I have an app that is fetching an array of addresses like (street, city, state).
    Unfortunately I don't have the lat,long for these and I want to plot these all on the same map.

    All of the examples I have found on the net (over the last 4 hours of research) get me close, but they all involve, events like keypress and submitting the address through a form, then it displays on the map.

    Reading the code, there is a lot of extraneous lines used to convert the click events and stuff and I just wanted to know a simple way to iterate through this array of addresses and plot them.

    Anyone care to offer some ideas?

    Thanks code poets,


  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003

    Re: Trying to geocode and add markers from array of addresses

    What technology and language are you using for development ? Wiki would have at least Qt Maps examples, which also are including geocoding examples..

  3. #3
    Super Contributor
    Join Date
    Nov 2003
    Bangalore , India

    Re: Trying to geocode and add markers from array of addresses

    Hi MGunner, Welcome to Nokia Developer Discussion Boards!!

    Just to add what Yukka mentioned :

    Java and Qt Location articles and code samples are available here http://www.developer.nokia.com/Commu...egory:Location


  4. #4
    Registered User
    Join Date
    Aug 2011

    Re: Trying to geocode and add markers from array of addresses

    Well, I have stripped down the developer's playgrond example and have a result.
    It's a hack but it's a start.

    Before I cycle in an array of addresses, I think I need to add to this code to make it less sloppy (of a request).
    Eventually, i want to send anywhere from 1-30 addresses for geocode lookup, I hope I can do that in a JSON request.

    Also looking to center the map on the first resturned geocoded value.
    Here's the code if you want to take a look:

    var map = new ovi.mapsapi.map.Display(mapContainer, {
    center: [53, 13],
    zoomLevel: 3,
    components: [new ovi.mapsapi.map.component.Behavior()]

    var searchManager = new ovi.mapsapi.search.Manager();
    searchManager.addObserver("state", function(observedManager, key, value) {
    if(value == "finished") {
    if (observedManager.locations.length > 0) {
    rs = (new ovi.mapsapi.search.component.SearchResultSet(observedManager.locations)).container;
    //push markers to map
    map.zoomTo(rs.getBoundingBox(), false);
    } else if(value == "failed") {
    alert("The request failed.");

    searchManager.geocode("12825 W Sunset Hwy Airway Heights, WA 99001");

  5. #5
    Super Contributor
    Join Date
    May 2008
    Helsinki, Finland

    Re: Trying to geocode and add markers from array of addresses

    Hi there, MGunner

    Please check out this topic, it handles what you are seeking for.


    Direct link to the wiki article referring: http://www.developer.nokia.com/Commu...earch_requests

    [FONT="Comic Sans MS"][COLOR="Blue"][/COLOR][I]Marko Lumivuori
    Technical Support
    +358 40 8019330

Similar Threads

  1. How to convert array of Objects into array of Strings?
    By elenora in forum Mobile Java General
    Replies: 2
    Last Post: 2011-06-12, 12:12
  2. Trying to read a file into a byte array
    By jcampom in forum Mobile Java Networking & Messaging & Security
    Replies: 3
    Last Post: 2010-02-04, 15:09
  3. Trying to add a button from the UI Designer
    By philipkd in forum Symbian
    Replies: 2
    Last Post: 2008-10-25, 12:56
  4. Difference between array of pointes and pointer to an array
    By Pradeep Chandra in forum Open C/C++
    Replies: 2
    Last Post: 2008-09-15, 13:45
  5. Error when trying to create image from Byte array
    By chordfone in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2007-11-16, 00:34

Posting Permissions

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