Search places
Sample of a TableView and a Search Box using Google PlacesType an address and if needed, drag and drop the pushpin to update the location and the store’s list.
You can edit or play with this Sample on jsFiddle and download or fork the source code on GitHub.
JavaScript that handle Places.
First you need to modify your call to the Woosmap Javascript API Loader. You need to ask it to load the Google Places API like so
var loader = new woosmap.MapsLoader("", ['places']);
You can choose every parameters of the Google Places API like here in googlePlaceAutocompleteOptions
(See AutocompletionRequest )
and configure the minimal query size, here we set 3
.
You need to bind the PlacesSearchSource
to the autocomplete_query
property of a SearchView
to get Places predictions.
The TableView
can be bound to the property predictions
of the PlacesSearchSource
to display them using a dedicated cell template.