Location finder
Last updated
Last updated
Browser-based geolocation requires that the page is served under https (secure).
Currently preview URLs are not served under HTTPS, so a manual search is required for testing on the preview.
Our location finder supports passing URL parameters the location finder page to pre-populate location search queries, filters and other parameters.
Here is an example of creating a simple form to link to the Location Finder that takes a visitor search location and passes that to the finder.
The form code above can be updated as desired. The only required/important elements are:
Action set to the URL of your location finder - action="https://www.yourdomain.com/location-finder/"
Form should use GET - method="get"
<input>
with name of near_location
More information on themes and templates for the location finder:
How many results to show
Number of results and pins to return. Default is 100
Distance unit of measurement
Which unit to use to calculating distance from the visitor. Options are "miles" or "km"
Disable Geolocation prompt
Don't prompt the visitor for their location in the browser, requiring them to enter a search manually
Geocoder components
Pass a series of valid geocoder components to pass on geocoder requests to influence results. Must match a specific format from google. Example: country:US|administrative_area:FL
Geocode Region Hint
For non-US finders, you can give the finder a hint of the visitor geography so that Google returns more relevant results
Search input type
Custom search field types. - 5 digit US zip code: only US zip codes (numbers only)
Distance threshold of results
How far the bounds of the search should show locations. Default is 4000 units (miles or km)
Redirect one result
If a single location is found and it has a location URL, it will automatically redirect the visitor in the browser
Default location (Latitude)
This location is used for the initial map center point and is also used if "Search on load" is enabled. Example: 47.258728
Default location (Longitude)
This location is used for the initial map center point and is also used if "Search on load" is enabled. Example -122.465973
Search on load
Automatically search locations when the location finder loads (uses the "Default location" point)
Initial search distance threshold
Only apply to the initial loading of locations, this option overrides the normal "Distance threshold of results" to show a wider or shorter distance of locations. Good to use if you want to show "All locations" on initial load, but less (only the closest) locations when someone is entering a search.
Show infowindow on search
This will automatically expand the infowindow pin for the first result after a search is entered
Parameter
near_location
Location search (zip code, address, city/state)
services__in
Comma separated list of services tags if your location finder is configured for filtering the results