Maps in Blocks
We are still updating this page
Some data may be missing here — we will fill it in shortly.
To work with maps (currently only Google Maps are supported) and have full editing functionality, you need to:
- Place two keys in the block section: subtype and subtype_params (see the manifest example for more details).
- Specify the extension landing_google_maps_new (see assets in the manifest example).
- Indicate the type map for the required node (where the map will be).
Manifest Example
return [
'block' => [
'name' => 'Google Map',
'section' => ['contacts'],
'subtype' => 'map',
'subtype_params' =>[
'required' => 'google'
],
],
'cards' => [],
'nodes' => [
'.landing-block-node-map' => [
'name' => 'Map',
'type' => 'map',
]
],
'style' => [
'block' => [
'type' => ['block-default-wo-background-vh-animation']
],
'nodes' => [],
],
'assets' => [
'ext' => ['landing_google_maps_new'],
]
];
Example block for this manifest:
<section class="landing_block g-pt-0 g-pb-0 g-height-70vh">
<div class="landing-block-node-map h-100" data-map></div>
</section>
You can view examples of blocks of this type in our repository by using the methods landing.block.getmanifestfile and landing.block.getrepository. Their codes are:
- 16.3.two_cols_map_text_fix
- 16.4.three_cols_map
- 16.5.two_cols_map
- 16.6.two_cols_map_reverse
- 16.1.google_map
- 16.2.two_cols_text_map_fix
- and many others.
Previous