Map Field (PRO)
A map with markers. Each marker carries a title, an alias, a phone, an email, an address and a description, so one field describes a whole set of points.
Which map is drawn
The provider is chosen once for the site, by the pageblocks_map_type system setting:
| Value | Provider | Key needed |
|---|---|---|
leaflet | Leaflet over OpenStreetMap | No |
ymaps | Yandex Maps | Yes — pageblocks_yandex_apikey |
googlemaps | Google Maps | Not handled in the component |
Settings common to all: map centre (48.737, 18.893) and zoom. Leaflet adds a marker icon, its size, the tile style (light, dark, voyager or your own) and the interaction switches — dragging, scroll zoom, double-click zoom, keyboard, touch zoom. Google exposes its own set of controls instead. Yandex takes only centre and zoom.
Leaflet is the default, and it needs nothing
After installing, pageblocks_map_type is set to leaflet: it works with no key and no registration anywhere. For most sites that is the whole of map configuration.
Switch to ymaps and you must fill in pageblocks_yandex_apikey, or the map stays blank.
Output is yours to write
The value is a JSON array of markers:
[{"lat": 55.755826, "lng": 37.617299, "title": "Office", "address": "…"}]No ready-made snippet renders it. Decode the value and feed the coordinates to whichever map library the theme already loads:
<div id="map" data-markers='{$points}'></div>That is deliberate on the front end: the manager needs one provider, a page may need another, and the markers are plain data either way.