Overview
Geo Location Search in WPRentals allows visitors to search around a map location and view listings within a selected map radius (in miles or km)
This feature is available only for Half Map layouts.
What Geo Location Search Does
Geo Location Search lets visitors choose a location on the map and search for listings within a selected distance from that point.
Visitors can search in two ways:
- By typing a location in the Half Map Location field.
- By allowing the browser to detect their current location.
After the location is selected, the radius filter is used to show listings near that point.
Where Geo Location Search Works
Geo Location Search works only with Half Map layouts.
It can be used on:
- Advanced Search Results Half Map
- Properties List Half Map
- Taxonomy / Property Category Half Map pages
Before You Start
Before enabling Geo Location Search, make sure the following conditions are met:
- The page uses a Half Map layout.
- The website map system is configured correctly.
- The listings have correct latitude and longitude coordinates.
- The Half Map Location field is added to the Half Map Search Form.
- If visitors use their current location, the website should use HTTPS and visitors must allow browser location access.
Step 1: Set the Map System
First, choose the map system used by the website.
Go to:
WPRentals Options > Map Configuration > Map General Settings
Find:
What Map System do you want to use?
Select one of these options:
- Google Maps
- OpenStreetMaps
If You Use Google Maps
For Google Maps, you must:
- Add a valid Google Maps API Key.
- Enable Google Places / Places API for that key.
- Save the settings.
How to generate a Google Maps API key
If You Use OpenStreetMaps
For OpenStreetMaps, you must:
- Select OpenStreetMaps as the map system.
- Enable OpenStreet Places.
- Click Save Changes.
Step 2: Enable Geo Location Search
To enable and configure Geo Location Search, go to:
WPRentals Options > Search > Geo Location Search
From this section, you can:
- Enable or disable Geo Location Search.
- Choose if the radius is shown in miles or kilometers.
- Set the minimum radius value.
- Set the maximum radius value.
- Set the initial radius value shown when the search loads.
Radius Search Settings Explained
Enable Geo Location Search
This option enables or disables radius search for Half Map layouts.
- Set this option to Yes to allow visitors to search by radius.
- Set this option to No to disable Geo Location Search.
Distance Unit
This option controls the unit used for the radius search.
- Use miles if your website should display radius values in miles.
- Use kilometers if your website should display radius values in kilometers.
Minimum Radius Value
This option controls the smallest radius value visitors can select.
Maximum Radius Value
This option controls the largest radius value visitors can select.
Initial Radius Value
This option controls the radius value selected by default when the search loads.
Step 3: Add the Half Map Location Field
Geo Location Search uses the Half Map Location field from the Half Map Search Form.
Go to:
WPRentals Options > Search > Half Map Search Form
Add the Half Map Location field to the Half Map Search Form and save the settings.
Optional: Limit Places Suggestions to One Country
You can limit Google Places or OpenStreet Places suggestions to a specific country.
Use this option if your website lists properties only in one country and you want visitors to see more relevant location suggestions.
Go to:
WPRentals Options > Search > Location Field Search Settings
Find:
Limit Use Google Places or Open Street Places to a specific country
Set the option to Yes, then select the country.
How Visitors Search by Typing a Location
When Geo Location Search is enabled, visitors can type a location in the Half Map Location field.
After selecting the location, they can use the Radius slider to choose the distance around that location.
The Half Map results will show listings found inside the selected radius.
How Visitors Search by Their Current Location
Visitors can also use their current location, if they allow location access in the browser.
When the visitor allows browser location access:
- The browser detects the visitor location.
- The map uses that point as the search center.
- A blue radius circle appears around the visitor location.
- Listings inside that radius are shown, if available.
Troubleshooting
The Geo Location Search does not show
- Make sure the page uses a Half Map layout.
- Make sure Geo Location Search is enabled from WPRentals Options > Search > Geo Location Search.
- Make sure the Half Map Location field is added in WPRentals Options > Search > Half Map Search Form.
- Clear theme cache, plugin cache, server cache, and CDN cache, then test again.
The location suggestions do not show
- If using Google Maps, check that the Google Maps API key is valid.
- If using Google Maps, check that Google Places / Places API is enabled for the API key.
- If using OpenStreetMaps, check that OpenStreet Places is enabled.
- If country restriction is enabled, check that the correct country is selected.
The current location option does not work
- Make sure the website uses HTTPS.
- Make sure the visitor allowed location access in the browser.
- Test with another browser or device.
- Check if the browser blocks location access for the website.
Listings do not appear in the radius results
- Make sure the listings have correct latitude and longitude coordinates.
- Increase the radius value and test again.
- Check if other active search filters are limiting the results.
- Make sure listings are published and visible on the front end.
Important Notes
- Geo Location Search is available only for Half Map layouts.
- It is different from normal location search by city, area, country, or address.
- Geo Location Search filters listings by distance from a selected map point.
- The listing must have correct map coordinates to appear correctly in radius results.
- The Half Map Location field must be added to the Half Map Search Form.
- If you use Google Maps, a valid Google Maps API key and Google Places / Places API are required.
- If you use OpenStreetMaps, OpenStreet Places must be enabled.
- The radius values are managed from WPRentals Options > Search > Geo Location Search.
- Browser current-location search works only if the visitor allows location access.
- For best results, use HTTPS on the website.
- The Half Map Search Form is managed separately from the default Advanced Search Form.





