Skip to content

Tip: Geocode search

Jeffrey Kemp edited this page Jul 20, 2019 · 3 revisions

Geocode Search

PRE-REQUISITE: to use Geocoding you must enable the Geocoding API on your Google Cloud Platform project. Read "Getting started" at https://developers.google.com/maps/documentation/javascript/geocoding to enable the Geocoding API.

In this example, we have a Country list (which is used to set the Country attribute), a Search field (which is set on the Geocode Item attribute) and an Address item (which is set on the Address Item attribute).

If the user enters an address or location in the Search field, the map will pan to and zoom to the selected location. If Country was set, the search will be limited to that country (Note: the Country field refreshes the page on change). If the user clicks on the map, the (closest) address will be copied into the Address field.

For more details, and sample code, check out the DEMO.

You can’t perform that action at this time.