Dynamic map block

Dynamic map is feature of Map block and allows you to attach dynamic values to Map markers. You can attach dynamic values for multiple markers and show them on page.

Your custom field must save location with one of available structures

array['lat'=>'value', 'lng'=>'value']

This kind of structure is available in ACF map field

array['latitude'=>'value', 'longitude'=>'value']

or in multidimensional array

array[
   'location' => array(
       'lat' => 'value',
       'lng' => 'value'
    ),
    'title' => 'value',
    'description' => 'value'
]

title and description will be used for title and description for marker’s popup

Copy this post’s content
<!-- wp:paragraph -->
<p>Dynamic map is feature of <a href="https://greenshiftwp.com/map-block/" data-type="post" data-id="2704">Map block</a> and allows you to attach dynamic values to Map markers. You can attach dynamic values for multiple markers and show them on page.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Your custom field must save location with one of available structures</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>array['lat'=>'value', 'lng'=>'value']</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>This kind of structure is available in ACF map field</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>array['latitude'=>'value', 'longitude'=>'value']</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>or in multidimensional array</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>array[
   'location' => array(
       'lat' => 'value',
       'lng' => 'value'
    ),
    'title' => 'value',
    'description' => 'value'
]</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>title and description will be used for title and description for marker's popup</p>
<!-- /wp:paragraph -->
«
»