To support searching for and exploring places, load the Places module (
- searching for a place in a specific location based on associations with a plain text word
- searching for places matching a category in a specific location, with information on how to limit the search to a specific area
- paginating the information in the response to make the information more usable in the application
- getting additional details about a specific place
- restricting the search results included in the response to the map area displayed on the user screen
- using the user location to search for places matching a category
- listing the categories available for a given location
Searching for and Exploring – General Implementation Pattern
To implementn requests for places-related information:
- Load the
- Create a
Platformobject for authentication (if you have not done so earlier) – note that the examples below use a demonstration credentials and access the customer integration testing (CIT) environment, rather than the production environment.
- Create the appropriate Places object through which you can submit requests.
- Create an object that defines the search parameters – the names of the parameters match the names of the parameters used in the HERE Places API
- Submit a search request – requests are asynchronous, therefore callbacks are needed to act on both success and error responses.
- Handle the response data – define callback functions that receive and process both the data received on success and when an error occurs.