3
0
Fork 0
mirror of https://github.com/farmOS/farmOS.git synced 2024-02-23 11:37:38 +01:00

Standardize Openlayers machine names and labels.

This commit is contained in:
Michael Stenta 2015-07-28 12:27:01 -04:00
parent 65482cfd5d
commit 04ab5de973
4 changed files with 16 additions and 16 deletions

View file

@ -14,12 +14,12 @@ function farm_area_default_openlayers_components() {
$ol_component->disabled = FALSE; /* Edit this to true to make a default ol_component disabled initially */
$ol_component->api_version = 1;
$ol_component->machine_name = 'farm_area_component_area_details_popup';
$ol_component->name = 'Farm Area Component: Area Details Popup';
$ol_component->name = 'Farm Area: Area Details Popup';
$ol_component->description = '';
$ol_component->factory_service = 'openlayers.Component:Popup';
$ol_component->options = array(
'layers' => array(
'farm_areas' => 'farm_areas',
'farm_area_layer_areas' => 'farm_area_layer_areas',
),
'positioning' => 'top-left',
'autoPan' => 0,
@ -32,7 +32,7 @@ function farm_area_default_openlayers_components() {
$ol_component->disabled = FALSE; /* Edit this to true to make a default ol_component disabled initially */
$ol_component->api_version = 1;
$ol_component->machine_name = 'farm_area_component_areas_zoom_to_source';
$ol_component->name = 'Farm Area Component: Areas Zoom to Source';
$ol_component->name = 'Farm Area: Areas Zoom to Source';
$ol_component->description = 'Automatically zoom to the areas source when the map is first built.';
$ol_component->factory_service = 'openlayers.Component:ZoomToSource';
$ol_component->options = array(

View file

@ -13,8 +13,8 @@ function farm_area_default_openlayers_layers() {
$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_area_group_layer';
$ol_layer->name = 'Farm Area Group Layer';
$ol_layer->machine_name = 'farm_area_layer_group';
$ol_layer->name = 'Farm Area Layer Group';
$ol_layer->description = '';
$ol_layer->factory_service = 'openlayers.Layer:Group';
$ol_layer->options = array(
@ -22,12 +22,12 @@ function farm_area_default_openlayers_layers() {
'visible' => 1,
'grouptitle' => 'Farm Areas',
);
$export['farm_area_group_layer'] = $ol_layer;
$export['farm_area_layer_group'] = $ol_layer;
$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_areas';
$ol_layer->machine_name = 'farm_area_layer_areas';
$ol_layer->name = 'Farm Areas';
$ol_layer->description = '';
$ol_layer->factory_service = 'openlayers.Layer:Vector';
@ -36,7 +36,7 @@ function farm_area_default_openlayers_layers() {
'visible' => 1,
'zoomActivity' => '',
);
$export['farm_areas'] = $ol_layer;
$export['farm_area_layer_areas'] = $ol_layer;
return $export;
}
@ -79,8 +79,8 @@ function farm_area_default_openlayers_layers_alter(&$layers) {
$layers[$machine_name] = $ol_layer;
}
// If "farm_area_group_layer" is available, add the layers to it.
if (!empty($layers['farm_area_group_layer'])) {
$layers['farm_area_group_layer']->options['grouplayers'] = $machine_names;
// If "farm_area_layer_group" is available, add the layers to it.
if (!empty($layers['farm_area_layer_group'])) {
$layers['farm_area_layer_group']->options['grouplayers'] = $machine_names;
}
}

View file

@ -32,12 +32,12 @@ function farm_area_default_openlayers_maps() {
),
'renderer' => 'canvas',
'layers' => array(
0 => 'farm_areas',
1 => 'farm_map_google_hybrid',
0 => 'farm_area_layer_areas',
1 => 'farm_map_layer_google_hybrid',
),
'sources' => array(
0 => 'views_geojson_farm_areas_geojson_feed',
1 => 'farm_map_google_hybrid',
1 => 'farm_map_source_google_hybrid',
),
'controls' => array(
0 => 'openlayers_control_fullscreen',

View file

@ -36,8 +36,8 @@ features[field_instance][] = taxonomy_term-farm_areas-field_farm_geofield
features[field_instance][] = taxonomy_term-farm_areas-field_farm_images
features[openlayers_components][] = farm_area_component_area_details_popup
features[openlayers_components][] = farm_area_component_areas_zoom_to_source
features[openlayers_layers][] = farm_area_group_layer
features[openlayers_layers][] = farm_areas
features[openlayers_layers][] = farm_area_layer_group
features[openlayers_layers][] = farm_area_layer_areas
features[openlayers_maps][] = farm_areas
features[taxonomy][] = farm_areas
features[variable][] = pathauto_taxonomy_term_farm_areas_pattern