mirror of
https://github.com/farmOS/farmOS.git
synced 2024-02-23 11:37:38 +01:00
Add layers and sources for Google Satellite and Terrain.
This commit is contained in:
parent
7ba10786b3
commit
2fd20bc825
|
@ -24,5 +24,33 @@ function farm_map_default_openlayers_layers() {
|
|||
);
|
||||
$export['farm_map_layer_google_hybrid'] = $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_map_layer_google_satellite';
|
||||
$ol_layer->name = 'Farm Map: Google Satellite';
|
||||
$ol_layer->description = '';
|
||||
$ol_layer->factory_service = 'openlayers.Layer:Tile';
|
||||
$ol_layer->options = array(
|
||||
'source' => 'farm_map_source_google_satellite',
|
||||
'visible' => 1,
|
||||
'opacity' => 1,
|
||||
);
|
||||
$export['farm_map_layer_google_satellite'] = $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_map_layer_google_terrain';
|
||||
$ol_layer->name = 'Farm Map: Google Terrain';
|
||||
$ol_layer->description = '';
|
||||
$ol_layer->factory_service = 'openlayers.Layer:Tile';
|
||||
$ol_layer->options = array(
|
||||
'source' => 'farm_map_source_google_terrain',
|
||||
'visible' => 1,
|
||||
'opacity' => 1,
|
||||
);
|
||||
$export['farm_map_layer_google_terrain'] = $ol_layer;
|
||||
|
||||
return $export;
|
||||
}
|
||||
|
|
|
@ -26,5 +26,37 @@ function farm_map_default_openlayers_sources() {
|
|||
);
|
||||
$export['farm_map_source_google_hybrid'] = $ol_source;
|
||||
|
||||
$ol_source = new stdClass();
|
||||
$ol_source->disabled = FALSE; /* Edit this to true to make a default ol_source disabled initially */
|
||||
$ol_source->api_version = 1;
|
||||
$ol_source->machine_name = 'farm_map_source_google_satellite';
|
||||
$ol_source->name = 'Farm Map: Google Satellite';
|
||||
$ol_source->description = '';
|
||||
$ol_source->factory_service = 'openlayers.Source:GoogleMaps';
|
||||
$ol_source->options = array(
|
||||
'key' => '',
|
||||
'client' => '',
|
||||
'channel' => '',
|
||||
'mapTypeId' => 'SATELLITE',
|
||||
'sensor' => 0,
|
||||
);
|
||||
$export['farm_map_source_google_satellite'] = $ol_source;
|
||||
|
||||
$ol_source = new stdClass();
|
||||
$ol_source->disabled = FALSE; /* Edit this to true to make a default ol_source disabled initially */
|
||||
$ol_source->api_version = 1;
|
||||
$ol_source->machine_name = 'farm_map_source_google_terrain';
|
||||
$ol_source->name = 'Farm Map: Google Terrain';
|
||||
$ol_source->description = '';
|
||||
$ol_source->factory_service = 'openlayers.Source:GoogleMaps';
|
||||
$ol_source->options = array(
|
||||
'key' => '',
|
||||
'client' => '',
|
||||
'channel' => '',
|
||||
'mapTypeId' => 'TERRAIN',
|
||||
'sensor' => 0,
|
||||
);
|
||||
$export['farm_map_source_google_terrain'] = $ol_source;
|
||||
|
||||
return $export;
|
||||
}
|
||||
|
|
|
@ -19,6 +19,10 @@ features[field_base][] = field_farm_geofield
|
|||
features[openlayers_components][] = farm_map_component_geofield_zoom_to_source
|
||||
features[openlayers_controls][] = farm_map_control_layer_switcher
|
||||
features[openlayers_layers][] = farm_map_layer_google_hybrid
|
||||
features[openlayers_layers][] = farm_map_layer_google_satellite
|
||||
features[openlayers_layers][] = farm_map_layer_google_terrain
|
||||
features[openlayers_maps][] = farm_map_geofield
|
||||
features[openlayers_maps][] = farm_map_geofield_formatter
|
||||
features[openlayers_sources][] = farm_map_source_google_hybrid
|
||||
features[openlayers_sources][] = farm_map_source_google_satellite
|
||||
features[openlayers_sources][] = farm_map_source_google_terrain
|
||||
|
|
Loading…
Reference in a new issue