You can perform a new search at any time after the Local Context Library
has initialized. This is useful any time you need to refresh Local Context
data, such as when the user pans to a new area, or if you have
the initial loading of Local Context data by setting
To trigger a search and refresh Local Context data, do either of the following:
localContextMapView.search()to manually refresh Local Context data when no changes to current search properties are needed. If
locationRestrictionis set to
null(the default value), a call to
search()will refresh the places based on the current viewport.
The following example shows calling
- Update one or more
localContextMapViewsearch properties (
locationBias). Updating one or more of these properties will automatically trigger a new search.
This example shows updating
localContextMapView.maxPlaceCount = 10; localContextMapView.placeTypePreferences: ['bar', 'drugstore']
Multiple consecutive property changes in the same call stack will be grouped and called simultaneously. Updating a property to its same current value will typically not trigger a search; updating non-search properties will not trigger a search.