The Map element places one or more places on an OpenStreetMap map. No key to request, no Google account: the map calls no service until the visitor asks for it.
A map loaded on demand
The visitor first sees an image of the map and a Show the map button. On click, the real map loads: it can be zoomed, moved, and its markers opened. The page stays light and no data goes to a third party without the visitor's action. The map image is saved as WebP when the server allows it, as JPEG otherwise.
Places
Each place has a name and an address. Opus finds its position by itself and shows it in a bubble when the marker is clicked. The gear of a place opens its settings:
- Colour and pictogram of its marker;
- Latitude and longitude, to place the marker to the metre or correct a badly found address;
- a link to a page of the site, a web address or an article;
- a CSS class, set on its line in the list and on its marker.
A place can carry up to 5 details: phone, email, opening hours, website, social network, page of the site or free text. They are reordered and duplicated like other sub-items.
Places from your articles
On the map line, next to its title, Places come from offers From the list below (typed by hand) or From category articles: one article per place. With articles, the list of places gives way to a second line of settings:
| Setting | What it does |
|---|---|
| Categories | The published articles of these categories that the visitor may see, in article order. The list opens as checkboxes: tick as many as you like. |
| Address field | The custom field holding the place address. |
| Latitude and longitude fields | Optional but advised for many places: with the position, no address lookup. |
| Fields shown in the list | The other custom fields, with their name and their Joomla rendering (a link stays a link). Checkboxes, as for the categories. |
| Blog-style card | The image and intro text of the article in its line; its title leads to the article. |
An article with neither address nor position does not appear on the map.
Map settings
Behind the map gear:
| Setting | What it does |
|---|---|
| List of places | Right or left of the map, or above or below with a full-width map. In a narrow block, the list always goes under the map. |
| List width | Its share beside the map, out of twelve; the map takes the rest. |
| Map height | Small (300 px), medium (420 px), large (560 px) or chosen, from 200 to 1200 px. |
| Markers | Their shape, what is inside (the place number or a pictogram) and their colour. Each place can have its own. |
| Route drawn on the map | A "Route to here" button on each place: the route from the visitor's position, or an address they type, is drawn on the map, on foot, by bike or by car. |
| "Directions" link to | OpenStreetMap, Google Maps, or none to remove this link. |
| Zoom | Automatic (all places visible), or neighbourhood, city, county and surroundings, region. |
| Button texts | The text of the "Show the map" button, the "Route to here" button and the "Directions" link. Empty: the text from the site language. |
The service area
Behind the map gear, under the zoom, Service area shades the area a business or a service covers around an address. Three ways to measure it:
- By travel time: what can be reached in 15 minutes to 3 hours;
- By road distance: from 1 to 500 km of travel;
- By straight-line distance: a circle of 1 to 500 km around the address.
| Setting | What it does |
|---|---|
| Duration | The maximum travel time, from 15 minutes to 3 hours. By travel time only. |
| Distance (km) | The maximum distance, from 1 to 500 km. By road or in a straight line. |
| Means of transport | By car, by bike or on foot. Not used for a straight line. |
| Starting address | The business address, or a "latitude, longitude" position. Empty: the first place on the map. |
| Area text | The sentence written under the map. Empty: Opus builds it from the settings. |
The area already shows on the map image, before the click. The site computes it once and keeps it: visitors trigger no request. By road, the computation uses the OSRM service of FOSSGIS, credited under the map, and the first display can take a few seconds. In a straight line, no service is called. If the service does not answer, the map shows without the area and Opus tries again an hour later.
Good to know
- Opus looks up at most 3 new addresses per display, then keeps the positions found. For a map with many places, give the latitude and longitude.
- An address that cannot be found is reported: make it more precise, or give the position behind the place gear.
- When you change the address of a place, its latitude and longitude are cleared: the marker follows the new address.
- The map title is required: it names the map and the list of places for a screen reader.
To go fast
In Choose a layout, the Map model places a title, a text and a map of five Paris landmarks, to replace with your own. The Map brick places a map on its own.
Up to date for Opus 1.5.930.