OpenLayers 3.x API

Last updated on
6 April 2022

Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites

To create OL 3 map with php you can use this code (from the openlayers_filters module):

//$map_name = your map name
$map = \Drupal\openlayers\Openlayers::load('map', $map_name);
$rendered = $map->render();

Additionally, some hooks can be found in the openlayers.api.php file of the docs folder of the openlayers module folder

Help improve this page

Page status: No known problems

You can: