Class nokia.places.ui.modules.CategorySearch
This class represents a module that provides access to the Places API category-based search. The user interface allows the Web site user to select a category, and run a search for places that match the chosen category.
The template elements targeted by CategorySearch may have the attribute rel
containing the valid category id, which must be set to one of the following values:
eat-drinkgoing-outsights-museumstransportaccommodationshoppingleisure-outdooradministrative-areas-buildingsnatural-geographical
CategorySearch supports the following parameters that can be specified via the
nokia.places.Place initialization property "moduleParams":
-
onResults- a caller-defined callback function to be invoked after the search results become available; the function is invoked only ifonSelectis not defined; the function receives the results of a search based on the user-selected search term as an array of data structures; these can be wrapped in instances of nokia.places.models.PlaceModel) and you can then use aPlaceinstance to retrieve place data, using the ids of the items in the received array -
onSearchStart" - a caller-defined callback function to be invoked when the search is being fired -
searchCenter- a caller-defined function that retrieves an object containing the geographical coordinates of the search center (searches are conducted in widening circles around this location and the results are ordered by relevance to the search criteria); if provided,useGeoLocationis ignored; the function is expected to return an object with the following properties:-
latitude- latitude of the center point for the search -
longitude- latitude of the center point for the search
-
-
maxResults- {Number}, maximum number of results returned by the categorysearch module, by default it is set to 20 -
useGeoLocation- {Boolean}, iftrueand the browser supports the W3C Geolocation API andsearchCenteris not provided, Places search tries to use the W3C Geolocation API to get the client location and use it as the search center; if this parameter isfalse(default) andsearchCenteris not provided, a global search is executed
This class represents a module that provides access to the Places API category-based search. The user interface allows the Web site user to select a category, and run a search for places that match the chosen category.
The template elements targeted by CategorySearch may have the attribute rel
containing the valid category id, which must be set to one of the following values:
eat-drinkgoing-outsights-museumstransportaccommodationshoppingleisure-outdooradministrative-areas-buildingsnatural-geographical
CategorySearch supports the following parameters that can be specified via the
nokia.places.Place initialization property "moduleParams":
-
onResults- a caller-defined callback function to be invoked after the search results become available; the function is invoked only ifonSelectis not defined; the function receives the results of a search based on the user-selected search term as an array of data structures; these can be wrapped in instances of nokia.places.models.PlaceModel) and you can then use aPlaceinstance to retrieve place data, using the ids of the items in the received array -
onSearchStart" - a caller-defined callback function to be invoked when the search is being fired -
searchCenter- a caller-defined function that retrieves an object containing the geographical coordinates of the search center (searches are conducted in widening circles around this location and the results are ordered by relevance to the search criteria); if provided,useGeoLocationis ignored; the function is expected to return an object with the following properties:-
latitude- latitude of the center point for the search -
longitude- latitude of the center point for the search
-
-
maxResults- {Number}, maximum number of results returned by the categorysearch module, by default it is set to 20 -
useGeoLocation- {Boolean}, iftrueand the browser supports the W3C Geolocation API andsearchCenteris not provided, Places search tries to use the W3C Geolocation API to get the client location and use it as the search center; if this parameter isfalse(default) andsearchCenteris not provided, a global search is executed
