function openlayers_layer_type_cloudmade::render in Openlayers 6.2
Same name and namespace in other branches
- 7.2 plugins/layer_types/openlayers_layer_type_cloudmade.inc \openlayers_layer_type_cloudmade::render()
Render.
Overrides openlayers_layer_type::render
File
- includes/
layer_types/ cloudmade.inc, line 89 - OpenLayers CloudMade layer type
Class
- openlayers_layer_type_cloudmade
- OpenLayers CloudMade Layer Type class
Code
function render(&$map) {
static $cloudmade_maps_included;
if (!isset($cloudmade_maps_included)) {
drupal_add_js(drupal_get_path('module', 'openlayers') . '/includes/layer_types/js/cloudmade.js');
$path = variable_get('openlayers_layers_cloudmade_js', '');
if (valid_url($path, TRUE)) {
drupal_set_html_head('<script src="' . check_url($path) . '" type="text/javascript"></script>');
}
else {
drupal_add_js($path);
}
$cloudmade_maps_included = TRUE;
}
return $this->options;
}