×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Apr 2012
    Posts
    5

    Question Customize results popup

    Hi,

    How can I customize which data appears on searchbox results?

    I need results like this: "Street name, city, state" (maybe country at the end), but all samples from Nokia developers site is showing only the street name.

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

    Re: Customize results popup

    Which samples are you referring to ?
    Basically if you can modify the codes, you should be able to change the appearance as well, so what have you tried sofar ?

  3. #3
    Registered User
    Join Date
    Apr 2012
    Posts
    5

    Re: Customize results popup

    I've used the samples from http://api.maps.nokia.com/en/playgro...earch_box_desc

    I didn't find the option to add the city name to each result line.

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

    Re: Customize results popup

    if you check the code, its simple as:
    Code:
    var result,
    					resultsElt = document.getElementById("basicSearchBoxResults");
    					resultsElt.innerHTML = "",
    					i, len;
    					for (var i = 0, len = data.results.items.length; i < len ; i++) {
    						result = data.results.items[i],
    						liElt = document.createElement("li");
    
    						liElt.innerHTML = result.title;
    						resultsElt.appendChild(liElt);
    					}
    So you could make your own elements you add there and have any data you wish put in there, as well as use which ever CSS style you would want to use.

  5. #5
    Registered User
    Join Date
    Apr 2012
    Posts
    5

    Re: Customize results popup

    I've already seen this code sample, but it just allows to customize the results (in fact, what I need to customize is the suggest list, sorry for the wrong information).

    I searched on the API documentation and found the suggestions option for the searchbox object, but I need to define a template for this suggestion list pop up.

    Here is the code added to the SearchBox initialization:

    suggestions: { showAddress: true }


    How can I define the template for the suggestions list?

    Thanks

Similar Threads

  1. Replies: 3
    Last Post: 2012-08-21, 09:45
  2. Customize favicons for your web app
    By emx2500 in forum Nokia Asha Web Apps
    Replies: 1
    Last Post: 2011-05-06, 07:51
  3. How to display popup text box or popup search box ?
    By rahul.kulshreshtha in forum Mobile Java General
    Replies: 4
    Last Post: 2010-05-11, 13:12
  4. Customize UI solution
    By ytom2006 in forum Symbian User Interface
    Replies: 3
    Last Post: 2009-02-25, 13:48
  5. Replies: 1
    Last Post: 2007-12-02, 17: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
  •  
×