Add a component for zooming to areas source.
This commit is contained in:
parent
aeb6221d28
commit
bbf9564519
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
/**
|
||||
* @file
|
||||
* farm_area.default_openlayers_components.inc
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_default_openlayers_components().
|
||||
*/
|
||||
function farm_area_default_openlayers_components() {
|
||||
$export = array();
|
||||
|
||||
$ol_component = new stdClass();
|
||||
$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->description = 'Automatically zoom to the areas source when the map is first built.';
|
||||
$ol_component->factory_service = 'openlayers.Component:ZoomToSource';
|
||||
$ol_component->options = array(
|
||||
'source' => 'views_geojson_farm_areas_geojson_feed',
|
||||
'animations' => array(
|
||||
'pan' => '500',
|
||||
'zoom' => '500',
|
||||
),
|
||||
'zoom' => 'auto',
|
||||
'enableAnimations' => 1,
|
||||
'max_zoom' => '0',
|
||||
'process_once' => 1,
|
||||
);
|
||||
$export['farm_area_component_areas_zoom_to_source'] = $ol_component;
|
||||
|
||||
return $export;
|
||||
}
|
|
@ -8,6 +8,9 @@
|
|||
* Implements hook_ctools_plugin_api().
|
||||
*/
|
||||
function farm_area_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");
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ dependencies[] = taxonomy
|
|||
dependencies[] = views
|
||||
dependencies[] = views_geojson
|
||||
dependencies[] = views_tree
|
||||
features[ctools][] = openlayers:default_openlayers_components:1
|
||||
features[ctools][] = openlayers:default_openlayers_layers:1
|
||||
features[ctools][] = strongarm:strongarm:1
|
||||
features[ctools][] = views:views_default:3.0
|
||||
|
@ -31,6 +32,7 @@ features[field_instance][] = taxonomy_term-farm_areas-field_farm_area_type
|
|||
features[field_instance][] = taxonomy_term-farm_areas-field_farm_files
|
||||
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_areas_zoom_to_source
|
||||
features[openlayers_layers][] = farm_areas
|
||||
features[taxonomy][] = farm_areas
|
||||
features[variable][] = pathauto_taxonomy_term_farm_areas_pattern
|
||||
|
|
Loading…
Reference in New Issue