Directions adds routing UI so visitors can get directions to your listed locations — starting from an address or their current position — with distance display and route styling on the map.
This is an Ultimate module. Enable under Ultimate Modules. Requires Google Directions API (and related Maps APIs) on your API key.
Enable on a map
- Enable Directions in Ultimate Modules.
- Edit the map → open Directions settings.
- Add directions to the map (enable the feature).
- Optionally open the directions form on map load.
- Update the map.
Directions form options
| Option | Purpose |
|---|---|
| Distance search on the form | Combine routing with distance-oriented search behaviour |
| Geotargeting | Prefill / use the visitor’s location as origin (browser permission) |
| Unit system | km or miles for distances |
| Starting point placeholder | e.g. “Enter your address” |
| Starting point marker | Custom icon for the origin |
| Route style | Stroke color, weight, opacity for drawn routes |
| Button titles & icons | Brand the form actions |
Spell-check your placeholders — this is highly visible UI copy.
Standalone directions map shortcode
Embed a directions-focused map:
[cspm_directions_map]
Use attributes supported by your version (center, height, target location, etc.) — full list under Shortcodes.
Ideal for a single business “Get directions” page; for multi-listing directories, enabling Directions on [cspm_main_map] is usually better.
Visitor flow
- Open directions UI (or land on directions shortcode page).
- Set origin (typed address, geotarget, or both).
- Choose destination listing / marker.
- Route renders; distance/time appear according to Google Directions responses.
Handle geo denial gracefully with a manual origin field.
Performance & quotas
Directions requests consume Google quota. On high-traffic sites:
- Don’t auto-fire directions on every map load without need
- Cache pages carefully so you don’t spawn duplicate client requests unintentionally
- Monitor Google Cloud billing alerts
Troubleshooting
| Issue | Check |
|---|---|
| “Directions not available” | Directions API enabled; billing active; key restrictions |
| Form missing | Module / per-map option off |
| Route doesn’t draw | Origin/destination invalid; JS errors; conflicting map libraries |
| Wrong units | Unit system setting on the map |
Related
- Map settings
- Core polylines / routes in Overlays (static paths ≠ live Directions)
- Nearby Places for proximity without turn-by-turn
