1<?php
2// (c) Copyright by authors of the Tiki Wiki CMS Groupware Project
3//
4// All Rights Reserved. See copyright.txt for details and a complete list of authors.
5// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
6// $Id$
7
8function prefs_geo_list()
9{
10	return [
11		'geo_enabled' => [
12			'name' => tr('Maps & Location Enabled'),
13			'type' => 'flag',
14			'description' => tr('Provide controls to load map and location libraries.'),
15			'default' => 'n',
16		],
17		'geo_locate_wiki' => [
18			'name' => tra('Geolocate wiki pages'),
19			'description' => tra('Provide controls to indicate a geographic location of wiki pages in the edit form.'),
20			'dependencies' => ['geo_enabled'],
21			'type' => 'flag',
22			'default' => 'n',
23		],
24		'geo_locate_article' => [
25			'name' => tra('Geolocate articles'),
26			'description' => tra('Provide controls to indicate a geographic location in the article edit form.'),
27			'dependencies' => ['geo_enabled'],
28			'type' => 'flag',
29			'default' => 'n',
30		],
31		'geo_locate_blogpost' => [
32			'name' => tra('Geolocate blog posts'),
33			'description' => tra('Provide controls to indicate a geographic location in the blog post edit form.'),
34			'dependencies' => ['geo_enabled'],
35			'type' => 'flag',
36			'default' => 'n',
37		],
38		'geo_tilesets' => [
39			'name' => tra('Available tile layers on maps'),
40			'description' => tra('Enables replacement of the default OpenStreetMap tiles with tiles from other mapping services, such as Google or Bing.'),
41			'dependencies' => ['geo_enabled'],
42			'hint' => tr(
43				'Valid options for OpenLayers 2 are: %0 and for OpenLayers 3+ are: %1',
44				implode(
45					', ',
46					[
47						'openstreetmap',
48						'mapquest_street',
49						'mapquest_aerial',
50						'google_street',
51						'google_satellite',
52						'google_physical',
53						'google_hybrid',
54						'blank',
55					]
56				),
57				// for ol3+
58				implode(
59					', ',
60					[
61						'openstreetmap',
62						'bing_road',
63						'bing_road_on_demand',
64						'bing_aerial',
65						'bing_aerial_with_labels',
66						'bing_collins_bart',
67						'bing_ordnance_survey',
68					]
69				)
70			),
71			'type' => 'text',
72			'filter' => 'word',
73			'separator' => ',',
74			'default' => ['openstreetmap'],
75			'tags' => ['advanced'],
76		],
77		'geo_google_streetview' => [
78			'name' => tr('Google Street View'),
79			'description' => tr('Open Google Street View in a new window to see the visible coordinates.'),
80			'dependencies' => ['gmap_key', 'geo_enabled'],
81			'type' => 'flag',
82			'default' => 'n',
83			'tags' => ['basic', 'experimental'],
84		],
85		'geo_google_streetview_overlay' => [
86			'name' => tr('Google Street View overlay'),
87			'description' => tr('Open Google Street View in a new window to see the visible coordinates.'),
88			'dependencies' => ['geo_google_streetview'],
89			'warning' => tr('This is not guaranteed to work.'),
90			'type' => 'flag',
91			'default' => 'n',
92			'tags' => ['basic', 'experimental'],
93		],
94		'geo_always_load_openlayers' => [
95			'name' => tr('Always load OpenLayers'),
96			'description' => tr('Load the OpenLayers library even if no map is explicitly included in the page'),
97			'dependencies' => ['geo_enabled'],
98			'type' => 'flag',
99			'default' => 'n',
100		],
101		'geo_zoomlevel_to_found_location' => [
102			'name' => tr('Zoom level for the found location'),
103			'description' => tr('Zoom level when a searched-for location is found'),
104			'dependencies' => ['geo_enabled'],
105			'type' => 'list',
106			'options' => [
107					'street' => tra('Street'),
108					'town' => tra('Town'),
109					'region' => tra('Region'),
110					'country' => tra('Country'),
111					'continent' => tra('Continent'),
112					'world' => tra('World'),
113				],
114			'default' => 'street',
115		],
116		'geo_openlayers_version' => [
117			'name' => tr('OpenLayers version'),
118			'type' => 'list',
119			'dependencies' => ['geo_enabled'],
120			'options' => [
121					'ol2' => tra('OpenLayers 2.x (for use up to at least 15.x)'),
122					'ol3' => tra('OpenLayers 3+ (experimental)'),
123				],
124			'default' => 'ol2',
125		],
126		'geo_bingmaps_key' => [
127			'name' => tra('Bing Maps API Key'),
128			'description' => tra('Needed for Bing Map Layers'),
129			'type' => 'text',
130			'help' => 'http://www.bingmapsportal.com/',
131			'filter' => 'striptags',
132			'default' => '',
133		],
134		'geo_nextzen_key' => [
135			'name' => tra('Nextzen Maps API Key'),
136			'description' => tra('Needed for Nextzen Map Layers'),
137			'type' => 'text',
138			'help' => 'https://developers.nextzen.org/',
139			'filter' => 'striptags',
140			'default' => '',
141		],
142
143	];
144}
145