Add a geofield base field.
This commit is contained in:
parent
99f9e49494
commit
7240208612
|
@ -12,6 +12,7 @@ DEPENDENCIES
|
|||
This module depends on the following modules:
|
||||
|
||||
* Ctools (http://drupal.org/project/ctools)
|
||||
* Geofield (http://drupal.org/project/geofield)
|
||||
* OpenLayers (http://drupal.org/project/openlayers)
|
||||
* OpenLayers Geolocate Button (http://drupal.org/project/openlayers_geolocate_button)
|
||||
* Strongarm (http://drupal.org/project/strongarm)
|
||||
|
|
|
@ -0,0 +1,64 @@
|
|||
<?php
|
||||
/**
|
||||
* @file
|
||||
* farm_map.features.field_base.inc
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_field_default_field_bases().
|
||||
*/
|
||||
function farm_map_field_default_field_bases() {
|
||||
$field_bases = array();
|
||||
|
||||
// Exported field_base: 'field_farm_geofield'
|
||||
$field_bases['field_farm_geofield'] = array(
|
||||
'active' => 1,
|
||||
'cardinality' => -1,
|
||||
'deleted' => 0,
|
||||
'entity_types' => array(),
|
||||
'field_name' => 'field_farm_geofield',
|
||||
'indexes' => array(
|
||||
'bbox' => array(
|
||||
0 => 'top',
|
||||
1 => 'bottom',
|
||||
2 => 'left',
|
||||
3 => 'right',
|
||||
),
|
||||
'bottom' => array(
|
||||
0 => 'bottom',
|
||||
),
|
||||
'centroid' => array(
|
||||
0 => 'lat',
|
||||
1 => 'lon',
|
||||
),
|
||||
'geohash' => array(
|
||||
0 => 'geohash',
|
||||
),
|
||||
'lat' => array(
|
||||
0 => 'lat',
|
||||
),
|
||||
'left' => array(
|
||||
0 => 'left',
|
||||
),
|
||||
'lon' => array(
|
||||
0 => 'lon',
|
||||
),
|
||||
'right' => array(
|
||||
0 => 'right',
|
||||
),
|
||||
'top' => array(
|
||||
0 => 'top',
|
||||
),
|
||||
),
|
||||
'locked' => 0,
|
||||
'module' => 'geofield',
|
||||
'settings' => array(
|
||||
'backend' => 'default',
|
||||
'srid' => 4326,
|
||||
),
|
||||
'translatable' => 0,
|
||||
'type' => 'geofield',
|
||||
);
|
||||
|
||||
return $field_bases;
|
||||
}
|
|
@ -3,6 +3,8 @@ description = Provides OpenLayers configuration for farm maps.
|
|||
core = 7.x
|
||||
package = Farm
|
||||
dependencies[] = ctools
|
||||
dependencies[] = features
|
||||
dependencies[] = geofield
|
||||
dependencies[] = openlayers
|
||||
dependencies[] = openlayers_geolocate_button
|
||||
dependencies[] = strongarm
|
||||
|
@ -10,6 +12,7 @@ features[ctools][] = openlayers:openlayers_maps:1
|
|||
features[ctools][] = openlayers:openlayers_styles:1
|
||||
features[ctools][] = strongarm:strongarm:1
|
||||
features[features_api][] = api:2
|
||||
features[field_base][] = field_farm_geofield
|
||||
features[openlayers_maps][] = farm_map_geofield
|
||||
features[openlayers_styles][] = farm_blue
|
||||
features[openlayers_styles][] = farm_brown
|
||||
|
|
Loading…
Reference in New Issue