This can be done by adding the showAddress
parameter.
Taking your example the following search box:
var fromSearchBox = new nokia.places.widgets.SearchBox({
targetNode: "fromSearchBox",
template: "fromSearchBox",
map: map
});
Returns the following responses to "Oxford Street" for a search centered on London
- Results
- Oxford Street
- Oxford Street
- John Lewis Oxford Street
Adding in the showAddress
parameter as shown:
var toSearchBox = new nokia.places.widgets.SearchBox({
targetNode: "toSearchBox",
template: "toSearchBox",
map: map,
suggestions : {showAddress: true}
});
And the "Oxford Street" query gives me:
- Results
- Oxford Street Southampton, SO14 3, United Kingdom
- Oxford Street Northwood, Cowes, PO31 8, United Kingdom
- Oxford Street Oxford Street, London,, United Kingdom
Further manipulation would be possible using the callbacks defined in the SearchBox constructor, specifically the handlers
called onSuggestions
and onSearchSuggestions
could be useful.