Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

major re-roll of map feature to add new mapbox replacement view lever…

…aging views_geojson and our own baselayer using TMS, homepage map now using mapbox glass baselayer
  • Loading branch information...
commit 7c885518c82a7936ae3f1ed64a475d94d2392b36 1 parent 02e0828
@andrewmallis andrewmallis authored
View
9 sites/all/modules/features/occupations_map/occupations_map.features.inc
@@ -13,6 +13,10 @@ function occupations_map_ctools_plugin_api() {
return array("version" => "3");
}
list($module, $api) = func_get_args();
+ if ($module == "openlayers" && $api == "openlayers_layers") {
+ return array("version" => "1");
+ }
+ list($module, $api) = func_get_args();
if ($module == "openlayers" && $api == "openlayers_maps") {
return array("version" => "1");
}
@@ -22,8 +26,5 @@ function occupations_map_ctools_plugin_api() {
* Implements hook_views_api().
*/
function occupations_map_views_api() {
- list($module, $api) = func_get_args();
- if ($module == "views" && $api == "views_default") {
- return array("version" => "3.0");
- }
+ return array("version" => "3.0");
}
View
43 sites/all/modules/features/occupations_map/occupations_map.info
@@ -1,18 +1,25 @@
-name = "Occupations Map"
-description = "views of occupations on a map"
-core = "7.x"
-package = "FGA"
-php = "5.2.4"
-version = "7.x-0.11"
-project = "occupations_map"
-dependencies[] = "ctools"
-dependencies[] = "delta"
-dependencies[] = "openlayers"
-dependencies[] = "views"
-features[ctools][] = "delta:delta:3"
-features[ctools][] = "openlayers:openlayers_maps:1"
-features[ctools][] = "views:views_default:3.0"
-features[delta][] = "directory_fullmap"
-features[openlayers_maps][] = "occupation_map"
-features[views_view][] = "map_displays"
-features[views_view][] = "occupation_map_data"
+name = Occupations Map
+description = views of occupations on a map
+core = 7.x
+package = FGA
+php = 5.2.4
+version = 7.x-0.13
+project = occupations_map
+dependencies[] = ctools
+dependencies[] = delta
+dependencies[] = openlayers
+dependencies[] = views
+features[ctools][] = delta:delta:3
+features[ctools][] = openlayers:openlayers_layers:1
+features[ctools][] = openlayers:openlayers_maps:1
+features[ctools][] = views:views_default:3.0
+features[delta][] = directory_fullmap
+features[features_api][] = api:1
+features[openlayers_layers][] = mapbox_xyz
+features[openlayers_layers][] = occupations_geojson
+features[openlayers_layers][] = occupations_mapbox_tms
+features[openlayers_layers][] = occupy_mapbox_1
+features[openlayers_maps][] = occupation_map
+features[openlayers_maps][] = occupation_mapbox
+features[views_view][] = map_displays
+features[views_view][] = occupation_map_data
View
127 sites/all/modules/features/occupations_map/occupations_map.openlayers_layers.inc
@@ -0,0 +1,127 @@
+<?php
+/**
+ * @file
+ * occupations_map.openlayers_layers.inc
+ */
+
+/**
+ * Implements hook_openlayers_layers().
+ */
+function occupations_map_openlayers_layers() {
+ $export = array();
+
+ $openlayers_layers = new stdClass();
+ $openlayers_layers->disabled = FALSE; /* Edit this to true to make a default openlayers_layers disabled initially */
+ $openlayers_layers->api_version = 1;
+ $openlayers_layers->name = 'mapbox_xyz';
+ $openlayers_layers->title = 'Mapbox XYZ';
+ $openlayers_layers->description = 'loading with XYZ';
+ $openlayers_layers->data = array(
+ 'base_url' => 'http://a.tiles.mapbox.com/v3/occupy.map-7o6g1bgq/${z}/${x}/${y}.png',
+ 'layer_type' => 'openlayers_layer_type_xyz',
+ 'serverResolutions' => array(
+ '39135.758475' => '39135.758475',
+ '19567.8792375' => '19567.8792375',
+ '9783.93961875' => '9783.93961875',
+ '4891.96980938' => '4891.96980938',
+ '2445.98490469' => '2445.98490469',
+ '1222.99245234' => '1222.99245234',
+ '611.496226172' => '611.496226172',
+ '305.748113086' => '305.748113086',
+ '152.874056543' => '152.874056543',
+ '76.4370282715' => '76.4370282715',
+ '38.2185141357' => '38.2185141357',
+ '19.1092570679' => '19.1092570679',
+ '9.55462853394' => '9.55462853394',
+ '4.77731426697' => '4.77731426697',
+ '2.38865713348' => '2.38865713348',
+ ),
+ 'wrapDateLine' => 1,
+ 'projection' => array(
+ 0 => '900913',
+ ),
+ );
+ $export['mapbox_xyz'] = $openlayers_layers;
+
+ $openlayers_layers = new stdClass();
+ $openlayers_layers->disabled = FALSE; /* Edit this to true to make a default openlayers_layers disabled initially */
+ $openlayers_layers->api_version = 1;
+ $openlayers_layers->name = 'occupations_geojson';
+ $openlayers_layers->title = 'Occupations geojson';
+ $openlayers_layers->description = 'output using views geojson module';
+ $openlayers_layers->data = array(
+ 'url' => 'v1/occupations/occupy-directory.geojson',
+ 'geojson_data' => '',
+ 'layer_type' => 'openlayers_layer_type_geojson',
+ );
+ $export['occupations_geojson'] = $openlayers_layers;
+
+ $openlayers_layers = new stdClass();
+ $openlayers_layers->disabled = FALSE; /* Edit this to true to make a default openlayers_layers disabled initially */
+ $openlayers_layers->api_version = 1;
+ $openlayers_layers->name = 'occupations_mapbox_tms';
+ $openlayers_layers->title = 'Mapbox TMS';
+ $openlayers_layers->description = 'loading mapbox layer with TMS spec';
+ $openlayers_layers->data = array(
+ 'base_url' => 'http://a.tiles.mapbox.com/v3/',
+ 'layername' => 'occupy.map-7o6g1bgq',
+ 'baselayer' => 1,
+ 'type' => 'png',
+ 'resolutions' => array(
+ 0 => 39135.758475,
+ 1 => 19567.8792375,
+ 2 => 9783.93961875,
+ 3 => 4891.96980938,
+ 4 => 2445.98490469,
+ 5 => 1222.99245234,
+ 6 => 611.496226172,
+ 7 => 305.748113086,
+ 8 => 152.874056543,
+ 9 => 76.4370282715,
+ 10 => 38.2185141357,
+ ),
+ 'wrapDateLine' => 1,
+ 'layer_type' => 'openlayers_layer_type_tms',
+ );
+ $export['occupations_mapbox_tms'] = $openlayers_layers;
+
+ $openlayers_layers = new stdClass();
+ $openlayers_layers->disabled = FALSE; /* Edit this to true to make a default openlayers_layers disabled initially */
+ $openlayers_layers->api_version = 1;
+ $openlayers_layers->name = 'occupy_mapbox_1';
+ $openlayers_layers->title = 'Mapbox occupy streets';
+ $openlayers_layers->description = 'baselayer provided by mapbox module';
+ $openlayers_layers->data = array(
+ 'urls' => array(
+ 0 => 'http://a.tiles.mapbox.com/v3/occupy/',
+ ),
+ 'layername' => 'occupy.map-7o6g1bgq',
+ 'layer_type' => 'openlayers_layer_type_mapbox',
+ 'osm' => 0,
+ 'baselayer' => 1,
+ 'type' => 'png',
+ 'resolutions' => array(
+ 0 => 39135.758475,
+ 1 => 19567.8792375,
+ 2 => 9783.93961875,
+ 3 => 4891.96980938,
+ 4 => 2445.98490469,
+ 5 => 1222.99245234,
+ 6 => 611.496226172,
+ 7 => 305.748113086,
+ 8 => 152.874056543,
+ 9 => 76.4370282715,
+ 10 => 38.2185141357,
+ 11 => 19.1092570679,
+ 12 => 9.55462853394,
+ 13 => 4.77731426697,
+ 14 => 2.38865713348,
+ ),
+ 'projection' => array(
+ 0 => '900913',
+ ),
+ );
+ $export['occupy_mapbox_1'] = $openlayers_layers;
+
+ return $export;
+}
View
115 sites/all/modules/features/occupations_map/occupations_map.openlayers_maps.inc
@@ -25,7 +25,7 @@ function occupations_map_openlayers_maps() {
'hide_empty_map' => 0,
'center' => array(
'initial' => array(
- 'centerpoint' => '0,0',
+ 'centerpoint' => '-18.632815554265, 20.961436761951',
'zoom' => '2',
),
'restrict' => array(
@@ -35,9 +35,6 @@ function occupations_map_openlayers_maps() {
),
'behaviors' => array(
'openlayers_behavior_keyboarddefaults' => array(),
- 'openlayers_behavior_attribution' => array(
- 'seperator' => '',
- ),
'openlayers_behavior_layerswitcher' => array(
'ascending' => 1,
'roundedCorner' => 1,
@@ -54,38 +51,40 @@ function occupations_map_openlayers_maps() {
),
),
'openlayers_behavior_zoompanel' => array(),
- 'openlayers_behavior_zoomtomaxextent' => array(),
),
- 'default_layer' => 'osm_mapnik',
+ 'default_layer' => 'mapbox_world_glass',
'layers' => array(
- 'mapquest_osm' => 'mapquest_osm',
- 'mapquest_openaerial' => 'mapquest_openaerial',
- 'osm_mapnik' => 'osm_mapnik',
- 'osm_tah' => 'osm_tah',
+ 'mapbox_world_glass' => 'mapbox_world_glass',
+ 'mapbox_world_bright' => 'mapbox_world_bright',
'occupation_map_data_openlayers_1' => 'occupation_map_data_openlayers_1',
),
'layer_weight' => array(
- 'occupation_map_data_openlayers_1' => '0',
- 'openlayers_geojson_picture_this' => '0',
+ 'occupations_geojson' => '-5',
+ 'occupation_map_data_openlayers_1' => '-4',
'geofield_formatter' => '0',
+ 'openlayers_geojson_picture_this' => '0',
),
'layer_styles' => array(
+ 'occupations_geojson' => 'default_marker_black_small',
'geofield_formatter' => '0',
'openlayers_geojson_picture_this' => '0',
'occupation_map_data_openlayers_1' => 'default_marker_black_small',
),
'layer_styles_select' => array(
+ 'occupations_geojson' => 'default_marker_black_small',
'geofield_formatter' => '0',
'openlayers_geojson_picture_this' => '0',
'occupation_map_data_openlayers_1' => 'default_marker_black_small',
),
'layer_activated' => array(
'occupation_map_data_openlayers_1' => 'occupation_map_data_openlayers_1',
+ 'occupations_geojson' => 0,
'geofield_formatter' => 0,
'openlayers_geojson_picture_this' => 0,
),
'layer_switcher' => array(
- 'occupation_map_data_openlayers_1' => 'occupation_map_data_openlayers_1',
+ 'occupation_map_data_openlayers_1' => 0,
+ 'occupations_geojson' => 0,
'geofield_formatter' => 0,
'openlayers_geojson_picture_this' => 0,
),
@@ -99,5 +98,95 @@ function occupations_map_openlayers_maps() {
);
$export['occupation_map'] = $openlayers_maps;
+ $openlayers_maps = new stdClass();
+ $openlayers_maps->disabled = FALSE; /* Edit this to true to make a default openlayers_maps disabled initially */
+ $openlayers_maps->api_version = 1;
+ $openlayers_maps->name = 'occupation_mapbox';
+ $openlayers_maps->title = 'Occupation Mapbox';
+ $openlayers_maps->description = 'Occupation Map leveraging Mapbox tiles as a baselayer for the world view and geojson for the data';
+ $openlayers_maps->data = array(
+ 'width' => 'auto',
+ 'height' => '500px',
+ 'image_path' => 'sites/all/modules/contrib/openlayers/themes/default_dark/img/',
+ 'css_path' => 'sites/all/modules/contrib/openlayers/themes/default_dark/style.css',
+ 'proxy_host' => '',
+ 'hide_empty_map' => 0,
+ 'center' => array(
+ 'initial' => array(
+ 'centerpoint' => '-18.632815554265, 20.961436761951',
+ 'zoom' => '2',
+ ),
+ 'restrict' => array(
+ 'restrictextent' => 0,
+ 'restrictedExtent' => '',
+ ),
+ ),
+ 'behaviors' => array(
+ 'openlayers_behavior_keyboarddefaults' => array(),
+ 'openlayers_behavior_layerswitcher' => array(
+ 'ascending' => 1,
+ 'roundedCorner' => 1,
+ 'roundedCornerColor' => '#222222',
+ ),
+ 'openlayers_behavior_navigation' => array(
+ 'zoomWheelEnabled' => 1,
+ 'zoomBoxEnabled' => 1,
+ 'documentDrag' => 0,
+ ),
+ 'openlayers_behavior_popup' => array(
+ 'layers' => array(
+ 'occupations_geojson' => 'occupations_geojson',
+ ),
+ ),
+ 'openlayers_behavior_zoompanel' => array(),
+ ),
+ 'default_layer' => 'occupations_mapbox_tms',
+ 'layers' => array(
+ 'occupy_mapbox_1' => 'occupy_mapbox_1',
+ 'mapbox_world_glass' => 'mapbox_world_glass',
+ 'mapbox_xyz' => 'mapbox_xyz',
+ 'occupations_mapbox_tms' => 'occupations_mapbox_tms',
+ 'occupations_geojson' => 'occupations_geojson',
+ ),
+ 'layer_weight' => array(
+ 'occupations_geojson' => '-5',
+ 'occupation_map_data_openlayers_1' => '-2',
+ 'openlayers_geojson_picture_this' => '0',
+ 'geofield_formatter' => '0',
+ ),
+ 'layer_styles' => array(
+ 'geofield_formatter' => '0',
+ 'openlayers_geojson_picture_this' => '0',
+ 'occupation_map_data_openlayers_1' => 'default_marker_black_small',
+ 'occupations_geojson' => 'default_marker_gold',
+ ),
+ 'layer_styles_select' => array(
+ 'geofield_formatter' => '0',
+ 'openlayers_geojson_picture_this' => '0',
+ 'occupation_map_data_openlayers_1' => 'default_marker_black_small',
+ 'occupations_geojson' => 'default_marker_gold',
+ ),
+ 'layer_activated' => array(
+ 'occupations_geojson' => 'occupations_geojson',
+ 'geofield_formatter' => 0,
+ 'openlayers_geojson_picture_this' => 0,
+ 'occupation_map_data_openlayers_1' => 0,
+ ),
+ 'layer_switcher' => array(
+ 'occupations_geojson' => 0,
+ 'geofield_formatter' => 0,
+ 'openlayers_geojson_picture_this' => 0,
+ 'occupation_map_data_openlayers_1' => 0,
+ ),
+ 'projection' => '900913',
+ 'displayProjection' => '4326',
+ 'styles' => array(
+ 'default' => 'default',
+ 'select' => 'default_select',
+ 'temporary' => 'default',
+ ),
+ );
+ $export['occupation_mapbox'] = $openlayers_maps;
+
return $export;
}
View
273 sites/all/modules/features/occupations_map/occupations_map.views_default.inc
@@ -24,8 +24,8 @@ function occupations_map_views_default_views() {
$handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['cache']['type'] = 'time';
- $handler->display->display_options['cache']['results_lifespan'] = '1800';
- $handler->display->display_options['cache']['output_lifespan'] = '1800';
+ $handler->display->display_options['cache']['results_lifespan'] = '3600';
+ $handler->display->display_options['cache']['output_lifespan'] = '3600';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['query']['options']['query_comment'] = FALSE;
$handler->display->display_options['exposed_form']['type'] = 'basic';
@@ -68,11 +68,22 @@ function occupations_map_views_default_views() {
/* Display: Occupation Map Page */
$handler = $view->new_display('page', 'Occupation Map Page', 'page');
$handler->display->display_options['path'] = 'map';
+
+ /* Display: Occupation Mapbox Page */
+ $handler = $view->new_display('page', 'Occupation Mapbox Page', 'page_mapbox');
+ $handler->display->display_options['display_description'] = 'leveraging mapbox';
+ $handler->display->display_options['defaults']['style_plugin'] = FALSE;
+ $handler->display->display_options['style_plugin'] = 'openlayers_map';
+ $handler->display->display_options['style_options']['map'] = 'occupation_mapbox';
+ $handler->display->display_options['defaults']['style_options'] = FALSE;
+ $handler->display->display_options['defaults']['row_plugin'] = FALSE;
+ $handler->display->display_options['defaults']['row_options'] = FALSE;
+ $handler->display->display_options['path'] = 'mapbox';
$export['map_displays'] = $view;
$view = new view;
$view->name = 'occupation_map_data';
- $view->description = 'Map data of occuptations.';
+ $view->description = 'Map data of occuptations';
$view->tag = 'FGA';
$view->base_table = 'node';
$view->human_name = 'Occupation Map Data';
@@ -90,7 +101,9 @@ function occupations_map_views_default_views() {
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['query']['options']['query_comment'] = FALSE;
$handler->display->display_options['exposed_form']['type'] = 'basic';
- $handler->display->display_options['pager']['type'] = 'full';
+ $handler->display->display_options['pager']['type'] = 'some';
+ $handler->display->display_options['pager']['options']['items_per_page'] = '0';
+ $handler->display->display_options['pager']['options']['offset'] = '0';
$handler->display->display_options['style_plugin'] = 'openlayers_data';
$handler->display->display_options['style_options']['data_source'] = array(
'value' => 'wkt',
@@ -105,6 +118,34 @@ function occupations_map_views_default_views() {
'description_field' => 'body',
);
$handler->display->display_options['row_plugin'] = 'fields';
+ /* Field: Content: Occupation Image or Icon */
+ $handler->display->display_options['fields']['field_occupation_image']['id'] = 'field_occupation_image';
+ $handler->display->display_options['fields']['field_occupation_image']['table'] = 'field_data_field_occupation_image';
+ $handler->display->display_options['fields']['field_occupation_image']['field'] = 'field_occupation_image';
+ $handler->display->display_options['fields']['field_occupation_image']['label'] = '';
+ $handler->display->display_options['fields']['field_occupation_image']['alter']['alter_text'] = 0;
+ $handler->display->display_options['fields']['field_occupation_image']['alter']['make_link'] = 0;
+ $handler->display->display_options['fields']['field_occupation_image']['alter']['absolute'] = 0;
+ $handler->display->display_options['fields']['field_occupation_image']['alter']['external'] = 0;
+ $handler->display->display_options['fields']['field_occupation_image']['alter']['replace_spaces'] = 0;
+ $handler->display->display_options['fields']['field_occupation_image']['alter']['trim_whitespace'] = 0;
+ $handler->display->display_options['fields']['field_occupation_image']['alter']['nl2br'] = 0;
+ $handler->display->display_options['fields']['field_occupation_image']['alter']['word_boundary'] = 1;
+ $handler->display->display_options['fields']['field_occupation_image']['alter']['ellipsis'] = 1;
+ $handler->display->display_options['fields']['field_occupation_image']['alter']['strip_tags'] = 0;
+ $handler->display->display_options['fields']['field_occupation_image']['alter']['trim'] = 0;
+ $handler->display->display_options['fields']['field_occupation_image']['alter']['html'] = 0;
+ $handler->display->display_options['fields']['field_occupation_image']['element_label_colon'] = FALSE;
+ $handler->display->display_options['fields']['field_occupation_image']['element_default_classes'] = 0;
+ $handler->display->display_options['fields']['field_occupation_image']['hide_empty'] = 0;
+ $handler->display->display_options['fields']['field_occupation_image']['empty_zero'] = 0;
+ $handler->display->display_options['fields']['field_occupation_image']['hide_alter_empty'] = 1;
+ $handler->display->display_options['fields']['field_occupation_image']['click_sort_column'] = 'fid';
+ $handler->display->display_options['fields']['field_occupation_image']['settings'] = array(
+ 'image_style' => 'occupation_thumb_sm',
+ 'image_link' => '',
+ );
+ $handler->display->display_options['fields']['field_occupation_image']['field_api_classes'] = 0;
/* Field: Content: Title */
$handler->display->display_options['fields']['title']['id'] = 'title';
$handler->display->display_options['fields']['title']['table'] = 'node';
@@ -175,6 +216,35 @@ function occupations_map_views_default_views() {
'data' => 'full',
);
$handler->display->display_options['fields']['field_occupation_geo']['field_api_classes'] = 0;
+ /* Field: Content: Founded */
+ $handler->display->display_options['fields']['field_occupation_origin_date']['id'] = 'field_occupation_origin_date';
+ $handler->display->display_options['fields']['field_occupation_origin_date']['table'] = 'field_data_field_occupation_origin_date';
+ $handler->display->display_options['fields']['field_occupation_origin_date']['field'] = 'field_occupation_origin_date';
+ $handler->display->display_options['fields']['field_occupation_origin_date']['alter']['alter_text'] = 0;
+ $handler->display->display_options['fields']['field_occupation_origin_date']['alter']['make_link'] = 0;
+ $handler->display->display_options['fields']['field_occupation_origin_date']['alter']['absolute'] = 0;
+ $handler->display->display_options['fields']['field_occupation_origin_date']['alter']['external'] = 0;
+ $handler->display->display_options['fields']['field_occupation_origin_date']['alter']['replace_spaces'] = 0;
+ $handler->display->display_options['fields']['field_occupation_origin_date']['alter']['trim_whitespace'] = 0;
+ $handler->display->display_options['fields']['field_occupation_origin_date']['alter']['nl2br'] = 0;
+ $handler->display->display_options['fields']['field_occupation_origin_date']['alter']['word_boundary'] = 1;
+ $handler->display->display_options['fields']['field_occupation_origin_date']['alter']['ellipsis'] = 1;
+ $handler->display->display_options['fields']['field_occupation_origin_date']['alter']['strip_tags'] = 0;
+ $handler->display->display_options['fields']['field_occupation_origin_date']['alter']['trim'] = 0;
+ $handler->display->display_options['fields']['field_occupation_origin_date']['alter']['html'] = 0;
+ $handler->display->display_options['fields']['field_occupation_origin_date']['element_label_colon'] = 1;
+ $handler->display->display_options['fields']['field_occupation_origin_date']['element_default_classes'] = 0;
+ $handler->display->display_options['fields']['field_occupation_origin_date']['hide_empty'] = 0;
+ $handler->display->display_options['fields']['field_occupation_origin_date']['empty_zero'] = 0;
+ $handler->display->display_options['fields']['field_occupation_origin_date']['hide_alter_empty'] = 1;
+ $handler->display->display_options['fields']['field_occupation_origin_date']['settings'] = array(
+ 'format_type' => 'date_short',
+ 'fromto' => 'both',
+ 'multiple_number' => '',
+ 'multiple_from' => '',
+ 'multiple_to' => '',
+ );
+ $handler->display->display_options['fields']['field_occupation_origin_date']['field_api_classes'] = 0;
/* Sort criterion: Content: Updated date */
$handler->display->display_options['sorts']['changed']['id'] = 'changed';
$handler->display->display_options['sorts']['changed']['table'] = 'node';
@@ -205,13 +275,204 @@ function occupations_map_views_default_views() {
$handler->display->display_options['filters']['field_occupation_geo_wkt']['field'] = 'field_occupation_geo_wkt';
$handler->display->display_options['filters']['field_occupation_geo_wkt']['operator'] = 'not empty';
- /* Display: Occupation OpenLayers Data Overlay */
- $handler = $view->new_display('openlayers', 'Occupation OpenLayers Data Overlay', 'openlayers_1');
+ /* Display: Occupations OpenLayers Data Overlay */
+ $handler = $view->new_display('openlayers', 'Occupations OpenLayers Data Overlay', 'openlayers_1');
+ $handler->display->display_options['display_description'] = 'Occupations generated in OL Data format';
$handler->display->display_options['pager']['type'] = 'some';
$handler->display->display_options['pager']['options']['items_per_page'] = '0';
$handler->display->display_options['pager']['options']['offset'] = '0';
$handler->display->display_options['defaults']['row_plugin'] = FALSE;
$handler->display->display_options['row_plugin'] = 'fields';
+
+ /* Display: Occupations geojson data overlay */
+ $handler = $view->new_display('page', 'Occupations geojson data overlay', 'occupations_geojson');
+ $handler->display->display_options['defaults']['title'] = FALSE;
+ $handler->display->display_options['title'] = 'Occupations geojson data';
+ $handler->display->display_options['display_description'] = 'views_geojson generated json of occupation for OL';
+ $handler->display->display_options['defaults']['style_plugin'] = FALSE;
+ $handler->display->display_options['style_plugin'] = 'views_geojson';
+ $handler->display->display_options['style_options']['data_source']['value'] = 'geofield';
+ $handler->display->display_options['style_options']['data_source']['latitude'] = 'field_occupation_geo';
+ $handler->display->display_options['style_options']['data_source']['longitude'] = 'field_occupation_geo';
+ $handler->display->display_options['style_options']['data_source']['bbox_top'] = 'field_occupation_image';
+ $handler->display->display_options['style_options']['data_source']['bbox_right'] = 'field_occupation_image';
+ $handler->display->display_options['style_options']['data_source']['bbox_bottom'] = 'field_occupation_image';
+ $handler->display->display_options['style_options']['data_source']['bbox_left'] = 'field_occupation_image';
+ $handler->display->display_options['style_options']['data_source']['name_field'] = 'title';
+ $handler->display->display_options['style_options']['data_source']['description_field'] = '';
+ $handler->display->display_options['style_options']['jsonp_prefix'] = '';
+ $handler->display->display_options['style_options']['using_views_api_mode'] = 0;
+ $handler->display->display_options['defaults']['style_options'] = FALSE;
+ $handler->display->display_options['defaults']['row_plugin'] = FALSE;
+ $handler->display->display_options['defaults']['row_options'] = FALSE;
+ $handler->display->display_options['defaults']['fields'] = FALSE;
+ /* Field: Content: Occupation Image or Icon */
+ $handler->display->display_options['fields']['field_occupation_image']['id'] = 'field_occupation_image';
+ $handler->display->display_options['fields']['field_occupation_image']['table'] = 'field_data_field_occupation_image';
+ $handler->display->display_options['fields']['field_occupation_image']['field'] = 'field_occupation_image';
+ $handler->display->display_options['fields']['field_occupation_image']['label'] = '';
+ $handler->display->display_options['fields']['field_occupation_image']['alter']['alter_text'] = 0;
+ $handler->display->display_options['fields']['field_occupation_image']['alter']['make_link'] = 0;
+ $handler->display->display_options['fields']['field_occupation_image']['alter']['absolute'] = 0;
+ $handler->display->display_options['fields']['field_occupation_image']['alter']['external'] = 0;
+ $handler->display->display_options['fields']['field_occupation_image']['alter']['replace_spaces'] = 0;
+ $handler->display->display_options['fields']['field_occupation_image']['alter']['trim_whitespace'] = 0;
+ $handler->display->display_options['fields']['field_occupation_image']['alter']['nl2br'] = 0;
+ $handler->display->display_options['fields']['field_occupation_image']['alter']['word_boundary'] = 1;
+ $handler->display->display_options['fields']['field_occupation_image']['alter']['ellipsis'] = 1;
+ $handler->display->display_options['fields']['field_occupation_image']['alter']['strip_tags'] = 0;
+ $handler->display->display_options['fields']['field_occupation_image']['alter']['trim'] = 0;
+ $handler->display->display_options['fields']['field_occupation_image']['alter']['html'] = 0;
+ $handler->display->display_options['fields']['field_occupation_image']['element_label_colon'] = FALSE;
+ $handler->display->display_options['fields']['field_occupation_image']['element_wrapper_type'] = '0';
+ $handler->display->display_options['fields']['field_occupation_image']['element_default_classes'] = 0;
+ $handler->display->display_options['fields']['field_occupation_image']['hide_empty'] = 1;
+ $handler->display->display_options['fields']['field_occupation_image']['empty_zero'] = 0;
+ $handler->display->display_options['fields']['field_occupation_image']['hide_alter_empty'] = 1;
+ $handler->display->display_options['fields']['field_occupation_image']['click_sort_column'] = 'fid';
+ $handler->display->display_options['fields']['field_occupation_image']['settings'] = array(
+ 'image_style' => 'occupation_thumb_sm',
+ 'image_link' => '',
+ );
+ $handler->display->display_options['fields']['field_occupation_image']['field_api_classes'] = 0;
+ /* Field: Content: Title */
+ $handler->display->display_options['fields']['title']['id'] = 'title';
+ $handler->display->display_options['fields']['title']['table'] = 'node';
+ $handler->display->display_options['fields']['title']['field'] = 'title';
+ $handler->display->display_options['fields']['title']['label'] = '';
+ $handler->display->display_options['fields']['title']['alter']['alter_text'] = 0;
+ $handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
+ $handler->display->display_options['fields']['title']['alter']['absolute'] = 0;
+ $handler->display->display_options['fields']['title']['alter']['external'] = 0;
+ $handler->display->display_options['fields']['title']['alter']['replace_spaces'] = 0;
+ $handler->display->display_options['fields']['title']['alter']['trim_whitespace'] = 0;
+ $handler->display->display_options['fields']['title']['alter']['nl2br'] = 0;
+ $handler->display->display_options['fields']['title']['alter']['word_boundary'] = 0;
+ $handler->display->display_options['fields']['title']['alter']['ellipsis'] = 0;
+ $handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
+ $handler->display->display_options['fields']['title']['alter']['trim'] = 0;
+ $handler->display->display_options['fields']['title']['alter']['html'] = 0;
+ $handler->display->display_options['fields']['title']['element_label_colon'] = FALSE;
+ $handler->display->display_options['fields']['title']['element_default_classes'] = 1;
+ $handler->display->display_options['fields']['title']['hide_empty'] = 0;
+ $handler->display->display_options['fields']['title']['empty_zero'] = 0;
+ $handler->display->display_options['fields']['title']['hide_alter_empty'] = 1;
+ $handler->display->display_options['fields']['title']['link_to_node'] = 1;
+ /* Field: Content: Node UUID */
+ $handler->display->display_options['fields']['uuid']['id'] = 'uuid';
+ $handler->display->display_options['fields']['uuid']['table'] = 'node';
+ $handler->display->display_options['fields']['uuid']['field'] = 'uuid';
+ $handler->display->display_options['fields']['uuid']['label'] = '';
+ $handler->display->display_options['fields']['uuid']['exclude'] = TRUE;
+ $handler->display->display_options['fields']['uuid']['alter']['alter_text'] = 0;
+ $handler->display->display_options['fields']['uuid']['alter']['make_link'] = 0;
+ $handler->display->display_options['fields']['uuid']['alter']['absolute'] = 0;
+ $handler->display->display_options['fields']['uuid']['alter']['external'] = 0;
+ $handler->display->display_options['fields']['uuid']['alter']['replace_spaces'] = 0;
+ $handler->display->display_options['fields']['uuid']['alter']['trim_whitespace'] = 0;
+ $handler->display->display_options['fields']['uuid']['alter']['nl2br'] = 0;
+ $handler->display->display_options['fields']['uuid']['alter']['word_boundary'] = 1;
+ $handler->display->display_options['fields']['uuid']['alter']['ellipsis'] = 1;
+ $handler->display->display_options['fields']['uuid']['alter']['strip_tags'] = 0;
+ $handler->display->display_options['fields']['uuid']['alter']['trim'] = 0;
+ $handler->display->display_options['fields']['uuid']['alter']['html'] = 0;
+ $handler->display->display_options['fields']['uuid']['element_label_colon'] = FALSE;
+ $handler->display->display_options['fields']['uuid']['element_wrapper_type'] = '0';
+ $handler->display->display_options['fields']['uuid']['element_default_classes'] = 0;
+ $handler->display->display_options['fields']['uuid']['hide_empty'] = 1;
+ $handler->display->display_options['fields']['uuid']['empty_zero'] = 0;
+ $handler->display->display_options['fields']['uuid']['hide_alter_empty'] = 1;
+ /* Field: Content: Founded */
+ $handler->display->display_options['fields']['field_occupation_origin_date']['id'] = 'field_occupation_origin_date';
+ $handler->display->display_options['fields']['field_occupation_origin_date']['table'] = 'field_data_field_occupation_origin_date';
+ $handler->display->display_options['fields']['field_occupation_origin_date']['field'] = 'field_occupation_origin_date';
+ $handler->display->display_options['fields']['field_occupation_origin_date']['label'] = '';
+ $handler->display->display_options['fields']['field_occupation_origin_date']['exclude'] = TRUE;
+ $handler->display->display_options['fields']['field_occupation_origin_date']['alter']['alter_text'] = 0;
+ $handler->display->display_options['fields']['field_occupation_origin_date']['alter']['make_link'] = 0;
+ $handler->display->display_options['fields']['field_occupation_origin_date']['alter']['absolute'] = 0;
+ $handler->display->display_options['fields']['field_occupation_origin_date']['alter']['external'] = 0;
+ $handler->display->display_options['fields']['field_occupation_origin_date']['alter']['replace_spaces'] = 0;
+ $handler->display->display_options['fields']['field_occupation_origin_date']['alter']['trim_whitespace'] = 0;
+ $handler->display->display_options['fields']['field_occupation_origin_date']['alter']['nl2br'] = 0;
+ $handler->display->display_options['fields']['field_occupation_origin_date']['alter']['word_boundary'] = 1;
+ $handler->display->display_options['fields']['field_occupation_origin_date']['alter']['ellipsis'] = 1;
+ $handler->display->display_options['fields']['field_occupation_origin_date']['alter']['strip_tags'] = 0;
+ $handler->display->display_options['fields']['field_occupation_origin_date']['alter']['trim'] = 0;
+ $handler->display->display_options['fields']['field_occupation_origin_date']['alter']['html'] = 0;
+ $handler->display->display_options['fields']['field_occupation_origin_date']['element_label_colon'] = FALSE;
+ $handler->display->display_options['fields']['field_occupation_origin_date']['element_wrapper_type'] = '0';
+ $handler->display->display_options['fields']['field_occupation_origin_date']['element_default_classes'] = 0;
+ $handler->display->display_options['fields']['field_occupation_origin_date']['hide_empty'] = 1;
+ $handler->display->display_options['fields']['field_occupation_origin_date']['empty_zero'] = 0;
+ $handler->display->display_options['fields']['field_occupation_origin_date']['hide_alter_empty'] = 1;
+ $handler->display->display_options['fields']['field_occupation_origin_date']['type'] = 'date_plain';
+ $handler->display->display_options['fields']['field_occupation_origin_date']['settings'] = array(
+ 'format_type' => 'date_short',
+ 'fromto' => 'both',
+ 'multiple_number' => '',
+ 'multiple_from' => '',
+ 'multiple_to' => '',
+ );
+ $handler->display->display_options['fields']['field_occupation_origin_date']['field_api_classes'] = 0;
+ /* Field: Content: Geofield */
+ $handler->display->display_options['fields']['field_occupation_geo']['id'] = 'field_occupation_geo';
+ $handler->display->display_options['fields']['field_occupation_geo']['table'] = 'field_data_field_occupation_geo';
+ $handler->display->display_options['fields']['field_occupation_geo']['field'] = 'field_occupation_geo';
+ $handler->display->display_options['fields']['field_occupation_geo']['label'] = '';
+ $handler->display->display_options['fields']['field_occupation_geo']['alter']['alter_text'] = 0;
+ $handler->display->display_options['fields']['field_occupation_geo']['alter']['make_link'] = 0;
+ $handler->display->display_options['fields']['field_occupation_geo']['alter']['absolute'] = 0;
+ $handler->display->display_options['fields']['field_occupation_geo']['alter']['external'] = 0;
+ $handler->display->display_options['fields']['field_occupation_geo']['alter']['replace_spaces'] = 0;
+ $handler->display->display_options['fields']['field_occupation_geo']['alter']['trim_whitespace'] = 0;
+ $handler->display->display_options['fields']['field_occupation_geo']['alter']['nl2br'] = 0;
+ $handler->display->display_options['fields']['field_occupation_geo']['alter']['word_boundary'] = 1;
+ $handler->display->display_options['fields']['field_occupation_geo']['alter']['ellipsis'] = 1;
+ $handler->display->display_options['fields']['field_occupation_geo']['alter']['strip_tags'] = 0;
+ $handler->display->display_options['fields']['field_occupation_geo']['alter']['trim'] = 0;
+ $handler->display->display_options['fields']['field_occupation_geo']['alter']['html'] = 0;
+ $handler->display->display_options['fields']['field_occupation_geo']['element_label_colon'] = FALSE;
+ $handler->display->display_options['fields']['field_occupation_geo']['element_default_classes'] = 1;
+ $handler->display->display_options['fields']['field_occupation_geo']['hide_empty'] = 0;
+ $handler->display->display_options['fields']['field_occupation_geo']['empty_zero'] = 0;
+ $handler->display->display_options['fields']['field_occupation_geo']['hide_alter_empty'] = 1;
+ $handler->display->display_options['fields']['field_occupation_geo']['click_sort_column'] = 'wkt';
+ $handler->display->display_options['fields']['field_occupation_geo']['type'] = 'geofield_geojson';
+ $handler->display->display_options['fields']['field_occupation_geo']['settings'] = array(
+ 'data' => 'full',
+ );
+ $handler->display->display_options['fields']['field_occupation_geo']['field_api_classes'] = 0;
+ /* Field: description */
+ $handler->display->display_options['fields']['body']['id'] = 'body';
+ $handler->display->display_options['fields']['body']['table'] = 'field_data_body';
+ $handler->display->display_options['fields']['body']['field'] = 'body';
+ $handler->display->display_options['fields']['body']['ui_name'] = 'description';
+ $handler->display->display_options['fields']['body']['label'] = '';
+ $handler->display->display_options['fields']['body']['alter']['alter_text'] = 1;
+ $handler->display->display_options['fields']['body']['alter']['text'] = '<span class="occupation-image">[field_occupation_image]</span>
+<em>founded: [field_occupation_origin_date]</em>';
+ $handler->display->display_options['fields']['body']['alter']['make_link'] = 0;
+ $handler->display->display_options['fields']['body']['alter']['absolute'] = 0;
+ $handler->display->display_options['fields']['body']['alter']['external'] = 0;
+ $handler->display->display_options['fields']['body']['alter']['replace_spaces'] = 0;
+ $handler->display->display_options['fields']['body']['alter']['trim_whitespace'] = 0;
+ $handler->display->display_options['fields']['body']['alter']['nl2br'] = 0;
+ $handler->display->display_options['fields']['body']['alter']['word_boundary'] = 1;
+ $handler->display->display_options['fields']['body']['alter']['ellipsis'] = 1;
+ $handler->display->display_options['fields']['body']['alter']['strip_tags'] = 0;
+ $handler->display->display_options['fields']['body']['alter']['trim'] = 0;
+ $handler->display->display_options['fields']['body']['alter']['html'] = 0;
+ $handler->display->display_options['fields']['body']['element_label_colon'] = FALSE;
+ $handler->display->display_options['fields']['body']['element_default_classes'] = 0;
+ $handler->display->display_options['fields']['body']['hide_empty'] = 1;
+ $handler->display->display_options['fields']['body']['empty_zero'] = 0;
+ $handler->display->display_options['fields']['body']['hide_alter_empty'] = 1;
+ $handler->display->display_options['fields']['body']['settings'] = array(
+ 'trim_length' => '300',
+ );
+ $handler->display->display_options['fields']['body']['field_api_classes'] = 0;
+ $handler->display->display_options['path'] = 'v1/occupations/occupy-directory.geojson';
$export['occupation_map_data'] = $view;
return $export;
Please sign in to comment.
Something went wrong with that request. Please try again.