map.php
Table of Contents
- map() : mixed
- Create a map with a given ACF gallery fields
Functions
map()
Create a map with a given ACF gallery fields
map([array<string|int, mixed> $args = null ]) : mixed
Return an Open Layers Map , from a specific acf gallery field or a group of fields with different settings
Parameters
Map Settings
- 'field' _(String)_ ACF field for Map coordinates. Helper field parser included
- 'field_option' _(String)_ ACF field in Option for Map coordinates
'cat_class' (String) Select taxonomy term to fill marker class. Usefull for filtering - 'group' (Array) Settings for group of coordinates - 'field' (String) ACF field for marker coordinates - 'taxonomy' (String) Taxonomy for markers query - 'category' (String) Category name for markers query - 'type' (String) Post type for markers query - 'height' (String) Container frame height in px, vh or % - 'width' (String) Container frame width in px, vh or % - 'marker' (String) Markers url - 'link' (String) Map link out on mobile. Touch event will be disabled - 'style' (String) Link to https://www.maptiler.com/ style.json api for customizing map styles e.g. https://api.maptiler.com/maps/be25dffd-a532-45e6-972a-fcab2de4f806/style.json?key=tRwmEiuQArtUe2CEOb6U - 'popup' (String) Popup id attribute. It'will be enabel popup - 'controls' (Array) Disable Specific map controls - 'click' (Boolean) Set double Click Zoom - 'drag' (Boolean) Set drag and drop and drag pan - 'key' (Boolean) - 'scroll' (Boolean) - 'pointer' (Boolean) - 'select' (Boolean) - 'buttons' (Boolean)
Todo
Remove hardcoded in popup parts, remove harcoded fields
DIfferent map id
Rewrite params in doc