-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstaticMapLiteDefaults.php
executable file
·191 lines (174 loc) · 6.41 KB
/
staticMapLiteDefaults.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
<?php
/**
* GFStaticMapLite
*
* Copyright 2017 Geofabrik GmbH
*
* This software is based on staticmapLite 0.02
*
* Copyright 2009 Gerhard Koch
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Default configuration
*
* Explanation of the properties can be found in config.sample.php file.
*/
Class staticMapLiteDefaults {
/**
* Available markers.
*
* Properties:
*
* * `filename`: filename relative to the `$markerBaseDir` pointing to a
* greyscale image of the marker
* * `maskname`: filename relative to the `$markerBaseDir` pointing to a
* image whose black pixels will be filled with the marker color. The
* marker image (`filename` property) will be placed on top of it.
* * `width`: width of the marker
* * `height`: height of the marker
* * `hotx`: x coordinate of the "tip" of the marker
* * `hoty`: y coordinate of the tip of the marker
* * `textx`: x coordinate of the text label
* * `texty`: y coordinate of the text label
* * `textsize`: size of the text
* * `font`: font file to be used. This must be TTF font located in the
* fonts/ directory.
*/
protected $markerLookup = array (
'default/marker' => array(
'filename' => 'default/marker.png',
'maskname' => 'default/marker_colorize.png',
'width' => 24,
'height' => 40,
'hotx' => 12,
'hoty' => 40,
'textx' => 12,
'texty' => 18,
'textsize' => 12,
'font' => 'LiberationSans-Bold.ttf',
),
'print150/marker' => array(
'filename' => 'print150/marker.png',
'maskname' => 'print150/marker_colorize.png',
'width' => 48,
'height' => 40,
'hotx' => 24,
'hoty' => 80,
'textx' => 24,
'texty' => 36,
'textsize' => 24,
'font' => 'LiberationSans-Bold.ttf',
),
'print/marker' => array(
'filename' => 'print/marker.png',
'maskname' => 'print/marker_colorize.png',
'width' => 96,
'height' => 80,
'hotx' => 48,
'hoty' => 160,
'textx' => 48,
'texty' => 72,
'textsize' => 48,
'font' => 'LiberationSans-Bold.ttf',
),
'default/ol-marker' => array (
'filename' => 'default/ol-marker.png',
'maskname' => 'default/ol-marker_colorize.png',
'width' => 21,
'height' => 25,
'hotx' => 10.5,
'hoty' => 25,
'textx' => 21,
'texty' => 0,
'textsize' => 12,
'font' => 'LiberationSans-Bold.ttf',
),
'print150/ol-marker' => array (
'filename' => 'print150/ol-marker.png',
'maskname' => 'print150/ol-marker_colorize.png',
'width' => 84,
'height' => 100,
'hotx' => 42,
'hoty' => 100,
'textx' => 100,
'texty' => 0,
'textsize' => 48,
'font' => 'LiberationSans-Bold.ttf',
),
'print/ol-marker' => array (
'filename' => 'print/ol-marker.png',
'maskname' => 'print/ol-marker_colorize.png',
'width' => 84,
'height' => 100,
'hotx' => 42,
'hoty' => 100,
'textx' => 100,
'texty' => 0,
'textsize' => 48,
'font' => 'LiberationSans-Bold.ttf',
),
'default/pin' => array (
'filename' => 'default/pin.png',
'maskname' => 'default/pin_colorize.png',
'width' => 20,
'height' => 40,
'hotx' => 10,
'hoty' => 40,
'textx' => 11,
'texty' => 16,
'textsize' => 12,
'font' => 'LiberationSans-Bold.ttf',
),
'print150/pin' => array (
'filename' => 'print150/pin.png',
'maskname' => 'print150/pin_colorize.png',
'width' => 40,
'height' => 80,
'hotx' => 20,
'hoty' => 80,
'textx' => 21,
'texty' => 32,
'textsize' => 24,
'font' => 'LiberationSans-Bold.ttf',
),
'print/pin' => array (
'filename' => 'print/pin.png',
'maskname' => 'print/pin_colorize.png',
'width' => 80,
'height' => 160,
'hotx' => 40,
'hoty' => 160,
'textx' => 42,
'texty' => 64,
'textsize' => 48,
'font' => 'LiberationSans-Bold.ttf',
),
);
protected $markerBaseDir = 'images';
protected $fontBaseDir = 'fonts/';
protected $useTileCache = true;
protected $tileCacheBaseDir = 'cache/tiles';
protected $useMapCache = true;
protected $doNotReadMapCache = false;
protected $ignoreNoCacheProperty = false;
protected $mapCacheBaseDir = 'cache/maps';
protected $attribution = true;
protected $attributionFont = 'NotoSansUI-Regular';
protected $maxTileCount = 9;
protected $maxSize = 2048 * 2048;
protected $tileSources = array();
protected $tileFetchFailureMessage = 'Failed to build your map image because downloading the tiles from the tile server failed. Please check if the tile server serves the tiles as expected and contact the administrator of this service if this error persists.';
}
?>