Contacts on a map (Pro)
Pro version. Coordinates and geocoding belong to the Pro version of Contact Directory.
Contacts on a map
The Pro version gives every contact the field Coordinates ("latitude, longitude"). With it, YOOtheme's element Map shows your contacts as markers:
- Put the element Map on the page.
- Select the item of the map and choose the source Contacts with the filters you need.
- Map Location to Coordinates and Title to Name.
Contacts without coordinates do not appear on the map.
Where the coordinates come from
| By hand | Create a custom field for contacts (e.g. "Coordinates"), enter "latitude,
longitude" there (such as 48.1374, 11.5755) and choose the field in the plugin options under Pro
Version → Field with Coordinates. This always wins. |
| Automatically | With Pro version → Geocode Addresses, Contact Directory gets the coordinates of a contact's address from OpenStreetMap Nominatim when the contact is saved. Only a changed address is asked again. Default: off. |
For existing contacts, run once on the server after switching it on:
php cli/joomla.php ytpcontacts:geocode --limit=100
The command asks for at most one address per second (Nominatim's usage policy) and only takes contacts that were never geocoded. With more contacts, run it again.
Privacy
- Geocoding sends the address of a contact to OpenStreetMap Nominatim (OpenStreetMap Foundation). Mention this in your privacy policy, or enter the coordinates by hand.
- If the street of a contact is hidden (display option), the field Coordinates stays empty too – they would give the place away just the same.
- YOOtheme's element Map loads map tiles from OpenStreetMap and asks visitors for consent if you use YOOtheme's consent management.
Applies to version 1.0.0.