Loading modules/openlayers_ui/src/Plugin/export_ui/OpenlayersMaps.inc +6 −0 Original line number Diff line number Diff line Loading @@ -790,6 +790,12 @@ function openlayers_map_form_preview($form, &$form_state) { '#map' => $map, ); // If the map height is specified as relative, force the previewed map height to 400px to ensure that a map is displayed if ($form['preview']['#map']->getOption('height') && substr($form['preview']['#map']->getOption('height'), -1) == '%') { $form['preview']['#map']->setOption('height', '400px'); drupal_set_message('Map height set to 400px for preview purposes only, as original map height was set to a non-absolute value.', 'warning'); } $alternative_template = 'openlayers--' . str_replace('_', '-', $map->getMachineName()) . '.tpl.php'; $value = file_get_contents(drupal_get_path('module', 'openlayers') . '/theme/openlayers.tpl.php'); Loading Loading
modules/openlayers_ui/src/Plugin/export_ui/OpenlayersMaps.inc +6 −0 Original line number Diff line number Diff line Loading @@ -790,6 +790,12 @@ function openlayers_map_form_preview($form, &$form_state) { '#map' => $map, ); // If the map height is specified as relative, force the previewed map height to 400px to ensure that a map is displayed if ($form['preview']['#map']->getOption('height') && substr($form['preview']['#map']->getOption('height'), -1) == '%') { $form['preview']['#map']->setOption('height', '400px'); drupal_set_message('Map height set to 400px for preview purposes only, as original map height was set to a non-absolute value.', 'warning'); } $alternative_template = 'openlayers--' . str_replace('_', '-', $map->getMachineName()) . '.tpl.php'; $value = file_get_contents(drupal_get_path('module', 'openlayers') . '/theme/openlayers.tpl.php'); Loading