mirror of
https://github.com/farmOS/farmOS.git
synced 2024-02-23 11:37:38 +01:00
Add a layer for Google Hybrid.
This commit is contained in:
parent
fe95505692
commit
52b5afd75d
4 changed files with 35 additions and 0 deletions
28
farm_map.default_openlayers_layers.inc
Normal file
28
farm_map.default_openlayers_layers.inc
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
/**
|
||||
* @file
|
||||
* farm_map.default_openlayers_layers.inc
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_default_openlayers_layers().
|
||||
*/
|
||||
function farm_map_default_openlayers_layers() {
|
||||
$export = array();
|
||||
|
||||
$ol_layer = new stdClass();
|
||||
$ol_layer->disabled = FALSE; /* Edit this to true to make a default ol_layer disabled initially */
|
||||
$ol_layer->api_version = 1;
|
||||
$ol_layer->machine_name = 'farm_map_google_hybrid';
|
||||
$ol_layer->name = 'Farm Map: Google Hybrid';
|
||||
$ol_layer->description = '';
|
||||
$ol_layer->factory_service = 'openlayers.Layer:Tile';
|
||||
$ol_layer->options = array(
|
||||
'source' => 'farm_map_google_hybrid',
|
||||
'visible' => 1,
|
||||
'opacity' => 1,
|
||||
);
|
||||
$export['farm_map_google_hybrid'] = $ol_layer;
|
||||
|
||||
return $export;
|
||||
}
|
|
@ -35,6 +35,7 @@ function farm_map_default_openlayers_maps() {
|
|||
),
|
||||
'layers' => array(
|
||||
0 => 'geofield_field_formatter_layer',
|
||||
1 => 'farm_map_google_hybrid',
|
||||
),
|
||||
'controls' => array(
|
||||
0 => 'openlayers_control_fullscreen',
|
||||
|
@ -81,6 +82,7 @@ function farm_map_default_openlayers_maps() {
|
|||
),
|
||||
'layers' => array(
|
||||
0 => 'geofield_field_formatter_layer',
|
||||
1 => 'farm_map_google_hybrid',
|
||||
),
|
||||
'controls' => array(
|
||||
0 => 'openlayers_control_fullscreen',
|
||||
|
|
|
@ -11,6 +11,9 @@ function farm_map_ctools_plugin_api($module = NULL, $api = NULL) {
|
|||
if ($module == "openlayers" && $api == "default_openlayers_components") {
|
||||
return array("version" => "1");
|
||||
}
|
||||
if ($module == "openlayers" && $api == "default_openlayers_layers") {
|
||||
return array("version" => "1");
|
||||
}
|
||||
if ($module == "openlayers" && $api == "default_openlayers_maps") {
|
||||
return array("version" => "1");
|
||||
}
|
||||
|
|
|
@ -8,11 +8,13 @@ dependencies[] = geofield
|
|||
dependencies[] = openlayers
|
||||
dependencies[] = openlayers_geofield
|
||||
features[ctools][] = openlayers:default_openlayers_components:1
|
||||
features[ctools][] = openlayers:default_openlayers_layers:1
|
||||
features[ctools][] = openlayers:default_openlayers_maps:1
|
||||
features[ctools][] = openlayers:default_openlayers_sources:1
|
||||
features[features_api][] = api:2
|
||||
features[field_base][] = field_farm_geofield
|
||||
features[openlayers_components][] = farm_map_component_geofield_zoom_to_source
|
||||
features[openlayers_layers][] = farm_map_google_hybrid
|
||||
features[openlayers_maps][] = farm_map_geofield
|
||||
features[openlayers_maps][] = farm_map_geofield_formatter
|
||||
features[openlayers_sources][] = farm_map_google_hybrid
|
||||
|
|
Loading…
Reference in a new issue