Configuration & Setup
This guide covers the initial setup and the ongoing configuration of the Route Finder plugin. These settings are found under the main Routes menu in the WordPress admin sidebar.
Initial Plugin Setup (The "Setup" Page)
The Setup page, found under Routes → Setup, is the first place you should visit after installing the plugin. It handles critical prerequisites and data management.
ACF Setup
Purpose
Advanced Custom Fields (ACF) is the backbone of this plugin's data storage. Without its specific field structure, WordPress has nowhere to save crucial information like a route's distance, ascent, or associated GPX file URL. Running the import process creates this required structure in your database.
Usage Guide
- Confirm the ACF Plugin Status shows as "Available". If not, you must install and activate the Advanced Custom Fields Pro plugin.
- Click the "Import ACF Fields from JSON" button. This will read the `acf.json` file from the plugin directory and load all the necessary field groups into ACF.
- Once complete, the status indicators for the field groups should turn green.
User Access
This tab allows you to control which user roles can access the plugin's features, both in the backend and on the frontend.
Export/Import
This powerful tool allows you to create backups of your route data and plugin settings, or to migrate them to another website.
Data Management
This tab contains a critical setting for plugin removal. If the "Uninstall Cleanup" option is checked, ALL plugin data (routes, settings, files) will be permanently deleted when you uninstall the plugin. Leave this unchecked if you might want to reinstall the plugin later and keep your data.
Main Plugin Configuration (The "Config" Page)
The Config page, found under Routes → Config, contains all the day-to-day settings for controlling the appearance and functionality of your maps and routes. It is organised into several tabs.
Map Providers
This is the heart of the map system. You can select different map tile providers and enter the necessary API keys. The plugin supports:
- OpenStreetMap
- Thunderforest (requires API key)
- Google Maps (requires API key)
- HERE (requires API key)
- MapTiler (requires API key)
- MapQuest (requires API key)
You can set different default providers for different contexts, such as large single-route maps versus the small thumbnail maps on list pages.
Default Map Location & Zoom
Set the default starting geographical location (latitude/longitude) and zoom level for maps when they first load without a specific route to display.
Map Options
Fine-tune map behaviour, such as enabling scroll-wheel zoom, fullscreen buttons, and the colour and thickness of the GPX track line.
Map Search Feature
The Map Search feature adds a powerful search button to route maps, allowing users to find points of interest directly on the map.
What is Map Search?
When enabled, a search icon (🔍) appears in the top-right corner of route maps on single route pages. Users can click it to search for nearby:
- Bike shops and repair services
- Cafes, restaurants, and pubs
- Fuel stations and parking
- Hotels and accommodation
- Pharmacies, ATMs, and toilets
- Railway stations and transport
- And many other points of interest
Search results appear as blue markers on the map with detailed information in a side panel. Results are automatically limited to the route area plus a 2km buffer, ensuring users only see relevant nearby places.
Enabling and Disabling
Go to Routes → Config → Route Info Display tab and look for these two settings:
- Enable Map Search - Controls whether the search button appears on route maps. When disabled, users won't see any search functionality.
- Use Google for Map Search - Determines which search provider to use (see below).
Search Providers: Google vs OpenStreetMap
The plugin supports two search providers, each with different advantages:
Google Places API (Premium Option)
Advantages:
- More comprehensive business data
- Includes ratings and reviews
- Better coverage of commercial establishments
- Higher quality results
Disadvantages:
- Requires Google Places API key setup
- Incurs usage costs ($32 per 1,000 searches)
- Requires IP address restrictions (not HTTP referer)
Best for: Sites with budget for API costs that need comprehensive business information with ratings/reviews.
OpenStreetMap Overpass API (Free Option)
Advantages:
- Completely free, no API costs
- No configuration or API key required
- Good coverage in many areas
- Community-maintained data
Disadvantages:
- Less comprehensive business data
- No ratings or reviews
- Data quality varies by area
- May be slower during peak times
Best for: Sites on a budget, or areas with good OpenStreetMap coverage where basic POI data is sufficient.
Setting Up Google Places Search
To use Google Places instead of OpenStreetMap:
- Go to the Google Cloud Console
- Create a new API key (or use existing one)
- Enable Places API (New) in the API Library
- Enable Geocoding API as well
- Under API key restrictions:
- Set Application restrictions to IP addresses
- Add your server's IP address
- IMPORTANT: Do NOT use HTTP referrer restrictions - they won't work for server-side searches
- Consider setting daily usage quotas to control costs
- In WordPress, go to Routes → Setup → Map & API Configuration
- Find the Google Places API Key field
- Paste your API key and click Save API Keys
- Return to Routes → Config → Route Info Display
- Check Use Google for Map Search
- Click Save Changes
How Users Use Map Search
- User opens any single route page
- Clicks the search icon (🔍) in the top-right of the map
- A panel slides out with a search box
- User types what they're looking for (e.g., "bike shop", "cafe", "parking")
- Clicks search or presses Enter
- Results appear as blue markers on the map and in a list
- Clicking a result in the list shows its popup on the map
- If user pans/zooms the map, a "Search this area" button appears to refresh results
Supported Search Terms
The system intelligently interprets common search terms. Examples include:
- "bike shop", "cycle repair" → Finds bicycle shops and repair services
- "cafe", "coffee" → Finds cafes and coffee shops
- "restaurant", "food" → Finds restaurants and eateries
- "pub", "bar" → Finds pubs and drinking establishments
- "fuel", "petrol" → Finds fuel stations
- "parking" → Finds parking areas
- "hotel", "b&b" → Finds accommodation
- "pharmacy", "atm", "toilet" → Finds respective services
- Any business name → Searches by name across all categories
Cost Considerations for Google Places
If using Google Places search:
- Each search costs approximately $0.032 USD
- 1,000 searches = $32 USD
- Monitor usage in Google Cloud Console
- Set daily quotas to prevent unexpected costs
- Consider the number of routes and expected visitor usage
Tip: Start with OpenStreetMap (free) and switch to Google Places later if you need more comprehensive business data.
Troubleshooting
No search button appears:
- Check that "Enable Map Search" is ticked in Config settings
- Ensure you're on a single route page (not route list page)
Google Places not working:
- Verify API key is configured in Routes → Setup → Map & API Configuration
- Check Places API (New) is enabled in Google Cloud Console
- Ensure API key uses IP restrictions (not HTTP referer restrictions)
- Verify you have billing enabled and quotas set in Google Cloud Console
OpenStreetMap search slow or timing out:
- This is normal during peak times on the public Overpass API
- Try searching again in a few moments
- Consider using Google Places for more reliable performance
Styles
Control the visual style of the plugin's frontend interface to match your site's theme. You can set the colours for many elements, including:
- View Route buttons (standard and hover state)
- Filter buttons (selected and unselected states)
- Copy Link buttons
- The background of the filter area
- The fill and thumb colours for the distance/elevation sliders
Filter Options
Customise the route filtering sidebar, including which options are visible (e.g., distance sliders, climbing profiles) and whether the filter box is open or closed by default when a user first visits the page.