Version Description
- Added: NEW TEMPLATES - this release includes all new template files - please update any custom templates to match the new versions.
- Added: mashup results can now be filtered by taxonomies, see the MapPress settings screen
- Added: setting 'Automatic updates' allows automatic updates for the Pro version
- Added: new layout with POIs on the left instead of under map, enable with: [mappresss layout="left"]
- Added: check for multiple Google Maps API loads
- Changed: template names now use hyphens instead of underscores and some names have changed: map_layout.php => map.php, map_poi_list.php => map-list.php
- Changed: CSS class names, for example for the POI list class '.mapp-poi-list' is now '.mapp-list'. Please update any custom CSS.
- Changed: use the 'hamburger' menu in the map editor to set a map's center & zoom (previously a checkbox was shown in the map editor)
- Changed: mashups now ignore any center/zoom settings and automatically center to show all POIs
- Changed: directions now have a Google Maps link. Transportation modes have been removed
- Changed: 'my location' shown only for SSL or localhost sites (Google has forbidden geolocation on non-secure sites)
- Changed: maps automatically recenter on screen resize (previously this was the 'adaptive' setting)
- Changed: scripts are now loaded in the header if JetPack Infinite Scroll is enabled
Download this release
Release Info
Developer | chrisvrichardson |
Plugin | MapPress Easy Google Maps |
Version | 2.46 |
Comparing to | |
See all releases |
Code changes from version 2.45.4 to 2.46
- css/mappress.css +176 -146
- css/mappress_admin.css +28 -23
- forms/map_editor.php +12 -18
- forms/map_editor_infobox.php +0 -42
- forms/map_media.php +1 -5
- images/mappress.png +0 -0
- images/mappress_logo_med.png +0 -0
- images/mappress_logo_small.png +0 -0
- images/mappress_pin_logo.png +0 -0
- js/mappress.min.js +1 -1
- js/mappress_editor.min.js +1 -1
- js/mappress_settings.min.js +1 -1
- languages/mappress-google-maps-for-wordpress.pot +188 -148
- languages/texts.php +21 -9
- mappress.php +31 -30
- mappress_controls.php +18 -4
- mappress_map.php +132 -107
- mappress_poi.php +51 -128
- mappress_settings.php +18 -18
- readme.txt +17 -3
- templates/{map_controls.php → map-controls.php} +7 -1
- templates/map-directions.php +23 -0
- templates/map-filters.php +12 -0
- templates/map-header.php +4 -0
- templates/map-list.php +11 -0
- templates/map-poi.php +12 -0
- templates/map.php +15 -0
- templates/map_directions.php +0 -36
- templates/map_layout.php +0 -18
- templates/map_poi.php +0 -12
- templates/map_poi_list.php +0 -20
css/mappress.css
CHANGED
@@ -11,69 +11,50 @@
|
|
11 |
-----------------------------------------------------------------------------------
|
12 |
*/
|
13 |
|
14 |
-
/*
|
15 |
-
-----------------------------------------------------------------------------------
|
16 |
-
Layout - map canvas, poi list and directions
|
17 |
-
-----------------------------------------------------------------------------------
|
18 |
-
*/
|
19 |
-
|
20 |
-
.mapp-align-left { float: left !important; }
|
21 |
-
.mapp-align-right { float: right !important; }
|
22 |
-
.mapp-align-center { margin-left: auto !important; margin-right: auto !important; }
|
23 |
-
.mapp-align-default {}
|
24 |
|
25 |
/*
|
26 |
-----------------------------------------------------------------------------------
|
27 |
Map layout - table containing map, directions, poi list
|
|
|
28 |
-----------------------------------------------------------------------------------
|
29 |
*/
|
30 |
|
31 |
.mapp-layout {
|
32 |
-
border: 1px solid
|
33 |
-
margin: 5px
|
34 |
-
|
|
|
|
|
35 |
}
|
36 |
|
37 |
-
.mapp-
|
38 |
-
|
|
|
39 |
}
|
40 |
|
41 |
-
|
42 |
-
|
43 |
-
position:relative;
|
44 |
-
display:none;
|
45 |
}
|
46 |
|
47 |
-
.mapp-
|
48 |
position: absolute;
|
49 |
-
|
50 |
-
left: 50%;
|
51 |
-
top: 30px;
|
52 |
-
margin-left: -100px;
|
53 |
-
padding: 10px;
|
54 |
-
background-color: white;
|
55 |
-
z-index: 99999999999;
|
56 |
-
text-align: center;
|
57 |
-
border: 1px solid gray;
|
58 |
-
box-shadow: 0px 0px 20px rgba(0,0,0,0.75);
|
59 |
-
border-radius: 5px;
|
60 |
}
|
61 |
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
-----------------------------------------------------------------------------------
|
66 |
-
*/
|
67 |
|
68 |
-
/*
|
69 |
.mapp-canvas {
|
|
|
|
|
70 |
overflow: hidden !important;
|
71 |
padding: 0px !important;
|
72 |
-
margin: 0px; /* Plugin overrides, for map alignment */
|
73 |
word-wrap: normal; /* 2013 sets break-word, which interferes w/Google copyright in IE only */
|
74 |
}
|
75 |
|
76 |
-
/* Map tiles */
|
77 |
.mapp-canvas img {
|
78 |
background-color: transparent !important;
|
79 |
max-width: 99999px !important; /* Some themes have max-width/max-height set, and some phones can't accept max-width: auto. */
|
@@ -85,6 +66,83 @@
|
|
85 |
border-radius: 0px !important; /* 2012 adds border-radius to all images */
|
86 |
}
|
87 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
/*
|
89 |
-----------------------------------------------------------------------------------
|
90 |
InfoWindow
|
@@ -148,7 +206,6 @@
|
|
148 |
.mapp-ib {
|
149 |
background-color: white;
|
150 |
border: 1px solid lightgray;
|
151 |
-
border-collapse: separate; /* Without this, box shadow won't work on IE9 */
|
152 |
box-shadow: 1px 1px 1px #888;
|
153 |
box-sizing: border-box;
|
154 |
display: none;
|
@@ -185,49 +242,13 @@
|
|
185 |
}
|
186 |
|
187 |
|
188 |
-
/*
|
189 |
-
-----------------------------------------------------------------------------------
|
190 |
-
POI List
|
191 |
-
-----------------------------------------------------------------------------------
|
192 |
-
*/
|
193 |
-
|
194 |
-
.mapp-poi-list {
|
195 |
-
overflow-y: auto ;
|
196 |
-
overflow-x: hidden ;
|
197 |
-
max-height: 300px; /* To show all entries put this in your styles.css: max-height: auto; */
|
198 |
-
}
|
199 |
-
|
200 |
-
.mapp-poi-list table {
|
201 |
-
margin: 0 !important; /* 2012 */
|
202 |
-
width: 100% ;
|
203 |
-
line-height: normal !important; /* 2012 */
|
204 |
-
border-collapse: collapse ;
|
205 |
-
table-layout: auto; /* 2015 */
|
206 |
-
}
|
207 |
-
|
208 |
-
.mapp-poi-list th {
|
209 |
-
font-weight: bold;
|
210 |
-
}
|
211 |
-
|
212 |
-
.mapp-poi-list td {
|
213 |
-
padding: 5px ;
|
214 |
-
margin: 0px ;
|
215 |
-
border: none ;
|
216 |
-
border-bottom: 1px solid lightgray ;
|
217 |
-
vertical-align: middle ;
|
218 |
-
}
|
219 |
-
|
220 |
-
.mapp-poi-list tr {
|
221 |
-
cursor: pointer;
|
222 |
-
}
|
223 |
-
|
224 |
-
.mapp-poi-list tr:hover, .mapp-poi-list tr.mapp-selected {
|
225 |
-
background-color: #fafafa;
|
226 |
-
}
|
227 |
-
|
228 |
/*
|
229 |
-----------------------------------------------------------------------------------
|
230 |
POI List (new)
|
|
|
|
|
|
|
|
|
231 |
-----------------------------------------------------------------------------------
|
232 |
*/
|
233 |
|
@@ -238,29 +259,42 @@
|
|
238 |
z-index: 1;
|
239 |
}
|
240 |
|
241 |
-
.mapp-list
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
242 |
border-bottom: 1px solid lightgray;
|
243 |
overflow: hidden;
|
244 |
padding: 5px;
|
245 |
}
|
246 |
|
247 |
-
.mapp-
|
248 |
background-color: #fafafa;
|
249 |
}
|
250 |
|
251 |
-
|
|
|
252 |
overflow: hidden;
|
253 |
vertical-align: middle;
|
254 |
}
|
255 |
|
256 |
-
.mapp-
|
257 |
float: left;
|
258 |
margin-right: 5px;
|
259 |
max-width: 24px !important; /* 2012 tries to override */
|
260 |
max-height: 24px;
|
261 |
}
|
262 |
|
263 |
-
|
264 |
/*
|
265 |
-----------------------------------------------------------------------------------
|
266 |
Directions
|
@@ -268,28 +302,18 @@
|
|
268 |
*/
|
269 |
|
270 |
.mapp-directions {
|
|
|
271 |
display: none;
|
272 |
-
|
273 |
position: relative;
|
274 |
-
margin: 10px 0 0 0 ;
|
275 |
}
|
276 |
|
277 |
-
|
278 |
-
|
279 |
-
border: 1px solid lightgray !important; /* 2015 */
|
280 |
-
display: inline-block ;
|
281 |
-
text-align: center ;
|
282 |
-
vertical-align: middle ;
|
283 |
-
width: 50px ;
|
284 |
-
height: 27px ;
|
285 |
-
line-height: 27px ;
|
286 |
-
background-color: rgb(245, 245, 245) ;
|
287 |
-
padding: 0px ;
|
288 |
-
margin: 0px ;
|
289 |
}
|
290 |
|
291 |
-
.mapp-
|
292 |
-
|
293 |
}
|
294 |
|
295 |
.mapp-dir-swap {
|
@@ -311,66 +335,45 @@
|
|
311 |
margin: 10px 0 0px 0 ;
|
312 |
}
|
313 |
|
314 |
-
.mapp-
|
315 |
width: 80% ;
|
316 |
line-height: normal ;
|
317 |
}
|
318 |
|
319 |
-
.mapp-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
/* Put a border around route options */
|
324 |
-
.adp-list {
|
325 |
-
border: 1px solid lightgray ;
|
326 |
-
cursor: pointer ;
|
327 |
-
}
|
328 |
-
|
329 |
-
/* Override theme styles that interfere with rendered directions table */
|
330 |
-
.mapp-dir-renderer table {
|
331 |
-
table-layout: auto; /* 2015 */
|
332 |
-
}
|
333 |
-
|
334 |
-
.mapp-dir-renderer td {
|
335 |
-
border: none;
|
336 |
-
border-top: 1px solid #cdcdcd;
|
337 |
margin: 0;
|
338 |
padding: 0;
|
|
|
339 |
}
|
340 |
|
341 |
-
.mapp-dir-
|
342 |
-
max-width: none;
|
343 |
-
}
|
344 |
-
|
345 |
-
.mapp-dir-renderer .adp-marker {
|
346 |
-
margin: 5px;
|
347 |
-
}
|
348 |
-
|
349 |
-
.mapp-dir-icon { cursor: pointer; display: inline-block; vertical-align: middle; margin: 0; padding: 0; background: transparent url('../images/directions.png') no-repeat center center; }
|
350 |
-
.mapp-dir-car { width: 15px; height: 12px; background-position: 0px -96px; }
|
351 |
-
.mapp-dir-bus { width: 10px; height: 15px; background-position: 0px -426px; }
|
352 |
-
.mapp-dir-walk { width: 10px; height: 16px; background-position: 0px -489px; }
|
353 |
-
.mapp-dir-bike { width: 17px; height: 14px; background-position: 0px -340px; }
|
354 |
-
.mapp-dir-transit { width: 17px; height: 14px; background-position: 0px -425px; }
|
355 |
-
.mapp-dir-arrows { width: 10px; height: 12px; background-position: -10px -489px; }
|
356 |
-
.mapp-dir-del { width: 7px; height: 7px; background-position: 0px -189px; }
|
357 |
-
|
358 |
-
.mapp-dir-letter { cursor: move; display: inline-block; vertical-align: middle; margin: 0; padding: 0; background: transparent url('../images/directions.png') no-repeat; }
|
359 |
.mapp-dir-a { width: 24px; height: 24px; background-position: 0px -140px; }
|
360 |
.mapp-dir-b { width: 24px; height: 24px; background-position: 0px -71px; }
|
361 |
-
|
362 |
|
363 |
/*
|
364 |
-----------------------------------------------------------------------------------
|
365 |
-
|
366 |
-----------------------------------------------------------------------------------
|
367 |
*/
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
374 |
}
|
375 |
|
376 |
|
@@ -449,6 +452,11 @@
|
|
449 |
-----------------------------------------------------------------------------------
|
450 |
*/
|
451 |
|
|
|
|
|
|
|
|
|
|
|
452 |
.mapp-close {
|
453 |
color: gray;
|
454 |
cursor: pointer;
|
@@ -508,3 +516,25 @@ img.mapp-icon {
|
|
508 |
width: 100%;
|
509 |
}
|
510 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
-----------------------------------------------------------------------------------
|
12 |
*/
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
/*
|
16 |
-----------------------------------------------------------------------------------
|
17 |
Map layout - table containing map, directions, poi list
|
18 |
+
Font size and family can be removed to make map match your theme
|
19 |
-----------------------------------------------------------------------------------
|
20 |
*/
|
21 |
|
22 |
.mapp-layout {
|
23 |
+
border: 1px solid lightgray;
|
24 |
+
margin: 5px;
|
25 |
+
min-width: 200px;
|
26 |
+
padding: 0px;
|
27 |
+
position: relative;
|
28 |
}
|
29 |
|
30 |
+
.mapp-layout * {
|
31 |
+
box-sizing: border-box;
|
32 |
+
font-size: 13px;
|
33 |
}
|
34 |
|
35 |
+
.mapp-layout .mapp-wrapper {
|
36 |
+
min-height: 200px;
|
37 |
+
position: relative;
|
|
|
38 |
}
|
39 |
|
40 |
+
.mapp-layout .mapp-main {
|
41 |
position: absolute;
|
42 |
+
top: 0; left: 0; bottom: 0; right: 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
}
|
44 |
|
45 |
+
.mapp-hidden {
|
46 |
+
display: none;
|
47 |
+
}
|
|
|
|
|
48 |
|
49 |
+
/* Canvas */
|
50 |
.mapp-canvas {
|
51 |
+
height: 100%;
|
52 |
+
margin: 0px; /* Plugin overrides, for map alignment */
|
53 |
overflow: hidden !important;
|
54 |
padding: 0px !important;
|
|
|
55 |
word-wrap: normal; /* 2013 sets break-word, which interferes w/Google copyright in IE only */
|
56 |
}
|
57 |
|
|
|
58 |
.mapp-canvas img {
|
59 |
background-color: transparent !important;
|
60 |
max-width: 99999px !important; /* Some themes have max-width/max-height set, and some phones can't accept max-width: auto. */
|
66 |
border-radius: 0px !important; /* 2012 adds border-radius to all images */
|
67 |
}
|
68 |
|
69 |
+
/* Loading dialog box */
|
70 |
+
.mapp-dialog {
|
71 |
+
background-color: white;
|
72 |
+
border: 1px solid gray;
|
73 |
+
border-radius: 5px;
|
74 |
+
display:none;
|
75 |
+
left: 50%;
|
76 |
+
padding: 10px 10px 10px 0px;
|
77 |
+
position: absolute;
|
78 |
+
top: 29px;
|
79 |
+
transform: translateX(-50%);
|
80 |
+
z-index: 1;
|
81 |
+
}
|
82 |
+
|
83 |
+
/*
|
84 |
+
-----------------------------------------------------------------------------------
|
85 |
+
Header
|
86 |
+
-----------------------------------------------------------------------------------
|
87 |
+
*/
|
88 |
+
.mapp-header {
|
89 |
+
border-bottom: 1px solid lightgray;
|
90 |
+
height: 29px;
|
91 |
+
overflow: hidden;
|
92 |
+
padding: 5px 10px 5px 10px;
|
93 |
+
}
|
94 |
+
|
95 |
+
/*
|
96 |
+
-----------------------------------------------------------------------------------
|
97 |
+
Filters
|
98 |
+
-----------------------------------------------------------------------------------
|
99 |
+
*/
|
100 |
+
.mapp-filters {
|
101 |
+
background-color: white;
|
102 |
+
border-bottom: 1px solid lightgray;
|
103 |
+
display: none;
|
104 |
+
max-height: 100%;
|
105 |
+
overflow: auto;
|
106 |
+
padding: 5px 10px 5px 10px;
|
107 |
+
position: absolute;
|
108 |
+
top: 0; left: 0; right: 0;
|
109 |
+
z-index: 1;
|
110 |
+
}
|
111 |
+
|
112 |
+
.mapp-filter {
|
113 |
+
margin-bottom: 5px;
|
114 |
+
}
|
115 |
+
|
116 |
+
.mapp-filter-label {
|
117 |
+
font-weight: bold;
|
118 |
+
}
|
119 |
+
|
120 |
+
/* Select filters are displayed inline next to their label */
|
121 |
+
.mapp-filter.mapp-select .mapp-filter-label {
|
122 |
+
display: inline-block;
|
123 |
+
margin-right: 20px;
|
124 |
+
}
|
125 |
+
|
126 |
+
.mapp-filter.mapp-select .mapp-filter-values {
|
127 |
+
display: inline-block;
|
128 |
+
}
|
129 |
+
|
130 |
+
/* Checkboxe filters are displayed horizontally, use display: block to show one checkbox per line */
|
131 |
+
.mapp-filter-values > label {
|
132 |
+
display: inline-block;
|
133 |
+
font-weight: normal; /* 2017 */
|
134 |
+
margin-right: 10px;
|
135 |
+
white-space: nowrap;
|
136 |
+
}
|
137 |
+
|
138 |
+
.mapp-filter-values input[type="checkbox"] {
|
139 |
+
margin-right: 5px;
|
140 |
+
}
|
141 |
+
|
142 |
+
.mapp-filters-reset {
|
143 |
+
float: right;
|
144 |
+
}
|
145 |
+
|
146 |
/*
|
147 |
-----------------------------------------------------------------------------------
|
148 |
InfoWindow
|
206 |
.mapp-ib {
|
207 |
background-color: white;
|
208 |
border: 1px solid lightgray;
|
|
|
209 |
box-shadow: 1px 1px 1px #888;
|
210 |
box-sizing: border-box;
|
211 |
display: none;
|
242 |
}
|
243 |
|
244 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
245 |
/*
|
246 |
-----------------------------------------------------------------------------------
|
247 |
POI List (new)
|
248 |
+
Structure:
|
249 |
+
.mapp-list
|
250 |
+
.mapp-pois
|
251 |
+
.mapp-poi (one for each POI)
|
252 |
-----------------------------------------------------------------------------------
|
253 |
*/
|
254 |
|
259 |
z-index: 1;
|
260 |
}
|
261 |
|
262 |
+
.mapp-inline .mapp-list {
|
263 |
+
border-top: 1px solid lightgray;
|
264 |
+
max-height: 300px;
|
265 |
+
}
|
266 |
+
|
267 |
+
.mapp-left .mapp-list {
|
268 |
+
border-right: 1px solid lightgray;
|
269 |
+
float: left;
|
270 |
+
height: 100%;
|
271 |
+
max-width: 250px;
|
272 |
+
width: 35%;
|
273 |
+
}
|
274 |
+
|
275 |
+
.mapp-pois .mapp-poi {
|
276 |
border-bottom: 1px solid lightgray;
|
277 |
overflow: hidden;
|
278 |
padding: 5px;
|
279 |
}
|
280 |
|
281 |
+
.mapp-poi:hover, .mapp-poi.mapp-selected {
|
282 |
background-color: #fafafa;
|
283 |
}
|
284 |
|
285 |
+
|
286 |
+
.mapp-poi .mapp-title {
|
287 |
overflow: hidden;
|
288 |
vertical-align: middle;
|
289 |
}
|
290 |
|
291 |
+
.mapp-poi .mapp-icon {
|
292 |
float: left;
|
293 |
margin-right: 5px;
|
294 |
max-width: 24px !important; /* 2012 tries to override */
|
295 |
max-height: 24px;
|
296 |
}
|
297 |
|
|
|
298 |
/*
|
299 |
-----------------------------------------------------------------------------------
|
300 |
Directions
|
302 |
*/
|
303 |
|
304 |
.mapp-directions {
|
305 |
+
background-color: white;
|
306 |
display: none;
|
307 |
+
padding: 10px;
|
308 |
position: relative;
|
|
|
309 |
}
|
310 |
|
311 |
+
.mapp-dir-toolbar {
|
312 |
+
margin-top: 10px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
313 |
}
|
314 |
|
315 |
+
.mapp-dir-google {
|
316 |
+
float: right;
|
317 |
}
|
318 |
|
319 |
.mapp-dir-swap {
|
335 |
margin: 10px 0 0px 0 ;
|
336 |
}
|
337 |
|
338 |
+
.mapp-dir-saddr, .mapp-dir-daddr {
|
339 |
width: 80% ;
|
340 |
line-height: normal ;
|
341 |
}
|
342 |
|
343 |
+
.mapp-dir-a, .mapp-dir-b, .mapp-dir-arrows {
|
344 |
+
background: transparent url('../images/directions.png') no-repeat center center;
|
345 |
+
cursor: pointer;
|
346 |
+
display: inline-block;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
347 |
margin: 0;
|
348 |
padding: 0;
|
349 |
+
vertical-align: middle;
|
350 |
}
|
351 |
|
352 |
+
.mapp-dir-arrows { width: 10px; height: 12px; background-position: -10px -489px; position: relative; top: 10px; left: 5px; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
353 |
.mapp-dir-a { width: 24px; height: 24px; background-position: 0px -140px; }
|
354 |
.mapp-dir-b { width: 24px; height: 24px; background-position: 0px -71px; }
|
355 |
+
|
356 |
|
357 |
/*
|
358 |
-----------------------------------------------------------------------------------
|
359 |
+
Views
|
360 |
-----------------------------------------------------------------------------------
|
361 |
*/
|
362 |
+
|
363 |
+
.mapp-view-filters .mapp-filters {
|
364 |
+
display: block;
|
365 |
+
}
|
366 |
+
|
367 |
+
.mapp-view-menu .mapp-menu {
|
368 |
+
display: block;
|
369 |
+
}
|
370 |
+
|
371 |
+
.mapp-view-directions .mapp-directions {
|
372 |
+
display: block;
|
373 |
+
}
|
374 |
+
|
375 |
+
.mapp-view-directions .mapp-list {
|
376 |
+
display: none;
|
377 |
}
|
378 |
|
379 |
|
452 |
-----------------------------------------------------------------------------------
|
453 |
*/
|
454 |
|
455 |
+
.mapp-align-left { float: left !important; }
|
456 |
+
.mapp-align-right { float: right !important; }
|
457 |
+
.mapp-align-center { margin-left: auto !important; margin-right: auto !important; }
|
458 |
+
.mapp-align-default {}
|
459 |
+
|
460 |
.mapp-close {
|
461 |
color: gray;
|
462 |
cursor: pointer;
|
516 |
width: 100%;
|
517 |
}
|
518 |
|
519 |
+
/* Caret */
|
520 |
+
.mapp-caret:after {
|
521 |
+
content: "";
|
522 |
+
display: inline-block;
|
523 |
+
border-left: 5px solid transparent;
|
524 |
+
border-right: 5px solid transparent;
|
525 |
+
border-top: 5px solid black;
|
526 |
+
border-bottom: none;
|
527 |
+
margin-left: 5px;
|
528 |
+
vertical-align: middle;
|
529 |
+
}
|
530 |
+
|
531 |
+
/* Pseudo-buttons, to avoid theme styles */
|
532 |
+
.mapp-button, .mapp-button-submit {
|
533 |
+
color: #666;
|
534 |
+
margin-right: 5px;
|
535 |
+
text-transform: uppercase;
|
536 |
+
}
|
537 |
+
|
538 |
+
.mapp-button-submit {
|
539 |
+
color: #4285F4;
|
540 |
+
}
|
css/mappress_admin.css
CHANGED
@@ -54,6 +54,16 @@ tr:hover > td > .mapp-m-actions {
|
|
54 |
-----------------------------------------------------------------------------------
|
55 |
*/
|
56 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
.mapp-searchbox {
|
58 |
display: block;
|
59 |
margin-top: 10px;
|
@@ -87,48 +97,39 @@ tr:hover > td > .mapp-m-actions {
|
|
87 |
background-size: 18px 18px !important;
|
88 |
}
|
89 |
|
90 |
-
.mapp-edit .mapp-layout {
|
91 |
-
border: 1px solid lightgray;
|
92 |
-
height: 325px;
|
93 |
-
margin: 5px 0 0 0;
|
94 |
-
width: 100%;
|
95 |
-
}
|
96 |
-
|
97 |
-
.mapp-edit .mapp-canvas {
|
98 |
-
height: 100%;
|
99 |
-
}
|
100 |
-
|
101 |
-
|
102 |
/*
|
103 |
-----------------------------------------------------------------------------------
|
104 |
POI editor
|
105 |
-----------------------------------------------------------------------------------
|
106 |
*/
|
107 |
|
108 |
-
.mapp-poi-edit {
|
109 |
-
width: 325px;
|
110 |
-
}
|
111 |
|
112 |
.mapp-poi-edit a {
|
113 |
vertical-align: middle;
|
114 |
}
|
115 |
|
116 |
-
.mapp-poi-toolbar {
|
117 |
margin-top: 5px;
|
118 |
}
|
119 |
|
120 |
-
|
121 |
-
|
|
|
|
|
|
|
|
|
|
|
122 |
font-weight: bold;
|
123 |
vertical-align: middle;
|
124 |
}
|
125 |
|
126 |
-
.mapp-poi-body {
|
127 |
width: 100%;
|
128 |
height: 143px;
|
129 |
}
|
130 |
|
131 |
-
.mapp-poi-visual, .mapp-poi-html {
|
132 |
cursor: pointer;
|
133 |
}
|
134 |
|
@@ -137,11 +138,12 @@ tr:hover > td > .mapp-m-actions {
|
|
137 |
border: 1px solid lightgray !important;
|
138 |
}
|
139 |
|
140 |
-
.mapp-poi-url {
|
141 |
width: 100%;
|
142 |
}
|
143 |
|
144 |
|
|
|
145 |
/*
|
146 |
-----------------------------------------------------------------------------------
|
147 |
Settings
|
@@ -180,6 +182,11 @@ tr:hover > td > .mapp-m-actions {
|
|
180 |
padding: 5px;
|
181 |
}
|
182 |
|
|
|
|
|
|
|
|
|
|
|
183 |
.mapp-yes {
|
184 |
vertical-align: middle;
|
185 |
color:green;
|
@@ -245,8 +252,6 @@ body.mapp-popup-open {
|
|
245 |
}
|
246 |
}
|
247 |
|
248 |
-
|
249 |
-
|
250 |
/*
|
251 |
-----------------------------------------------------------------------------------
|
252 |
Icon Picker
|
54 |
-----------------------------------------------------------------------------------
|
55 |
*/
|
56 |
|
57 |
+
.mapp-edit .mapp-layout {
|
58 |
+
border: 1px solid lightgray;
|
59 |
+
margin: 5px 0 0 0;
|
60 |
+
width: 100% !important;
|
61 |
+
}
|
62 |
+
|
63 |
+
.mapp-edit .mapp-wrapper {
|
64 |
+
height: 325px !important;
|
65 |
+
}
|
66 |
+
|
67 |
.mapp-searchbox {
|
68 |
display: block;
|
69 |
margin-top: 10px;
|
97 |
background-size: 18px 18px !important;
|
98 |
}
|
99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
/*
|
101 |
-----------------------------------------------------------------------------------
|
102 |
POI editor
|
103 |
-----------------------------------------------------------------------------------
|
104 |
*/
|
105 |
|
106 |
+
.mapp-poi-edit {}
|
|
|
|
|
107 |
|
108 |
.mapp-poi-edit a {
|
109 |
vertical-align: middle;
|
110 |
}
|
111 |
|
112 |
+
.mapp-poi-edit .mapp-poi-toolbar {
|
113 |
margin-top: 5px;
|
114 |
}
|
115 |
|
116 |
+
/* Table used to align title/icon */
|
117 |
+
.mapp-poi-edit .mapp-table {
|
118 |
+
width: 100%;
|
119 |
+
}
|
120 |
+
|
121 |
+
.mapp-poi-edit .mapp-poi-title {
|
122 |
+
width: 100%;
|
123 |
font-weight: bold;
|
124 |
vertical-align: middle;
|
125 |
}
|
126 |
|
127 |
+
.mapp-poi-edit .mapp-poi-body {
|
128 |
width: 100%;
|
129 |
height: 143px;
|
130 |
}
|
131 |
|
132 |
+
.mapp-poi-edit .mapp-poi-visual, .mapp-poi-edit .mapp-poi-html {
|
133 |
cursor: pointer;
|
134 |
}
|
135 |
|
138 |
border: 1px solid lightgray !important;
|
139 |
}
|
140 |
|
141 |
+
.mapp-poi-edit .mapp-poi-url {
|
142 |
width: 100%;
|
143 |
}
|
144 |
|
145 |
|
146 |
+
|
147 |
/*
|
148 |
-----------------------------------------------------------------------------------
|
149 |
Settings
|
182 |
padding: 5px;
|
183 |
}
|
184 |
|
185 |
+
/* Sort handles */
|
186 |
+
.mapp-handle {
|
187 |
+
cursor: move;
|
188 |
+
}
|
189 |
+
|
190 |
.mapp-yes {
|
191 |
vertical-align: middle;
|
192 |
color:green;
|
252 |
}
|
253 |
}
|
254 |
|
|
|
|
|
255 |
/*
|
256 |
-----------------------------------------------------------------------------------
|
257 |
Icon Picker
|
forms/map_editor.php
CHANGED
@@ -16,28 +16,21 @@
|
|
16 |
</div>
|
17 |
<div id='mapp_e_saddr_err' style='display:none'></div>
|
18 |
|
19 |
-
|
20 |
-
<div id='mapp0_controls'><?php echo Mappress::get_template('map_controls'); ?></div>
|
21 |
-
<div id='mapp0_poi_list' class='mapp-list'></div>
|
22 |
-
<div id='mapp0' class='mapp-canvas'></div>
|
23 |
-
</div>
|
24 |
-
|
25 |
-
<div>
|
26 |
-
<a href='#' id='mapp_e_recenter'><?php _e('Center map', 'mappress-google-maps-for-wordpress'); ?></a> |
|
27 |
-
<?php _e('Click map for lat/lng: ', 'mappress-google-maps-for-wordpress'); ?><span id='mapp_e_latlng'>0,0</span>
|
28 |
-
</div>
|
29 |
</div>
|
30 |
|
31 |
|
32 |
<script type='text/template' id='mapp-tmpl-poi-edit'>
|
33 |
<div class='mapp-poi-edit'>
|
34 |
-
<div>
|
35 |
-
<
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
|
|
|
|
41 |
</div>
|
42 |
|
43 |
<# if (poi.type == 'kml') { #>
|
@@ -61,8 +54,9 @@
|
|
61 |
</script>
|
62 |
|
63 |
<script type='text/template' id='mapp-tmpl-poi-list'>
|
|
|
64 |
<# _.forEach(pois, function(poi, i) { #>
|
65 |
-
<div data-mapp-action='open' data-mapp-
|
66 |
<img class='mapp-icon' src='<# print(mapp.Icons.getUrl(poi.iconid)); #>'>
|
67 |
<div class='mapp-title'>{{poi.title}}</div>
|
68 |
</div>
|
16 |
</div>
|
17 |
<div id='mapp_e_saddr_err' style='display:none'></div>
|
18 |
|
19 |
+
<?php echo $map->display(); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
</div>
|
21 |
|
22 |
|
23 |
<script type='text/template' id='mapp-tmpl-poi-edit'>
|
24 |
<div class='mapp-poi-edit'>
|
25 |
+
<div class='mapp-table'>
|
26 |
+
<div>
|
27 |
+
<div><input class='mapp-poi-title' type='text' value='{{ poi.title }}'></div>
|
28 |
+
<# if (!poi.type) { #>
|
29 |
+
<div><img data-mapp-iconpicker data-mapp-iconid='{{{poi.iconid}}}' class='mapp-icon'></div>
|
30 |
+
<# } else if (poi.isPoly()) { #>
|
31 |
+
<div><span data-mapp-colorpicker class='mapp-colorpicker-toggle' data-mapp-color='{{{colors.color}}}' data-mapp-opacity='{{{colors.opacity}}}' data-mapp-weight='{{{colors.weight}}}' tabindex='0'></span></div>
|
32 |
+
<# } #>
|
33 |
+
</div>
|
34 |
</div>
|
35 |
|
36 |
<# if (poi.type == 'kml') { #>
|
54 |
</script>
|
55 |
|
56 |
<script type='text/template' id='mapp-tmpl-poi-list'>
|
57 |
+
<div class='mapp-pois'>
|
58 |
<# _.forEach(pois, function(poi, i) { #>
|
59 |
+
<div class='mapp-poi' data-mapp-action='open' data-mapp-poi='{{{i}}}'>
|
60 |
<img class='mapp-icon' src='<# print(mapp.Icons.getUrl(poi.iconid)); #>'>
|
61 |
<div class='mapp-title'>{{poi.title}}</div>
|
62 |
</div>
|
forms/map_editor_infobox.php
DELETED
@@ -1,42 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
// Polygon values
|
3 |
-
$weights = array();
|
4 |
-
for ($i = 1; $i <= 20; $i++)
|
5 |
-
$weights[$i] = $i . "px";
|
6 |
-
|
7 |
-
$opacities = array();
|
8 |
-
for ($i = 100; $i >= 0; $i-= 10)
|
9 |
-
$opacities[$i] = $i . "%";
|
10 |
-
?>
|
11 |
-
|
12 |
-
<div id='mapp_e_infobox' class='mapp-e-infobox'>
|
13 |
-
<div id='mapp_e_poi_fields'>
|
14 |
-
<div>
|
15 |
-
<input id='mapp_e_poi_title' type='text' />
|
16 |
-
<input id='mapp_e_poi_iconid' type='hidden' />
|
17 |
-
</div>
|
18 |
-
|
19 |
-
<div id='mapp_e_poi_poly_fields' style='display: none;'>
|
20 |
-
<?php _e('Color', 'mappress-google-maps-for-wordpress'); ?>:
|
21 |
-
<span id='mapp_e_poi_color' class='mapp-colorpicker-toggle' tabindex="0"></span>
|
22 |
-
<?php _e('Opacity', 'mappress-google-maps-for-wordpress'); ?>:
|
23 |
-
<?php echo Mappress_Controls::select('', $opacities, '', array('id' => 'mapp_e_poi_opacity', 'title' => __('Opacity', 'mappress-google-maps-for-wordpress')) ); ?>
|
24 |
-
<?php _e('Line', 'mappress-google-maps-for-wordpress'); ?>:
|
25 |
-
<?php echo Mappress_Controls::select('', $weights, '', array('id' => 'mapp_e_poi_weight', 'title' => __('Weight', 'mappress-google-maps-for-wordpress')) ); ?>
|
26 |
-
</div>
|
27 |
-
|
28 |
-
<div id='mapp_e_poi_kml_fields' style='display: none'>
|
29 |
-
<input id='mapp_e_poi_kml_url' type='text' readonly='readonly'/>
|
30 |
-
</div>
|
31 |
-
|
32 |
-
<div>
|
33 |
-
<a id="mapp_e_visual"><?php _e('Visual', 'mappress-google-maps-for-wordpress'); ?></a> | <a id="mapp_e_html"><?php _e('HTML', 'mappress-google-maps-for-wordpress');?></a>
|
34 |
-
<textarea id='mapp_e_poi_body' class='mapp-e-poi-body' rows='10'></textarea>
|
35 |
-
</div>
|
36 |
-
|
37 |
-
<div>
|
38 |
-
<input id='mapp_e_save_poi' class='button button-primary' type='button' value='<?php esc_attr_e('Save', 'mappress-google-maps-for-wordpress'); ?>' />
|
39 |
-
<input id='mapp_e_cancel_poi' class='button' type='button' value='<?php esc_attr_e('Cancel', 'mappress-google-maps-for-wordpress'); ?>' />
|
40 |
-
</div>
|
41 |
-
</div>
|
42 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
forms/map_media.php
CHANGED
@@ -17,7 +17,7 @@
|
|
17 |
|
18 |
<tr>
|
19 |
<td><?php _e('Map Title', 'mappress-google-maps-for-wordpress');?>:</td>
|
20 |
-
<td><input id='mapp_m_title' type='text' size='40' /></td>
|
21 |
</tr>
|
22 |
|
23 |
<tr>
|
@@ -32,10 +32,6 @@
|
|
32 |
<input type='text' id='mapp_m_width' size='2' value='' /> x <input type='text' id='mapp_m_height' size='2' value='' />
|
33 |
</td>
|
34 |
</tr>
|
35 |
-
<tr>
|
36 |
-
<td><?php _e('Viewport', 'mappress-google-maps-for-wordpress');?>:</td>
|
37 |
-
<td><label><input class='mapp-viewport' type='checkbox'/> <?php _e('Save center and zoom', 'mappress-google-maps-for-wordpress');?></label></td>
|
38 |
-
</tr>
|
39 |
</table>
|
40 |
<div>
|
41 |
<input class='button button-primary' type='button' id='mapp_m_save' value='<?php esc_attr_e('Save', 'mappress-google-maps-for-wordpress'); ?>' />
|
17 |
|
18 |
<tr>
|
19 |
<td><?php _e('Map Title', 'mappress-google-maps-for-wordpress');?>:</td>
|
20 |
+
<td><input id='mapp_m_title' type='text' size='40' placeholder='<?php _e('Untitled', 'mappress-google-maps-for-wordpress');?>' /></td>
|
21 |
</tr>
|
22 |
|
23 |
<tr>
|
32 |
<input type='text' id='mapp_m_width' size='2' value='' /> x <input type='text' id='mapp_m_height' size='2' value='' />
|
33 |
</td>
|
34 |
</tr>
|
|
|
|
|
|
|
|
|
35 |
</table>
|
36 |
<div>
|
37 |
<input class='button button-primary' type='button' id='mapp_m_save' value='<?php esc_attr_e('Save', 'mappress-google-maps-for-wordpress'); ?>' />
|
images/mappress.png
ADDED
Binary file
|
images/mappress_logo_med.png
DELETED
Binary file
|
images/mappress_logo_small.png
DELETED
Binary file
|
images/mappress_pin_logo.png
DELETED
Binary file
|
js/mappress.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var mapp=window.mapp||{};+function(n){mapp.Map=function(t){function k(n,t){n=n.split(" ");for(var i=0;i<n.length;i++)google.maps.event.addListener(u,n[i],t)}function a(t,i){var r=n.inArray(t,["roadmap","satellite","terrain","hybrid"])!=-1;i=typeof i!="undefined"?i:!(u.getMapTypeId()==t);t=f.editable?i&&(r||mappl10n.options.styles[t]!="undefined")?t:"roadmap":r?t:"roadmap";u.setMapTypeId(t)}function h(t){var o,r;if(i.menu.toggle(t),i.menu.is(":visible")){n("[data-mapp-type]",i.menu).removeClass("mapp-active");n('[data-mapp-type="'+u.getMapTypeId()+'"]',i.menu).addClass("mapp-active");for(layer in e)o=!!e[layer].getMap(),n('[data-mapp-layer="'+layer+'"]',i.menu).toggleClass("mapp-active",o);r=!!(f.center&&f.zoom);n('[data-mapp-action="viewport-set"]',i.menu).toggle(!r);n('[data-mapp-action="viewport-reset"]',i.menu).toggle(r)}}function d(){var n=mappl10n.options.styles,i=mappl10n.options.style,r=["roadmap","satellite","terrain","hybrid"],t;if(i&&typeof n[i]!="undefined"&&u.setOptions({styles:n[i]}),f.editable){for(t in n)u.mapTypes.set(t,new google.maps.StyledMapType(n[t],{name:t})),r.push(t);u.setOptions({mapTypeControlOptions:{mapTypeIds:r,position:google.maps.ControlPosition.TOP_RIGHT,style:google.maps.MapTypeControlStyle.DROPDOWN_MENU}})}else typeof n[f.mapTypeId]!="undefined"&&u.setOptions({styles:n[f.mapTypeId]})}function g(){var t;i.controls.children("[data-mapp-position]").each(function(){var t=n(this).attr("data-mapp-position"),i;t=t?google.maps.ControlPosition[t]:google.maps.ControlPosition.TOP_RIGHT;i=n(this);i.get(0).index=0;u.controls[t].push(i.get(0))});i.menu.on("mouseleave",function(){t=setTimeout(function(){h(!1)},700)});i.menu.on("mouseenter",function(){clearTimeout(t)})}function nt(){var i,t,r;for(e={traffic:new google.maps.TrafficLayer,bicycling:new google.maps.BicyclingLayer,transit:new google.maps.TransitLayer},f.layers=n.makeArray(f.layers),i=0;i<f.layers.length;i++)t=n.trim(f.layers[i]),r=t.split(".").pop(),e[t]?v(t):r=="kml"||r=="kmz"?e[t]=new google.maps.KmlLayer({map:u,preserveViewport:!0,url:t}):r=="json"&&(e[t]=new google.maps.Data({map:u}).loadGeoJson(t))}function v(t,i){i=typeof i!="undefined"?i:e[t].getMap()==null;n.each(["traffic","bicycling","transit"],function(n,t){e[t].setMap(null)});t&&e[t].setMap(i?u:null)}var tt=t.options.adaptive,y=t.options.initialOpenDirections,p=t.options.initialOpenInfo,w=t.options.mashupClick,it=t.options,rt=t.options.radius,l=t.options.search;this.center=t.center;this.height=t.height;this.mapid=t.mapid;this.mapTypeId=t.mapTypeId?t.mapTypeId:"roadmap";this.metaKey=t.metaKey;this.name=t.name;this.query=t.query;this.title=t.title;this.width=t.width;this.zoom=t.zoom?parseInt(t.zoom,10):null;this.editable=t.options.editable;this.iw=null;this.layers=t.options.layers;this.places=null;this.poi;var f=this,i={},e={},o=null,c=null,u=null,r=[],b=!1,s;this.display=function(){if(i.layout=n("#"+this.name+"_layout"),i.canvas=n("#"+this.name),i.dir=n("#"+this.name+"_directions"),i.list=n("#"+this.name+"_poi_list"),i.dialog=n("#"+this.name+"_dialog"),i.controls=n(".mapp-controls","#"+this.name+"_controls"),i.menu=n(".mapp-menu",i.controls),!i.canvas.length)return mapp.lib.log("MapPress: Missing map name or container for map: "+this.name);u=new google.maps.Map(i.canvas.get(0),{mapTypeId:"roadmap",zoom:1});s=google.maps.Marker.MAX_ZINDEX;i.dir.append(n("#"+this.name+"_directions_").contents());i.list.append(n("#"+this.name+"_poi_list_").contents());this.places=new mapp.Places(null,{gmap:u});google.maps.event.addListener(this.places,"search",function(n){f.search(n)});var e={backgroundColor:"transparent",fullscreenControl:!1,keyboardShortcuts:!1,mapTypeControl:!0,mapTypeControlOptions:{position:google.maps.ControlPosition.TOP_RIGHT,style:google.maps.MapTypeControlStyle.DROPDOWN_MENU},scaleControl:!0,scrollwheel:!1,streetViewControl:!(this.editable||this.query)};u.setOptions(e);d();g();nt();a(this.mapTypeId,!0);i.layout.on("click","[data-mapp-action]",function(t){var i=n(this).attr("data-mapp-action");t.preventDefault();f.action(i,n(this).attr("data-mapp-"+i),n(this))});i.list.on("click","tr",function(t){if(!n(t.target).is("a")){var u=n("tr",i.list).index(n(this));f.openInfoWindow(r[u])}});if(k("click drag",function(){f.closeInfoWindow()}),mappl10n.options.iwType=="ib"||this.editable?this.iw=new mapp.InfoBox(this):mappl10n.options.iwType=="iw"&&(this.iw=new google.maps.InfoWindow),c=new mapp.Geocoder(f.getMap()),mappl10n.options.directions!="none"&&(o=new mapp.Directions(f,mappl10n.options.directions,c,mappl10n.options.directionsServer,mappl10n.options.directionsUnits)),this.query){l?this.places.parse(l):this.ajaxQuery();return}google.maps.event.addListenerOnce(u,"idle",function(){f.initCenter()});this.setPois(t.pois);this.renderList()};this.action=function(n,t,i){switch(n){case"center":h(!1);this.closeInfoWindow();this.recenter();break;case"geolocate":this.places.geolocate();break;case"layer":v(t);h(!1);break;case"menu":h(t);break;case"open":var f=i.attr("data-mapp-id");this.openInfoWindow(r[f]);break;case"type":a(t);break;case"viewport-set":this.center=u.getCenter();this.zoom=u.getZoom();break;case"viewport-reset":this.center=this.zoom=null;this.recenter();break;default:return!0}};this.setDialog=function(n){n=n?n:'<span class="mapp-spinner"><\/span>'+mappl10n.loading;n='<div class="mapp-dialog-inner">'+n+"<\/div>";i.dialog.html(n);i.dialog.show()};this.hideDialog=function(){i.dialog.hide()};this.show=function(){i.layout.show();this.display()};this.closeInfoWindow=function(){this.iw.close()};this.openDirections=function(n,t){var i,r;typeof n=="object"?(i=n.address?n.address:n.getPosition().toUrlValue(),n.open()):i=n;typeof t=="object"?(r=t.address?t.address:t.getPosition().toUrlValue(),t.open()):r=t;o.open(i,r)};this.poiSelect=function(t){if(this.poi=t,n("[data-mapp-id]",i.list).removeClass("mapp-selected"),t){var f=n.inArray(t,r),u=n('[data-mapp-id="'+f+'"]',i.list);u.addClass("mapp-selected");mapp.lib.scrollTo(i.list,u);s++;t.setZIndex(s)}};this.getMap=function(){return u};this.getGeocoder=function(){return c};this.renderList=function(){this.editable&&(i.list.html(mapp.lib.template("poi-list",{pois:r})),google.maps.event.trigger(this,"rendered"))};this.getPoi=function(n){return typeof n=="string"&&(n=parseInt(n,10)),r[n]};this.getPoiById=function(n){for(var t=0;t<r.length;t++)if(r[t].postid==n)return r[t];return null};this.getPois=function(){return r};this.addPoi=function(n){r.unshift(n);n.setMap(this);f.renderList();this.poiSelect(n)};this.removePoi=function(t){var i=n.inArray(t,r);i!=-1&&(r[i].setMap(null),r.splice(i,1),f.renderList())};this.setPois=function(n){for(var i,t=0;t<r.length;t++)r[t].setMap(null);for(r=[],t=0;t<n.length;t++)i=new mapp.Poi,i.fromJSON(n[t]),r.push(i),i.setMap(this),i.setZIndex(s+n.length-1-t);s+=n.length-1};this.showPois=function(){for(var n=0;n<r.length;n++)r[n].setVisible(!0)};this.hidePois=function(){for(var n=0;n<r.length;n++)r[n].setVisible(!1)};this.sortPois=function(n){for(var u,t=Array(),i=0;i<n.length;i++){if(u=parseInt(n[i]),isNaN(u))return!1;t.push(r[u])}if(t.length!=r.length)return!1;r=t;this.renderList()};this.openInfoWindow=function(n,t){if(this.iw){if(o&&o.close(),this.iw.close(),this.poiSelect(n),!this.editable){if(w=="post"&&n.postid&&n.url){window.location.assign(n.url);return}this.iw.setContent(n.html)}google.maps.event.addListenerOnce(this.iw,"domready",function(){google.maps.event.trigger(f,"poidomready",n)});google.maps.event.trigger(f,"open",n);var i=new google.maps.MVCObject;i.setValues({position:n.getPosition(t),anchorPoint:n.getAnchorPoint(t)});this.iw.open(u,i)}};this.resize=function(n,t){var r=u.getCenter();n&&t&&(i.canvas.width(n),i.canvas.height(t),this.width=n,this.height=t);google.maps.event.trigger(u,"resize");u.setCenter(r);b=!0;return};this.initCenter=function(){this.closeInfoWindow();google.maps.event.addListenerOnce(u,"idle",function(){f.initWindows()});this.recenter()};this.initWindows=function(){var n=r.length?r[0]:null;o&&y?f.openDirections(null,n):p&&n&&n.open()};this.recenter=function(){var f=this.center?new google.maps.LatLng(this.center.lat,this.center.lng):null,t=this.zoom&&parseInt(this.zoom)?parseInt(this.zoom):null,n,i;if(f){u.setCenter(f);u.setZoom(t?t:1);return}if(r.length==0){u.setCenter(new google.maps.LatLng(0,0));u.setZoom(1);return}if(r.length==1){r[0].center(t);return}for(bounds=new google.maps.LatLngBounds,n=0;n<r.length;n++)i=r[n].getBounds(),bounds=i?bounds.union(i):bounds.extend(r[n].getPosition());u.fitBounds(bounds)};this.toJSON=function(){for(var t={center:this.center,height:this.height,mapid:this.mapid,mapTypeId:u.getMapTypeId(),metaKey:this.metaKey,pois:[],title:this.title,width:this.width,zoom:this.zoom},n=0;n<r.length;n++)t.pois.push(r[n].toJSON());return t};this.ajaxSave=function(n){mapp.lib.ajax({type:"POST",data:{action:"mapp_save",map:JSON.stringify(this),postid:mappl10n.options.postid},callback:function(t){t.status=="OK"&&(this.mapid=t.data.mapid,n(t.data))}})}};mapp.Map.ajaxCreate=function(t,i,r){mapp.lib.ajax({type:"GET",data:{action:"mapp_create"},callback:function(u){if(u.status=="OK"){n.extend(u.data.map.options,i);u.data.map.name=t;var f=new mapp.Map(u.data.map);r(f)}}})};mapp.Map.ajaxGet=function(t,i,r,u){mapp.lib.ajax({type:"GET",data:{action:"mapp_get",mapid:t},callback:function(t){if(t.status=="OK"){n.extend(t.data.map.options,r);t.data.map.name=i;var f=new mapp.Map(t.data.map);u(f)}}})};mapp.Map.ajaxDelete=function(n,t){mapp.lib.ajax({type:"POST",data:{action:"mapp_delete",mapid:n},callback:function(n){n.status=="OK"&&t&&t()}})}}(jQuery);mapp=window.mapp||{};mapp.Directions=function(n,t,i,r,u){function p(){jQuery(".mapp-dir-swap",f).click(function(){var n=jQuery(".mapp-dir-daddr",f).val(),t=jQuery(".mapp-dir-saddr",f).val();return jQuery(".mapp-dir-saddr",f).val(n),jQuery(".mapp-dir-daddr",f).val(t),jQuery(".mapp-dir-get",f).click(),!1});jQuery(".mapp-dir-get",f).click(function(){return s.getDirections(),!1});jQuery(".mapp-dir-print",f).click(function(){s.printDirections()});jQuery(".mapp-dir-close",f).click(function(){return s.close(),!1});jQuery(".mapp-travelmode",f).click(function(){return jQuery(".mapp-travelmode",f).removeClass("mapp-travelmode-on"),jQuery(this).addClass("mapp-travelmode-on"),s.getDirections(),!1});jQuery(".mapp-myloc",f).click(function(){return c.geolocate(function(n){n?(jQuery(".mapp-dir-saddr",f).val("("+n.coords.latitude+", "+n.coords.longitude+")"),jQuery(".mapp-dir-get",f).click()):alert(mappl10n.no_geolocate)}),!1})}function w(n,t,i){var u=jQuery(".mapp-travelmode-on > span",f).hasClass("mapp-dir-walk")?google.maps.DirectionsTravelMode.WALKING:jQuery(".mapp-travelmode-on > span",f).hasClass("mapp-dir-transit")?google.maps.DirectionsTravelMode.TRANSIT:jQuery(".mapp-travelmode-on > span",f).hasClass("mapp-dir-bike")?google.maps.DirectionsTravelMode.BICYCLING:google.maps.DirectionsTravelMode.DRIVING;var o={travelMode:u,transitOptions:{departureTime:null},provideRouteAlternatives:!0,origin:n,destination:t,unitSystem:y},r=jQuery(".mapp-dir-renderer",f).get(0);jQuery(".mapp-dir-renderer",f).empty();l||(l=new google.maps.DirectionsService);l.route(o,function(n,t){switch(t){case google.maps.DirectionsStatus.OK:h.hidePois();e?(e.setDirections(n),e.setMap(a),e.setPanel(r)):e=new google.maps.DirectionsRenderer({map:a,panel:r,directions:n,hideRouteList:!1,draggable:!0});break;case google.maps.DirectionsStatus.NOT_FOUND:alert(mappl10n.dir_not_found);break;case google.maps.DirectionsStatus.ZERO_RESULTS:alert(mappl10n.dir_zero_results);break;default:alert(mappl10n.dir_default+t)}i()})}var h=n,v=t,c=i,o=r,y=u,f=jQuery("#"+n.name+"_directions"),e,l,a=n.getMap(),s=this;o.toLowerCase().indexOf("http")==-1&&(o="https://"+o);p();this.open=function(n,t){if(v=="google"){this.openGoogle(n,t);return}jQuery(f).show();jQuery(".mapp-dir-saddr",f).val(n);jQuery(".mapp-dir-daddr",f).val(t);jQuery(".mapp-dir-get",f).focus();jQuery(".mapp-dir-saddr",f).focus()};this.close=function(){jQuery(f).hide();e&&(e.setPanel(null),e.getMap()&&(e.setMap(null),h.showPois()))};this.getDirections=function(){h.closeInfoWindow();jQuery(".mapp-spinner",f).show();var n=jQuery(".mapp-dir-saddr",f),t=jQuery(".mapp-dir-daddr",f),i=jQuery(".mapp-dir-saddr-err",f),r=jQuery(".mapp-dir-daddr-err",f);c.geocodeField(n,i,function(n){c.geocodeField(t,r,function(t){n&&t?w(n,t,function(){jQuery(".mapp-spinner",f).hide();return}):jQuery(".mapp-spinner",f).hide()})})};this.printDirections=function(){var t,n=jQuery(".mapp-travelmode-on > span",f);t=n.hasClass("mapp-dir-walk")?"w":n.hasClass("mapp-dir-bike")?"b":n.hasClass("mapp-dir-transit")?"r":"d";this.openGoogle(jQuery(".mapp-dir-saddr",f).val(),jQuery(".mapp-dir-daddr",f).val(),t)};this.openGoogle=function(n,t,i){var r=o;r+="?saddr="+encodeURIComponent(n);r+="&daddr="+encodeURIComponent(t);i&&(r+="&dirflg="+i);window.open(r)}};mapp=window.mapp||{};mapp.Geocoder=function(n){function r(n,t){jQuery(n).removeClass("mapp-error");jQuery(t).hide()}function u(n,t,i){jQuery(n).addClass("mapp-error");jQuery(t).html(i);jQuery(t).show()}var t,f,i=this;f=n;this.geocode=function(i,r){typeof i=="string"&&i.substring(0,1)=="("&&(split=i.replace(/\(|\)/g,"").split(","),i=new google.maps.LatLng(split[0],split[1]));var u=i instanceof google.maps.LatLng?{location:i}:{address:i,region:mappl10n.options.country,bounds:n.getBounds()};t||(t=new google.maps.Geocoder);t.geocode(u,function(n,t){if(n){for(var i=0;i<n.length;i++)n[i].formatted_address==""&&n.splice(i,1);r(n[0],t)}else r(null,t)})};this.geolocate=function(n){if(!navigator||!navigator.geolocation)return null;navigator.geolocation.getCurrentPosition(function(t){n(t)},function(){n(null)},{timeout:1e4,enableHighAccuracy:!0,maximumAge:3e4})};this.stringToLatLng=function(n){var t=n.split(",",2),i=Number(t[0]),r=Number(t[1]);return isNaN(i)||isNaN(r)?!1:new google.maps.LatLng(i,r)};this.geocodeField=function(n,t,i){r(n,t);checkAddress(n,t,jQuery(n).val(),function(r){if(!r){u(n,t,mappl10n.no_address);i(null);return}if(r&&r.formatted_address){jQuery(n).val(r.formatted_address);i(r.formatted_address);return}i(r);return})};this.autocompleteField=function(n,t,f,e,o){jQuery(n).keypress(function(i){i.which==13&&(checkAddress(n,t,jQuery(n).val(),o),i.preventDefault())});jQuery(f).click(function(){return checkAddress(n,t,jQuery(n).val(),o),!1});jQuery(e).click(function(){return r(n,t),i.geolocate(function(i){if(i){var r="("+i.coords.latitude+", "+i.coords.longitude+")";jQuery(n).val("");checkAddress(n,t,r,o)}else u(n,t,mappl10n.no_geolocate);return}),!1})};checkAddress=function(n,t,f,e){if(r(n,t),f=jQuery.trim(f),f==""){e(null);return}var o=i.stringToLatLng(f);if(o){e(o);return}if(f.substring(0,4)=="http"){e(f);return}i.geocode(f,function(i,r){if(!i||r!=google.maps.GeocoderStatus.OK){u(n,t,mappl10n.no_address);e(null);return}e(i);return})}};mapp.Geocoder.parseAddress=function(n){return!n||n==""?{firstLine:"",secondLine:""}:(n.lastIndexOf(", USA")>0||n.lastIndexOf(", United States")>0)&&(n.lastIndexOf(", USA")>0&&(n=n.slice(0,n.lastIndexOf(", USA"))),n.lastIndexOf(", United States")>0&&(n=n.slice(0,n.lastIndexOf(", United States"))),n.indexOf(",")==n.lastIndexOf(","))?{firstLine:n,secondLine:""}:n.indexOf(",")==-1?{firstLine:n,secondLine:""}:{firstLine:n.slice(0,n.indexOf(",")),secondLine:n.slice(n.indexOf(", ")+2)}};mapp=window.mapp||{};mapp.Icons={};mapp.Icons.get=function(){return"https://maps.google.com/intl/en_us/mapfiles/ms/micons/red-dot.png"};mapp.Icons.getUrl=function(){return"https://maps.google.com/intl/en_us/mapfiles/ms/micons/red-dot.png"};mapp=window.mapp||{};+function(n){mapp.InfoBox=function(t,i){var u=n.extend({disableAutoPan:!1,border:20},i),f=null,r=null,e=null,o=this;r=n('<div class="mapp-ib" tabindex="0">').appendTo(t.getMap().getDiv());e=n('<div class="mapp-ib-tip">').appendTo(t.getMap().getDiv());jQuery(window).resize(function(){o.close()});r.on("keydown",function(n){n.which==27&&o.close()});r.on("click",".mapp-close",function(){o.close()});this.getContent=function(){return r};this.setContent=function(n){r.empty().append(n)};this.open=function(n,t){f=t;this.setMap(n)};this.onAdd=function(){r.show();e.show();var t=n(":input",r);t.length?t.first().focus():r.focus();google.maps.event.trigger(o,"domready")};this.draw=function(){var l=this.getMap(),c=this.getProjection().fromLatLngToContainerPixel(f.position),t={width:n(l.getDiv()).width(),height:n(l.getDiv()).height()},v=n(".mapp-ib-body",r);if(!u.disableAutoPan){r.css({"max-height":"9999px",left:0,bottom:0,top:"auto",right:"auto"});var s=r.outerWidth(!0),h=r.outerHeight(!0),a=e.outerHeight(!0),i=c.x,o=c.y;i+s/2>t.width-u.border&&(i=t.width-u.border-s/2);i-s/2<u.border&&(i=s/2+u.border);o-h+f.anchorPoint.y-a<u.border&&(o=h-f.anchorPoint.y+u.border+a);o>t.height&&(o=t.height);l.panBy(c.x-i,c.y-o);h>t.height+f.anchorPoint.y-2*u.border&&(h=t.height+f.anchorPoint.y-2*u.border,r.css({"max-height":h}));r.css({left:i-s/2,bottom:t.height-o-f.anchorPoint.y+a});e.css({left:i,bottom:t.height-o-f.anchorPoint.y})}};this.close=function(){r.is(":visible")&&(this.setMap(null),google.maps.event.trigger(this,"closed"))};this.onRemove=function(){r.hide();e.hide()}};mapp.InfoBox.prototype=new google.maps.OverlayView}(jQuery);mapp=window.mapp||{};+function(n){if(mapp.lib={ajax:function(t){var r=this,u,i;if(n.extend({type:"GET",cache:!1,data:null,spinner:null,callback:n.noop},t),t.cache)for(typeof mapp.lib.ajax.cache=="undefined"&&(mapp.lib.ajax.cache=[]),u=JSON.stringify(t.data),i=0;i<mapp.lib.ajax.cache.length;i++)if(mapp.lib.ajax.cache[i].hash==u){t.callback(mapp.lib.ajax.cache[i].response);return}t.spinner&&t.spinner.show();n.ajax({type:t.type,cache:!1,url:mappl10n.options.ajaxurl,data:t.data,success:function(n,i,u){if(t.spinner&&t.spinner.hide(),n.output){r.alert("AJAX Error\r\n"+n.output);return}if(n.status=="OK"){t.cache&&mapp.lib.ajax.cache.push({hash:JSON.stringify(t.data),response:n});t.callback&&t.callback(n,u);return}var f=typeof n=="object"?n.status:n;r.alert("AJAX ERROR\r\nResponse="+f+" TextStatus="+i+"\r\nResponseText="+u.responseText)},error:function(n,i,u){t.spinner&&t.spinner.hide();typeof u!="undefined"&&u!=""&&r.alert("AJAX ERROR\r\nTextStatus="+i+"\r\nError="+u+"\r\nResponseText="+n.responseText)}})},alert:function(n){mappl10n.options.admin||mappl10n.options.debug?alert(n):window.console&&console.log(n)},jqVersionCheck:function(t){if(typeof n=="undefined"||typeof t=="undefined")return!1;for(t=t.split("."),v=n.fn.jquery.split("."),i=0;i<t.length;i++){var r=parseInt(t[i]),u=typeof v[i]!="undefined"?parseInt(v[i]):0;if(u!=r)return u>r}return!0},log:function(n){window.console&&console.log(n)},scrollTo:function(n,t){if(n&&t&&n.length&&t.length){var i=n.scrollTop(),u=n.height(),r=i+t.position().top,f=r+t.outerHeight(!0);r<i?n.scrollTop(r):f>i+u&&n.scrollTop(f-u)}},template:function(t,i){if(mapp.lib.templates=mapp.lib.templates?mapp.lib.templates:{},!mapp.lib.templates[t]){var r=mappl10n.options.templates?mappl10n.options.template[t]:n("#mapp-tmpl-"+t).html();if(r)mapp.lib.templates[t]=_.template(n.trim(r),null,{evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g});else return""}return mapp.lib.templates[t](i)}},typeof google=="undefined")return mapp.lib.alert("ERROR: Google Maps API not loaded");if(!mappl10n.options.apiKey)return mapp.lib.alert("ERROR: Google Maps API Key missing, please check MapPress settings and FAQ");n(document).ready(function(){var t=0;n("script").each(function(i,r){n(r).attr("src")=="https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places&key=AIzaSyAEPgklOaWW2F_KkSifR_JuYIsM6ONdlCM"&&t++});t>1&&mapp.lib.alert("ERROR: Google Maps API key loaded multiple times, see MapPress FAQ")});mapp.lib.jqVersionCheck("1.7")||mapp.lib.alert("jQuery version is too old: "+n.fn.jquery);n("body").on("tabsactivate tabsshow",function(t,i){var r=i.newPanel?i.newPanel:i.panel;r&&n(".mapp-canvas",r).each(function(){var i=n(this).attr("id"),t=window[i];t.resize();t.initCenter()})})}(jQuery);mapp=window.mapp||{};+function(n){mapp.Places=function(t,i){var u=this,r;if(this.sel=n(t),this.opts=n.extend({map:null,types:[]},i),r=n('<div style="display:none">').appendTo("body"),this.placesService=new google.maps.places.PlacesService(r.get(0)),this.autocompleteService=new google.maps.places.AutocompleteService,this.sel.length){this.opts.types||(this.opts.types=[]);this.autocomplete=new google.maps.places.Autocomplete(this.sel.get(0),{types:this.opts.types});this.autocomplete.bindTo("bounds",this.opts.map.getMap());this.sel.on("keydown",function(n){if(n.which==13)return!1});google.maps.event.addListener(this.autocomplete,"place_changed",function(){u.parse(this.getPlace())})}};mapp.Places.prototype={parse:function(t){var u,i=this,r;if(this.error(!1),r=t&&t.name?n.trim(t.name):n.trim(t),!r)return this.error(!0);if(r=="geolocate")return this.geolocate();if(r.substring(0,4)=="http"||r.substring(0,3)=="kml"&&typeof typenow!="undefined"&&typenow=="mappress_map"){google.maps.event.trigger(i,"search",r=="kml"?"http://googlemaps.github.io/js-v2-samples/ggeoxml/cta.kml":r);return}if(t&&t.geometry){t.formatted_address&&this.set(t.formatted_address);google.maps.event.trigger(i,"search",t);return}if(latLngLoc=this.parseLatLng(t)){google.maps.event.trigger(i,"search",latLngLoc);return}this.autocompleteService.getPlacePredictions({input:r,types:this.opts.types,bounds:this.opts.map.getMap().getBounds()},function(n,t){if(t!="OK"||n==null||n.length==0)return i.error(!0);u=typeof n[0].description!="undefined"?n[0].description:null;i.placesService.getDetails({placeId:n[0].place_id},function(n,t){if(t!="OK"||!n||!n.geometry)return i.error(!0);u=u?u:n.formatted_address;i.set(u);google.maps.event.trigger(i,"search",n)})})},parseLatLng:function(t){var i,r;return t instanceof google.maps.LatLng?i=t:t&&t.lat&&t.lng?i=new google.maps.LatLng(t.lat,t.lng):(name=t&&t.name?n.trim(t.name):n.trim(t),r=name.split(","),r.length!=2||isNaN(r[0])||isNaN(r[1])||(i=new google.maps.LatLng(r[0],r[1]))),i?{name:i.toUrlValue(),geometry:{location:i}}:null},geolocate:function(){var n=this;if(!navigator||!navigator.geolocation){alert(mappl10n.no_geolocate);return}navigator.geolocation.getCurrentPosition(function(t){n.set("");var i=new google.maps.LatLng(t.coords.latitude,t.coords.longitude),r={name:i.toUrlValue(),geometry:{location:i}};google.maps.event.trigger(n,"search",r)},function(){alert(mappl10n.no_geolocate)},{timeout:1e4,enableHighAccuracy:!0,maximumAge:3e4})},set:function(n){n=n.replace(", United States of America","").replace(", USA","").replace(", United States","");this.sel.blur();this.sel.val(n);this.sel.blur();this.error(!1)},get:function(){return n.trim(this.sel.val())},focus:function(){this.sel.focus()},error:function(n){this.sel.toggleClass("mapp-error",!!n)}}}(jQuery);mapp=window.mapp||{};+function(n){mapp.Poi=function(){this.address=null;this.body=null;this.html=null;this.iconid=null;this.kml=null;this.map=null;this.overlay=null;this.postid=null;this.title="";this.url=null;this.type=null;this.viewport=null;for(var n in arguments[0])typeof arguments[0][n]!="undefined"&&(this[n]=arguments[0][n])};mapp.Poi.prototype={fromJSON:function(n){var u,f,i,o,t,r,s,e;this.address=n.correctedAddress;this.body=n.body;this.correctedAddress=n.correctedAddress;this.html=n.html;this.iconid=n.iconid;this.kml=n.kml;this.postid=n.postid;this.title=n.title;this.type=n.type;this.url=n.url;n.viewport&&n.viewport.sw&&n.viewport.ne&&(u=new google.maps.LatLng(n.viewport.sw.lat,n.viewport.sw.lng),f=new google.maps.LatLng(n.viewport.ne.lat,n.viewport.ne.lng),this.viewport=u.lat()==0&&u.lng()==0&&f.lat()==0&&f.lng()==0?null:new google.maps.LatLngBounds(u,f));i=[];o=[];switch(this.type){case"polygon":if(n.poly&&n.poly.paths)for(t=0;t<n.poly.paths.length;t++){for(i=[],r=0;r<n.poly.paths[t].length;r++)i.push(new google.maps.LatLng(n.poly.paths[t][r].lat,n.poly.paths[t][r].lng));o.push(new google.maps.MVCArray(i))}this.overlay=new google.maps.Polygon({paths:new google.maps.MVCArray(o)});this.setColors(n.poly);break;case"polyline":if(n.poly&&n.poly.path)for(t=0;t<n.poly.path.length;t++)i.push(new google.maps.LatLng(n.poly.path[t].lat,n.poly.path[t].lng));this.overlay=new google.maps.Polyline({path:new google.maps.MVCArray(i)});this.setColors(n.poly);break;case"circle":e=new google.maps.LatLng(n.point.lat,n.point.lng);this.overlay=new google.maps.Circle({center:e,radius:parseFloat(n.poly.radius)});this.setColors(n.poly);break;case"rectangle":this.overlay=new google.maps.Rectangle({bounds:this.viewport});this.setColors(n.poly);break;case"kml":s=n.kml&&n.kml.url?n.kml.url:"";this.overlay=new google.maps.KmlLayer(s,{preserveViewport:!0,suppressInfoWindows:!0});break;case"":default:e=new google.maps.LatLng(n.point.lat,n.point.lng);this.overlay=new google.maps.Marker({position:e})}},toJSON:function(){var n={address:this.address,body:this.body,correctedAddress:this.address,iconid:this.iconid,point:null,poly:null,title:this.title,type:this.type,viewport:null},r=this.getPosition(),t,i;if(n.point={lat:r.lat(),lng:r.lng()},t=this.viewport?this.viewport:this.getBounds(),t&&(n.viewport={sw:{lat:t.getSouthWest().lat(),lng:t.getSouthWest().lng()},ne:{lat:t.getNorthEast().lat(),lng:t.getNorthEast().lng()}}),this.type=="kml"&&(n.kml={url:this.overlay.getUrl()}),this.isPoly()){n.poly=this.getColors();switch(this.type){case"circle":n.poly.radius=this.overlay.getRadius();break;case"polyline":n.poly.path=[];this.overlay.getPath().forEach(function(t){n.poly.path.push({lat:t.lat(),lng:t.lng()})});break;case"polygon":n.poly.paths=[];this.overlay.getPaths().forEach(function(t){var i=[];t.forEach(function(n){i.push({lat:n.lat(),lng:n.lng()})});n.poly.paths.push(i)});break;case"rectangle":i=this.overlay.getBounds();n.viewport={sw:{lat:i.getSouthWest().lat(),lng:i.getSouthWest().lng()},ne:{lat:i.getNorthEast().lat(),lng:i.getNorthEast().lng()}}}}return n},setMap:function(t){var i=this;if(google.maps.event.clearInstanceListeners(this.overlay),t==null){this.overlay.setMap(null);return}this.type=="kml"&&(google.maps.event.addListener(this.overlay,"defaultviewport_changed",function(){i.viewport=i.overlay.getDefaultViewport()}),google.maps.event.addListener(this.overlay,"status_changed",function(){var n=i.overlay.getStatus();n!="OK"&&mappl10n.ajaxErrors&&alert(mappl10n.kml_error+":"+n)}));this.map=t;this.overlay.setMap(t.getMap());this.setEditable(this.map.editable);this.setIcon(this.iconid);this.type||this.overlay.setTitle(n("<div>").html(this.title).text());google.maps.event.addListener(this.overlay,"click",function(n){i.open(n)})},setEditable:function(n){var t=this;this.type!="kml"&&(this.overlay.setDraggable(n),this.isPoly()&&this.overlay.setEditable(n),google.maps.event.clearListeners(this.overlay,"rightclick"),google.maps.event.clearListeners(this.overlay,"dragstart"),n&&(google.maps.event.addListener(this.overlay,"dragstart",function(){t.viewport=null;t.map.closeInfoWindow()}),(this.type=="polygon"||this.type=="polyline")&&google.maps.event.addListener(this.overlay,"rightclick",function(n){n.vertex!=null&&t.overlay.getPath().getLength()>2&&t.overlay.getPath().removeAt(n.vertex)})))},getZIndex:function(){return this.type?this.overlay.zIndex:this.overlay.getZIndex()},setZIndex:function(n){this.type?this.overlay.zIndex=n:this.overlay.setZIndex(n)},setIcon:function(n){this.type||typeof mapp.Icons=="undefined"||(this.overlay.setIcon(null),this.overlay.setIcon(mapp.Icons.get(n)),this.iconid=n)},setVisible:function(n){typeof this.overlay.setVisible!="undefined"&&this.overlay.setVisible(n)},setColors:function(n){var i={};for(var t in{strokeColor:"",strokeOpacity:"",strokeWeight:"",fillColor:"",fillOpacity:""})n&&typeof n[t]!="undefined"&&(i[t]=n[t]);this.overlay.setOptions(i)},getColors:function(){var t={};for(var n in{strokeColor:"",strokeOpacity:"",strokeWeight:"",fillColor:"",fillOpacity:""})typeof this.overlay[n]!="undefined"&&(t[n]=this.overlay[n]);return t},center:function(n){var t=this.map.getMap(),i=this.getBounds();if(typeof n=="number"){t.setCenter(this.getPosition());t.setZoom(n);return}i?(t.fitBounds(i),t.setCenter(this.getPosition())):(t.setCenter(this.getPosition()),t.setZoom(parseInt(mappl10n.options.poiZoom)))},open:function(n){this.map.openInfoWindow(this,n)},isPoly:function(){return jQuery.inArray(this.type,["polyline","polygon","circle","rectangle"])!=-1},getBounds:function(){var n;if(!this.map.editable&&this.viewport)return this.viewport;switch(this.type){case"polyline":n=new google.maps.LatLngBounds;this.overlay.getPath().forEach(function(t){n.extend(t)});break;case"polygon":n=new google.maps.LatLngBounds;this.overlay.getPaths().forEach(function(t){t.forEach(function(t){n.extend(t)})});break;case"rectangle":case"circle":n=this.overlay.getBounds();break;case"kml":n=this.overlay.getDefaultViewport();n=n?n:this.viewport;break;default:return this.viewport?this.viewport:null}return n},getPosition:function(n){if(!this.type)return this.overlay.getPosition();if(this.type=="kml"&&n&&n.latLng)return n.latLng;var t=this.getBounds();return t?t.getCenter():new google.maps.LatLng(0,0)},click:function(){google.maps.event.trigger(this.overlay,"click")},getAnchorPoint:function(n){return this.type=="kml"?n&&n.pixelOffset?new google.maps.Point(n.pixelOffset.width,n.pixelOffset.height):new google.maps.Point(0,0):this.type?new google.maps.Point(0,0):typeof this.overlay.anchorPoint!="undefined"?this.overlay.anchorPoint:new google.maps.Point(0,-32)}}}(jQuery);mapp=window.mapp||{};mapp.widgets={};+function(){mapp.load=function(){if(typeof mapp!="undefined"&&mapp.data)while(mapp.data.length){var n=mapp.data.pop(),t=new mapp.Map(n);window[n.name]=t;t.display()}}}(jQuery);typeof mapp.Media!="undefined"?window.mappEditor=new mapp.Media:mapp.load()
|
1 |
+
var mapp=window.mapp||{};+function(n){mapp.Map=function(t){function c(n,t){n=n.split(" ");for(var i=0;i<n.length;i++)google.maps.event.addListener(r,n[i],t)}function l(){var u,t;n("[data-mapp-type]",i.menu).removeClass("mapp-active");n('[data-mapp-type="'+r.getMapTypeId()+'"]',i.menu).addClass("mapp-active");for(layer in e)u=!!e[layer].getMap(),n('[data-mapp-layer="'+layer+'"]',i.menu).toggleClass("mapp-active",u);t=!!(f.center&&f.zoom);n('[data-mapp-action="viewport-set"]',i.menu).toggle(!t);n('[data-mapp-action="viewport-reset"]',i.menu).toggle(t)}function a(){var n=mappl10n.options.styles,i=mappl10n.options.style,u=["roadmap","satellite","terrain","hybrid"],t;if(i&&typeof n[i]!="undefined"&&r.setOptions({styles:n[i]}),f.editable){for(t in n)r.mapTypes.set(t,new google.maps.StyledMapType(n[t],{name:t})),u.push(t);r.setOptions({mapTypeControlOptions:{mapTypeIds:u,position:google.maps.ControlPosition.TOP_RIGHT,style:google.maps.MapTypeControlStyle.DROPDOWN_MENU}})}else typeof n[f.mapTypeId]!="undefined"&&r.setOptions({styles:n[f.mapTypeId]})}function v(){i.controls.children("[data-mapp-position]").each(function(){var t=n(this).attr("data-mapp-position"),i;t=t?google.maps.ControlPosition[t]:google.maps.ControlPosition.TOP_RIGHT;i=n(this);i.get(0).index=0;r.controls[t].push(i.get(0))})}function y(){var o,i,t,u;for(e={traffic:new google.maps.TrafficLayer,bicycling:new google.maps.BicyclingLayer,transit:new google.maps.TransitLayer},o=n.makeArray(f.options.layers),i=0;i<o.length;i++)t=n.trim(o[i]),u=t.split(".").pop(),e[t]?h(t):u=="kml"||u=="kmz"?e[t]=new google.maps.KmlLayer({map:r,preserveViewport:!0,url:t}):u=="json"&&(e[t]=new google.maps.Data({map:r}).loadGeoJson(t))}function h(t,i){i=typeof i!="undefined"?i:e[t].getMap()==null;n.each(["traffic","bicycling","transit"],function(n,t){e[t].setMap(null)});t&&e[t].setMap(i?r:null)}function p(t,i){var u=n.inArray(t,["roadmap","satellite","terrain","hybrid"])!=-1;i=typeof i!="undefined"?i:!(r.getMapTypeId()==t);t=f.editable?i&&(u||mappl10n.options.styles[t]!="undefined")?t:"roadmap":u?t:"roadmap";r.setMapTypeId(t)}this.center=t.center;this.height=t.height;this.mapid=t.mapid;this.mapTypeId=t.mapTypeId?t.mapTypeId:"roadmap";this.metaKey=t.metaKey;this.name=t.name;this.options=t.options;this.query=t.query;this.title=t.title;this.width=t.width;this.zoom=t.zoom?parseInt(t.zoom,10):null;this.editable=t.options.editable;this.iw=null;this.layers=t.options.layers;this.places=null;this.poi=null;var f=this,o=null,i={},r=null,e={},w=t.options,u=[],s;this.display=function(){if(i.layout=n("#"+this.name),i.canvas=n(".mapp-canvas",i.layout),i.controls=n(".mapp-controls",i.layout),i.dialog=n(".mapp-dialog",i.layout),i.dir=n(".mapp-directions",i.layout),i.filters=n(".mapp-filters",i.layout),i.list=n(".mapp-list",i.layout),i.menu=n(".mapp-menu",i.controls),!i.canvas.length)return mapp.lib.log("MapPress: Missing map name or container for map: "+this.name);r=new google.maps.Map(i.canvas.get(0),{mapTypeId:"roadmap",zoom:1});s=google.maps.Marker.MAX_ZINDEX;var u={backgroundColor:"transparent",fullscreenControl:!1,keyboardShortcuts:!1,mapTypeControl:!0,mapTypeControlOptions:{position:google.maps.ControlPosition.TOP_RIGHT,style:google.maps.MapTypeControlStyle.DROPDOWN_MENU},scaleControl:!0,scrollwheel:!1,streetViewControl:!(this.editable||this.query)};r.setOptions(u);a();v();y();p(this.mapTypeId,!0);this.places=new mapp.Places(null,{gmap:r});google.maps.event.addListener(this.places,"search",function(n){f.search(n)});i.layout.on("click","[data-mapp-action]",function(t){var i=n(this).attr("data-mapp-action");t.preventDefault();f.action(i,n(this).attr("data-mapp-"+i),n(this))});i.filters.on("change",function(){f.ajaxQuery(r.getBounds())});c("click drag",function(){f.closeInfoWindow()});i.layout.on("click",function(t){var r=n(t.target),u=r.attr("data-mapp-action");r==i.filters||u=="filters-toggle"||r.closest(i.filters).length||f.toggleView("filters",!1);r==i.menu||u=="menu-toggle"||r.closest(i.menu).length||f.toggleView("menu",!1)});if(n(window).resize(function(){f.resize()}),this.iw=this.iw=mappl10n.options.iwType=="ib"||this.editable?new mapp.InfoBox(this):new google.maps.InfoWindow,mappl10n.options.directions!="none"&&(o=new mapp.Directions(i.dir,{map:f,directions:mappl10n.options.directions})),this.query){this.options.search?this.places.parse(this.options.search):this.ajaxQuery();return}google.maps.event.addListenerOnce(r,"idle",function(){f.initCenter()});this.setPois(t.pois);this.renderList()};this.action=function(t,f,e){switch(t){case"center":this.toggleView("menu",!1);this.closeInfoWindow();this.recenter();break;case"dir":this.openDirections(null,this.poi);break;case"dir-from":this.openDirections(this.poi,null);break;case"filters-reset":i.filters.find(":input").each(function(){this.type=="checkbox"||this.type=="radio"?n(this).prop("checked",!1):n(this).val("")});this.ajaxQuery(r.getBounds());break;case"filters-toggle":this.toggleView("filters");break;case"geolocate":this.places.geolocate();break;case"layer":h(f);this.toggleView("menu",!1);break;case"menu-toggle":this.toggleView("menu");break;case"open":var o=e.attr("data-mapp-poi");this.openInfoWindow(u[o]);break;case"show":i.layout.show();this.resize();this.initCenter();break;case"viewport-set":this.center=r.getCenter().toJSON();this.zoom=r.getZoom();this.toggleView("menu",!1);break;case"viewport-reset":this.center=null;this.zoom=null;this.toggleView("menu",!1);break;default:return!0}};this.closeInfoWindow=function(){this.iw.close();this.poiSelect(null)};this.openDirections=function(n,t){var i=n?n.getAddress():null,r=t?t.getAddress():null;o.open(i,r)};this.poiSelect=function(t){if(this.poi=t,n("[data-mapp-poi]",i.list).removeClass("mapp-selected"),t){var f=n.inArray(t,u),r=n('[data-mapp-poi="'+f+'"]',i.list);r.addClass("mapp-selected");mapp.lib.scrollTo(i.list,r);s++;t.setZIndex(s)}};this.getMap=function(){return r};this.renderList=function(){this.editable&&(i.list.html(mapp.lib.template("poi-list",{pois:u})),google.maps.event.trigger(this,"rendered"))};this.getPoi=function(n){return n=typeof n=="string"?parseInt(n,10):n,u[n]};this.getPoiById=function(n){for(var t=0;t<u.length;t++)if(u[t].postid==n)return u[t];return null};this.getPois=function(){return u};this.addPoi=function(n){u.unshift(n);n.setMap(this);f.renderList();this.poiSelect(n)};this.removePoi=function(t){var i=n.inArray(t,u);i!=-1&&(u[i].setMap(null),u.splice(i,1),f.renderList())};this.setPois=function(n){for(var i,t=0;t<u.length;t++)u[t].setMap(null);if(u=[],n){for(t=0;t<n.length;t++)i=new mapp.Poi,i.fromJSON(n[t]),u.push(i),i.setMap(this),i.setZIndex(s+n.length-1-t);s+=n.length-1}};this.sortPois=function(n){for(var r,t=Array(),i=0;i<n.length;i++){if(r=parseInt(n[i]),isNaN(r))return!1;t.push(u[r])}if(t.length!=u.length)return!1;u=t;this.renderList()};this.openInfoWindow=function(n,t){if(this.iw){if(o&&o.close(),this.iw.close(),this.poiSelect(n),!this.editable){if(this.options.mashupClick=="post"&&n.postid&&n.url){window.location.assign(n.url);return}this.iw.setContent(n.html)}google.maps.event.addListenerOnce(this.iw,"domready",function(){google.maps.event.trigger(f,"poidomready",n)});google.maps.event.trigger(f,"open",n);var i=new google.maps.MVCObject;i.setValues({position:n.getPosition(t),anchorPoint:n.getAnchorPoint(t)});this.iw.open(r,i)}};this.togglePois=function(n){n=!!n;for(var t=0;t<u.length;t++)u[t].setVisible(n)};this.toggleView=function(n,t){t=typeof t=="undefined"?!i.layout.hasClass("mapp-view-"+n):t;i.layout.toggleClass("mapp-view-"+n,t);n=="menu"&&t&&l()};this.resize=function(){var n=r.getCenter();google.maps.event.trigger(r,"resize");r.setCenter(n);return};this.initCenter=function(){var n=u.length?u[0]:null;google.maps.event.addListenerOnce(r,"idle",function(){if(o&&f.options.initialOpenDirections){f.openDirections(null,n);return}f.options.initialOpenInfo&&n.open()});this.recenter()};this.recenter=function(){var f=!this.query&&this.center?new google.maps.LatLng(this.center.lat,this.center.lng):null,t=!this.query&&this.zoom&&parseInt(this.zoom)?parseInt(this.zoom):null,n,i;if(f){r.setCenter(f);r.setZoom(t?t:1);return}if(u.length==0){r.setCenter(new google.maps.LatLng(0,0));r.setZoom(1);return}if(u.length==1){u[0].center(t);return}for(bounds=new google.maps.LatLngBounds,n=0;n<u.length;n++)i=u[n].getBounds(),bounds=i?bounds.union(i):bounds.extend(u[n].getPosition());r.fitBounds(bounds)};this.toJSON=function(){for(var t={center:this.center,height:this.height,mapid:this.mapid,mapTypeId:r.getMapTypeId(),metaKey:this.metaKey,pois:[],title:this.title,width:this.width,zoom:this.zoom},n=0;n<u.length;n++)t.pois.push(u[n].toJSON());return t};this.ajaxSave=function(n){mapp.lib.ajax({type:"POST",data:{action:"mapp_save",map:JSON.stringify(this),postid:mappl10n.options.postid},callback:function(t){t.status=="OK"&&(f.mapid=t.data.mapid,n(t.data))}})}};mapp.Map.ajaxCreate=function(t,i,r){mapp.lib.ajax({type:"GET",data:{action:"mapp_create"},callback:function(u){if(u.status=="OK"){n.extend(u.data.map.options,i);u.data.map.name=t;var f=new mapp.Map(u.data.map);r(f)}}})};mapp.Map.ajaxGet=function(t,i,r,u){mapp.lib.ajax({type:"GET",data:{action:"mapp_get",mapid:t},callback:function(t){if(t.status=="OK"){n.extend(t.data.map.options,r);t.data.map.name=i;var f=new mapp.Map(t.data.map);u(f)}}})};mapp.Map.ajaxDelete=function(n,t){mapp.lib.ajax({type:"POST",data:{action:"mapp_delete",mapid:n},callback:function(n){n.status=="OK"&&t&&t()}})}}(jQuery);mapp=window.mapp||{};+function(n){mapp.Directions=function(t,i){function h(t,i,o){var c=n(".mapp-travelmode-on > span",r).hasClass("mapp-dir-walk")?google.maps.DirectionsTravelMode.WALKING:n(".mapp-travelmode-on > span",r).hasClass("mapp-dir-transit")?google.maps.DirectionsTravelMode.TRANSIT:n(".mapp-travelmode-on > span",r).hasClass("mapp-dir-bike")?google.maps.DirectionsTravelMode.BICYCLING:google.maps.DirectionsTravelMode.DRIVING;var l={travelMode:c,transitOptions:{departureTime:null},provideRouteAlternatives:!0,origin:t,destination:i},h=n(".mapp-dir-renderer",r).get(0);n(".mapp-dir-renderer",r).empty();s||(s=new google.maps.DirectionsService);s.route(l,function(n,t){switch(t){case google.maps.DirectionsStatus.OK:f.opts.map.togglePois(!1);u?(u.setDirections(n),u.setMap(e),u.setPanel(h)):u=new google.maps.DirectionsRenderer({map:e,panel:h,directions:n,hideRouteList:!1,draggable:!0});break;case google.maps.DirectionsStatus.NOT_FOUND:alert(mappl10n.dir_error);break;case google.maps.DirectionsStatus.ZERO_RESULTS:alert(mappl10n.dir_error);break;default:alert(mappl10n.dir_error+t)}o()})}this.opts=n.extend({map:null,directions:null},i);var r=n(t),e,o,u,s,f=this;e=this.opts.map.getMap();o=new mapp.Geocoder(e);r.on("keydown",function(t){t.which==13?(f.getDirections(n(".mapp-dir-saddr",r).val(),n(".mapp-dir-daddr",r).val()),t.preventDefault()):t.which==27&&f.close()});r.on("click","[data-mapp-action]",function(t){var h=n(this).attr("data-mapp-action"),i,u,e,s;t.preventDefault();switch(h){case"dir-cancel":f.close();break;case"dir-get":f.getDirections();break;case"dir-google":i=n(".mapp-dir-saddr",r).val();u=n(".mapp-dir-daddr",r).val();f.openGoogle(i,u);f.close();break;case"dir-myloc":o.geolocate(function(t){t?n(".mapp-dir-saddr",r).val(t.coords.latitude+", "+t.coords.longitude):alert(mappl10n.no_geolocate)});break;case"dir-swap":e=n(".mapp-dir-daddr",r).val();s=n(".mapp-dir-saddr",r).val();n(".mapp-dir-saddr",r).val(e);n(".mapp-dir-daddr",r).val(s)}});this.open=function(t,i){if(this.opts.directions=="google"){this.openGoogle(t,i);return}this.opts.map.toggleView("directions",!0);n(".mapp-dir-saddr",r).val(t);n(".mapp-dir-daddr",r).val(i);n(".mapp-dir-get",r).focus();n(".mapp-dir-saddr",r).focus()};this.close=function(){this.opts.map.toggleView("directions",!1);u&&(u.setPanel(null),u.getMap()&&(u.setMap(null),this.opts.map.togglePois(!0)))};this.getDirections=function(){this.opts.map.closeInfoWindow();n(".mapp-spinner",r).show();var t=n(".mapp-dir-saddr",r),i=n(".mapp-dir-daddr",r),u=n(".mapp-dir-saddr-err",r),f=n(".mapp-dir-daddr-err",r);o.geocodeField(t,u,function(t){o.geocodeField(i,f,function(i){t&&i?h(t,i,function(){n(".mapp-spinner",r).hide();return}):n(".mapp-spinner",r).hide()})})};this.printDirections=function(){var i,t=n(".mapp-travelmode-on > span",r);i=t.hasClass("mapp-dir-walk")?"w":t.hasClass("mapp-dir-bike")?"b":t.hasClass("mapp-dir-transit")?"r":"d";this.openGoogle(n(".mapp-dir-saddr",r).val(),n(".mapp-dir-daddr",r).val(),i)};this.openGoogle=function(n,t,i){var r=mappl10n.options.directionsServer;r.toLowerCase().indexOf("http")==-1&&(r="https://"+r);r+="?saddr="+encodeURIComponent(n);r+="&daddr="+encodeURIComponent(t);i&&(r+="&dirflg="+i);window.open(r)}}}(jQuery);mapp=window.mapp||{};mapp.Geocoder=function(n){function r(n,t){jQuery(n).removeClass("mapp-error");jQuery(t).hide()}function u(n,t,i){jQuery(n).addClass("mapp-error");jQuery(t).html(i);jQuery(t).show()}var t,f,i=this;f=n;this.geocode=function(i,r){typeof i=="string"&&i.substring(0,1)=="("&&(split=i.replace(/\(|\)/g,"").split(","),i=new google.maps.LatLng(split[0],split[1]));var u=i instanceof google.maps.LatLng?{location:i}:{address:i,region:mappl10n.options.country,bounds:n.getBounds()};t||(t=new google.maps.Geocoder);t.geocode(u,function(n,t){if(n){for(var i=0;i<n.length;i++)n[i].formatted_address==""&&n.splice(i,1);r(n[0],t)}else r(null,t)})};this.geolocate=function(n){if(!navigator||!navigator.geolocation)return null;navigator.geolocation.getCurrentPosition(function(t){n(t)},function(){n(null)},{timeout:1e4,enableHighAccuracy:!0,maximumAge:3e4})};this.stringToLatLng=function(n){var t=n.split(",",2),i=Number(t[0]),r=Number(t[1]);return isNaN(i)||isNaN(r)?!1:new google.maps.LatLng(i,r)};this.geocodeField=function(n,t,i){r(n,t);checkAddress(n,t,jQuery(n).val(),function(r){if(!r){u(n,t,mappl10n.no_address);i(null);return}if(r&&r.formatted_address){jQuery(n).val(r.formatted_address);i(r.formatted_address);return}i(r);return})};this.autocompleteField=function(n,t,f,e,o){jQuery(n).keypress(function(i){i.which==13&&(checkAddress(n,t,jQuery(n).val(),o),i.preventDefault())});jQuery(f).click(function(){return checkAddress(n,t,jQuery(n).val(),o),!1});jQuery(e).click(function(){return r(n,t),i.geolocate(function(i){if(i){var r="("+i.coords.latitude+", "+i.coords.longitude+")";jQuery(n).val("");checkAddress(n,t,r,o)}else u(n,t,mappl10n.no_geolocate);return}),!1})};checkAddress=function(n,t,f,e){if(r(n,t),f=jQuery.trim(f),f==""){e(null);return}var o=i.stringToLatLng(f);if(o){e(o);return}if(f.substring(0,4)=="http"){e(f);return}i.geocode(f,function(i,r){if(!i||r!=google.maps.GeocoderStatus.OK){u(n,t,mappl10n.no_address);e(null);return}e(i);return})}};mapp.Geocoder.parseAddress=function(n){return!n||n==""?{firstLine:"",secondLine:""}:(n.lastIndexOf(", USA")>0||n.lastIndexOf(", United States")>0)&&(n.lastIndexOf(", USA")>0&&(n=n.slice(0,n.lastIndexOf(", USA"))),n.lastIndexOf(", United States")>0&&(n=n.slice(0,n.lastIndexOf(", United States"))),n.indexOf(",")==n.lastIndexOf(","))?{firstLine:n,secondLine:""}:n.indexOf(",")==-1?{firstLine:n,secondLine:""}:{firstLine:n.slice(0,n.indexOf(",")),secondLine:n.slice(n.indexOf(", ")+2)}};mapp=window.mapp||{};mapp.Icons={};mapp.Icons.get=function(){return"https://maps.google.com/intl/en_us/mapfiles/ms/micons/red-dot.png"};mapp.Icons.getUrl=function(){return"https://maps.google.com/intl/en_us/mapfiles/ms/micons/red-dot.png"};mapp=window.mapp||{};+function(n){mapp.InfoBox=function(t,i){var f=n.extend({disableAutoPan:!1,border:20},i),u=null,r=null,e=null,o=this;r=n('<div class="mapp-ib" tabindex="0">').appendTo(t.getMap().getDiv());e=n('<div class="mapp-ib-tip">').appendTo(t.getMap().getDiv());jQuery(window).resize(function(){o.close()});r.on("keydown",function(n){n.which==27&&o.close()});r.on("click",".mapp-close",function(){o.close()});this.getContent=function(){return r};this.setContent=function(n){r.empty().append(n)};this.open=function(n,t){u=t;this.setMap(n)};this.onAdd=function(){r.show();e.show();var t=n(":input",r);t.length?t.first().focus():r.focus();google.maps.event.trigger(o,"domready")};this.draw=function(){var l=this.getMap(),c=this.getProjection().fromLatLngToContainerPixel(u.position),t={width:n(l.getDiv()).width(),height:n(l.getDiv()).height()},v=n(".mapp-ib-body",r);if(!f.disableAutoPan){r.css({"max-height":"9999px",left:0,bottom:0,top:"auto",right:"auto"});var s=r.outerWidth(!0),h=r.outerHeight(!0),a=e.outerHeight(!0),i=c.x,o=c.y;i+s/2>t.width&&(i=t.width-s/2);i-s/2<0&&(i=s/2);o-h+u.anchorPoint.y-a<f.border&&(o=h-u.anchorPoint.y+f.border+a);o>t.height&&(o=t.height);l.panBy(c.x-i,c.y-o);h>t.height+u.anchorPoint.y-2*f.border&&(h=t.height+u.anchorPoint.y-2*f.border,r.css({"max-height":h+2}));r.css({left:i-s/2,bottom:t.height-o-u.anchorPoint.y+a});e.css({left:i,bottom:t.height-o-u.anchorPoint.y})}};this.close=function(){r.is(":visible")&&(this.setMap(null),google.maps.event.trigger(this,"closed"))};this.onRemove=function(){r.hide();e.hide()}};mapp.InfoBox.prototype=new google.maps.OverlayView}(jQuery);mapp=window.mapp||{};+function(n){if(mapp.lib={ajax:function(t){var r=this,u,i;if(n.extend({type:"GET",cache:!1,data:null,spinner:null,callback:n.noop},t),t.cache)for(typeof mapp.lib.ajax.cache=="undefined"&&(mapp.lib.ajax.cache=[]),u=JSON.stringify(t.data),i=0;i<mapp.lib.ajax.cache.length;i++)if(mapp.lib.ajax.cache[i].hash==u){t.callback(mapp.lib.ajax.cache[i].response);return}return t.spinner&&t.spinner.show(),n.ajax({type:t.type,cache:!1,url:mappl10n.options.ajaxurl,data:t.data,success:function(n,i,u){if(t.spinner&&t.spinner.hide(),n.output){r.alert("AJAX Error\r\n"+n.output);return}if(n.status=="OK"){t.cache&&mapp.lib.ajax.cache.push({hash:JSON.stringify(t.data),response:n});t.callback&&t.callback(n,u);return}var f=typeof n=="object"?n.status:n;r.alert("AJAX ERROR\r\nResponse="+f+" TextStatus="+i+"\r\nResponseText="+u.responseText)},error:function(n,i,u){(t.spinner&&t.spinner.hide(),i!="cancel")&&typeof u!="undefined"&&u!=""&&r.alert("AJAX ERROR\r\nTextStatus="+i+"\r\nError="+u+"\r\nResponseText="+n.responseText)}})},alert:function(n){mappl10n.options.admin||mappl10n.options.debug?alert(n):window.console&&console.log(n)},jqVersionCheck:function(t){if(typeof n=="undefined"||typeof t=="undefined")return!1;for(t=t.split("."),v=n.fn.jquery.split("."),i=0;i<t.length;i++){var r=parseInt(t[i]),u=typeof v[i]!="undefined"?parseInt(v[i]):0;if(u!=r)return u>r}return!0},log:function(n){window.console&&console.log(n)},scrollTo:function(n,t){if(n&&t&&n.length&&t.length){var i=n.scrollTop(),u=n.height(),r=i+t.position().top,f=r+t.outerHeight(!0);r<i?n.scrollTop(r):f>i+u&&n.scrollTop(f-u)}},template:function(t,i){if(mapp.lib.templates=mapp.lib.templates?mapp.lib.templates:{},!mapp.lib.templates[t]){var r=mappl10n.options.templates?mappl10n.options.template[t]:n("#mapp-tmpl-"+t).html();if(r)mapp.lib.templates[t]=_.template(n.trim(r),null,{evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g});else return""}return mapp.lib.templates[t](i)}},typeof google=="undefined")return mapp.lib.alert("ERROR: Google Maps API not loaded");if(!mappl10n.options.apiKey)return mapp.lib.alert("ERROR: Google Maps API Key missing, please check MapPress settings and FAQ");n(document).ready(function(){n('script[src*="https://maps.googleapis.com/maps/api/js"]').length>1&&mapp.lib.alert("ERROR: Google Maps API key loaded multiple times, please see MapPress FAQ.")});mapp.lib.jqVersionCheck("1.7")||mapp.lib.alert("jQuery version is too old: "+n.fn.jquery);n("body").on("tabsactivate tabsshow",function(t,i){var r=i.newPanel?i.newPanel:i.panel;r&&n(".mapp-canvas",r).each(function(){var i=n(this).attr("id"),t=window[i];t.resize();t.initCenter()})})}(jQuery);mapp=window.mapp||{};+function(n){mapp.Places=function(t,i){var u=this,r;if(this.sel=n(t),this.opts=n.extend({map:null,types:[]},i),r=n('<div style="display:none">').appendTo("body"),this.placesService=new google.maps.places.PlacesService(r.get(0)),this.autocompleteService=new google.maps.places.AutocompleteService,this.sel.length){this.opts.types||(this.opts.types=[]);this.autocomplete=new google.maps.places.Autocomplete(this.sel.get(0),{types:this.opts.types});this.autocomplete.bindTo("bounds",this.opts.map.getMap());this.sel.on("keydown",function(n){if(n.which==13)return!1});google.maps.event.addListener(this.autocomplete,"place_changed",function(){u.parse(this.getPlace())})}};mapp.Places.prototype={parse:function(t){var u,i=this,r;if(this.error(!1),r=t&&t.name?n.trim(t.name):n.trim(t),!r)return this.error(!0);if(r=="geolocate")return this.geolocate();if(r.substring(0,4)=="http"||r.substring(0,3)=="kml"&&typeof typenow!="undefined"&&typenow=="mappress_map"){google.maps.event.trigger(i,"search",r=="kml"?"http://googlemaps.github.io/js-v2-samples/ggeoxml/cta.kml":r);return}if(t&&t.geometry){t.formatted_address&&this.set(t.formatted_address);google.maps.event.trigger(i,"search",t);return}if(latLngLoc=this.parseLatLng(t)){google.maps.event.trigger(i,"search",latLngLoc);return}this.autocompleteService.getPlacePredictions({input:r,types:this.opts.types,bounds:this.opts.map.getMap().getBounds()},function(n,t){if(t!="OK"||n==null||n.length==0)return i.error(!0);u=typeof n[0].description!="undefined"?n[0].description:null;i.placesService.getDetails({placeId:n[0].place_id},function(n,t){if(t!="OK"||!n||!n.geometry)return i.error(!0);u=u?u:n.formatted_address;i.set(u);google.maps.event.trigger(i,"search",n)})})},parseLatLng:function(t){var i,r;return t instanceof google.maps.LatLng?i=t:t&&t.lat&&t.lng?i=new google.maps.LatLng(t.lat,t.lng):(name=t&&t.name?n.trim(t.name):n.trim(t),r=name.split(","),r.length!=2||isNaN(r[0])||isNaN(r[1])||(i=new google.maps.LatLng(r[0],r[1]))),i?{name:i.toUrlValue(),geometry:{location:i}}:null},geolocate:function(){var n=this;if(!navigator||!navigator.geolocation){alert(mappl10n.no_geolocate);return}navigator.geolocation.getCurrentPosition(function(t){n.set("");var i=new google.maps.LatLng(t.coords.latitude,t.coords.longitude),r={name:i.toUrlValue(),geometry:{location:i}};google.maps.event.trigger(n,"search",r)},function(){alert(mappl10n.no_geolocate)},{timeout:1e4,enableHighAccuracy:!0,maximumAge:3e4})},set:function(n){n=n.replace(", United States of America","").replace(", USA","").replace(", United States","");this.sel.blur();this.sel.val(n);this.sel.blur();this.error(!1)},get:function(){return n.trim(this.sel.val())},focus:function(){this.sel.focus()},error:function(n){this.sel.toggleClass("mapp-error",!!n)}}}(jQuery);mapp=window.mapp||{};+function(n){mapp.Poi=function(){this.address=null;this.body=null;this.html=null;this.iconid=null;this.kml=null;this.map=null;this.overlay=null;this.postid=null;this.title="";this.url=null;this.type=null;this.viewport=null;for(var n in arguments[0])typeof arguments[0][n]!="undefined"&&(this[n]=arguments[0][n])};mapp.Poi.prototype={fromJSON:function(n){var u,f,i,o,t,r,s,e;this.address=n.correctedAddress;this.body=n.body;this.correctedAddress=n.correctedAddress;this.html=n.html;this.iconid=n.iconid;this.kml=n.kml;this.postid=n.postid;this.title=n.title;this.type=n.type;this.url=n.url;n.viewport&&n.viewport.sw&&n.viewport.ne&&(u=new google.maps.LatLng(n.viewport.sw.lat,n.viewport.sw.lng),f=new google.maps.LatLng(n.viewport.ne.lat,n.viewport.ne.lng),this.viewport=u.lat()==0&&u.lng()==0&&f.lat()==0&&f.lng()==0?null:new google.maps.LatLngBounds(u,f));i=[];o=[];switch(this.type){case"polygon":if(n.poly&&n.poly.paths)for(t=0;t<n.poly.paths.length;t++){for(i=[],r=0;r<n.poly.paths[t].length;r++)i.push(new google.maps.LatLng(n.poly.paths[t][r].lat,n.poly.paths[t][r].lng));o.push(new google.maps.MVCArray(i))}this.overlay=new google.maps.Polygon({paths:new google.maps.MVCArray(o)});this.setColors(n.poly);break;case"polyline":if(n.poly&&n.poly.path)for(t=0;t<n.poly.path.length;t++)i.push(new google.maps.LatLng(n.poly.path[t].lat,n.poly.path[t].lng));this.overlay=new google.maps.Polyline({path:new google.maps.MVCArray(i)});this.setColors(n.poly);break;case"circle":e=new google.maps.LatLng(n.point.lat,n.point.lng);this.overlay=new google.maps.Circle({center:e,radius:parseFloat(n.poly.radius)});this.setColors(n.poly);break;case"rectangle":this.overlay=new google.maps.Rectangle({bounds:this.viewport});this.setColors(n.poly);break;case"kml":s=n.kml&&n.kml.url?n.kml.url:"";this.overlay=new google.maps.KmlLayer(s,{preserveViewport:!0,suppressInfoWindows:!0});break;case"":default:e=new google.maps.LatLng(n.point.lat,n.point.lng);this.overlay=new google.maps.Marker({position:e})}},toJSON:function(){var n={address:this.address,body:this.body,correctedAddress:this.address,iconid:this.iconid,point:null,poly:null,title:this.title,type:this.type,viewport:null},r=this.getPosition(),t,i;if(n.point={lat:r.lat(),lng:r.lng()},t=this.viewport?this.viewport:this.getBounds(),t&&(n.viewport={sw:{lat:t.getSouthWest().lat(),lng:t.getSouthWest().lng()},ne:{lat:t.getNorthEast().lat(),lng:t.getNorthEast().lng()}}),this.type=="kml"&&(n.kml={url:this.overlay.getUrl()}),this.isPoly()){n.poly=this.getColors();switch(this.type){case"circle":n.poly.radius=this.overlay.getRadius();break;case"polyline":n.poly.path=[];this.overlay.getPath().forEach(function(t){n.poly.path.push({lat:t.lat(),lng:t.lng()})});break;case"polygon":n.poly.paths=[];this.overlay.getPaths().forEach(function(t){var i=[];t.forEach(function(n){i.push({lat:n.lat(),lng:n.lng()})});n.poly.paths.push(i)});break;case"rectangle":i=this.overlay.getBounds();n.viewport={sw:{lat:i.getSouthWest().lat(),lng:i.getSouthWest().lng()},ne:{lat:i.getNorthEast().lat(),lng:i.getNorthEast().lng()}}}}return n},setMap:function(t){var i=this;if(google.maps.event.clearInstanceListeners(this.overlay),t==null){this.overlay.setMap(null);return}this.type=="kml"&&(google.maps.event.addListener(this.overlay,"defaultviewport_changed",function(){i.viewport=i.overlay.getDefaultViewport()}),google.maps.event.addListener(this.overlay,"status_changed",function(){var n=i.overlay.getStatus();n!="OK"&&mappl10n.ajaxErrors&&alert(mappl10n.kml_error+":"+n)}));this.map=t;this.overlay.setMap(t.getMap());this.setEditable(this.map.editable);this.setIcon(this.iconid);this.type||this.overlay.setTitle(n("<div>").html(this.title).text());google.maps.event.addListener(this.overlay,"click",function(n){i.open(n)})},setEditable:function(n){var t=this;this.type!="kml"&&(this.overlay.setDraggable(n),this.isPoly()&&this.overlay.setEditable(n),google.maps.event.clearListeners(this.overlay,"rightclick"),google.maps.event.clearListeners(this.overlay,"dragstart"),n&&(google.maps.event.addListener(this.overlay,"dragstart",function(){t.viewport=null;t.map.closeInfoWindow()}),(this.type=="polygon"||this.type=="polyline")&&google.maps.event.addListener(this.overlay,"rightclick",function(n){n.vertex!=null&&t.overlay.getPath().getLength()>2&&t.overlay.getPath().removeAt(n.vertex)})))},getZIndex:function(){return this.type?this.overlay.zIndex:this.overlay.getZIndex()},setZIndex:function(n){this.type?this.overlay.zIndex=n:this.overlay.setZIndex(n)},setIcon:function(n){this.type||typeof mapp.Icons=="undefined"||(this.overlay.setIcon(null),this.overlay.setIcon(mapp.Icons.get(n)),this.iconid=n)},setVisible:function(n){typeof this.overlay.setVisible!="undefined"&&this.overlay.setVisible(n)},setColors:function(n){var i={};for(var t in{strokeColor:"",strokeOpacity:"",strokeWeight:"",fillColor:"",fillOpacity:""})n&&typeof n[t]!="undefined"&&(i[t]=n[t]);this.overlay.setOptions(i)},getColors:function(){var t={};for(var n in{strokeColor:"",strokeOpacity:"",strokeWeight:"",fillColor:"",fillOpacity:""})typeof this.overlay[n]!="undefined"&&(t[n]=this.overlay[n]);return t},center:function(n){var t=this.map.getMap(),i=this.getBounds();if(typeof n=="number"){t.setCenter(this.getPosition());t.setZoom(n);return}i?(t.fitBounds(i),t.setCenter(this.getPosition())):(t.setCenter(this.getPosition()),t.setZoom(parseInt(mappl10n.options.poiZoom)))},open:function(n){this.map.openInfoWindow(this,n)},isPoly:function(){return jQuery.inArray(this.type,["polyline","polygon","circle","rectangle"])!=-1},getBounds:function(){var n;if(!this.map.editable&&this.viewport)return this.viewport;switch(this.type){case"polyline":n=new google.maps.LatLngBounds;this.overlay.getPath().forEach(function(t){n.extend(t)});break;case"polygon":n=new google.maps.LatLngBounds;this.overlay.getPaths().forEach(function(t){t.forEach(function(t){n.extend(t)})});break;case"rectangle":case"circle":n=this.overlay.getBounds();break;case"kml":n=this.overlay.getDefaultViewport();n=n?n:this.viewport;break;default:return this.viewport?this.viewport:null}return n},getPosition:function(n){if(!this.type)return this.overlay.getPosition();if(this.type=="kml"&&n&&n.latLng)return n.latLng;var t=this.getBounds();return t?t.getCenter():new google.maps.LatLng(0,0)},click:function(){google.maps.event.trigger(this.overlay,"click")},getAddress:function(){return this.address?this.address:this.type=="kml"?this.kml.url:this.getPosition().toUrlValue()},getAnchorPoint:function(n){return this.type=="kml"?n&&n.pixelOffset?new google.maps.Point(n.pixelOffset.width,n.pixelOffset.height):new google.maps.Point(0,0):this.type?new google.maps.Point(0,0):typeof this.overlay.anchorPoint!="undefined"?this.overlay.anchorPoint:new google.maps.Point(0,-32)}}}(jQuery);mapp=window.mapp||{};mapp.widgets={};+function(){mapp.load=function(){if(typeof mapp!="undefined"&&mapp.data)while(mapp.data.length){var n=mapp.data.pop(),t=new mapp.Map(n);window[n.name]=t;t.display()}}}(jQuery);typeof mapp.Media!="undefined"?window.mappEditor=new mapp.Media:mapp.load()
|
js/mappress_editor.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var mapp=window.mapp||{};+function(n){mapp.Media=function(){function f(r){t=r;n(".mapp-edit").empty();n(".mapp-edit").append(u.clone());var f=t.mapid;f?n("#mapp_m_mapid").text(f):n("#mapp_m_mapid").text("");n("#mapp_m_title").val(t.title);n("#mapp_m_width").val(t.width);n("#mapp_m_height").val(t.height);n("
|
1 |
+
var mapp=window.mapp||{};+function(n){mapp.Media=function(){function f(r){t=r;n(".mapp-edit").empty();n(".mapp-edit").append(u.clone());var f=t.mapid;f?n("#mapp_m_mapid").text(f):n("#mapp_m_mapid").text("");n("#mapp_m_title").val(t.title);n("#mapp_m_width").val(t.width);n("#mapp_m_height").val(t.height);n("#mapp_m_edit_panel").show();n("#mapp_m_list_panel").hide();i=new mapp.Editor(t)}function e(){i.close();t=null;i=null;n("#mapp_m_edit_panel").hide();n("#mapp_m_list_panel").show()}function s(){mapp.Map.ajaxCreate("mapp0",r,function(n){f(n)})}function h(n){mapp.Map.ajaxGet(n,"mapp0",r,function(n){f(n)})}function c(n){var t='[mappress mapid="'+n+'"]';send_to_editor(t)}function o(){t&&(t.title=n.trim(n("#mapp_m_title").val()),t.width=n("#mapp_m_width").val(),t.height=n("#mapp_m_height").val(),t.ajaxSave(function(t){t.list&&n("#mapp_m_maplist").html(t.list);e()}))}function l(t){confirm(mappl10n.delete_map_prompt)&&(n("#mapp_m_maplist tr[data-mapid='"+t+"']").remove(),mapp.Map.ajaxDelete(t))}var i,t,u,a=n(".mapp-m-panel"),v=this,r;u=n(".mapp-edit").contents().detach();r={directions:"none",editable:!0,initialOpenInfo:!1};n("#mapp_m_list_panel").show();n("#mapp_m_add_map").click(function(n){s();n.preventDefault()});n("#mapp_m_maplist").on("click","tr",function(t){var i=n(this).attr("data-mapid");n(t.target).hasClass("mapp-maplist-edit")&&h(i);n(t.target).hasClass("mapp-maplist-delete")&&l(i);n(t.target).hasClass("mapp-maplist-insert")&&c(i);t.preventDefault()});n(".mapp-m-size").click(function(t){var i=n(this).data("width"),r=n(this).data("height");n("#mapp_m_width").val(i);n("#mapp_m_height").val(r);t.preventDefault()});n("#publish, #post-preview").click(function(){o()});n("#mapp_m_save").click(function(n){o();n.preventDefault()});n("#mapp_m_title").keydown(function(t){t.which==13&&(t.preventDefault(),n("#mapp_m_save").click())});n("#mapp_m_cancel").click(function(n){e();n.preventDefault()});n("#mapp_m_insert").click(function(n){var i=t.mapid,r='[mappress mapid="'+t.mapid+'"]';i?send_to_editor(r):alert(mappl10n.save_first);n.preventDefault()});this.getMap=function(){return t}}}(jQuery);+function(n){mapp.Editor=function(t){function o(){i.display();r=new mapp.PoiEditor(i);google.maps.event.addListener(i,"rendered",function(){n(".mapp-list",e).toggle(!!i.getPois().length);i.resize()});n("#mapp_e_poi_list").on("click","[data-mapp-action]",function(t){var i=n(this).attr("data-mapp-action");me.action(i,n(this).attr("data-mapp-"+i),n(this));t.preventDefault()});n(".mapp-pois",e).sortable({axis:"y",cursor:"move",delay:200,update:function(){i.sortPois(n(this).sortable("toArray",{attribute:"data-mapp-poi"}))}});_geocoder=new mapp.Geocoder(i.getMap());_geocoder.autocompleteField("#mapp_e_saddr","#mapp_e_saddr_err","#mapp_e_search","#mapp_e_myloc",s);n("#mapp_e_recenter").click(function(n){i.closeInfoWindow();i.autoCenter(!0);n.preventDefault()});google.maps.event.addListener(i.getMap(),"click",function(t){n("#mapp_e_latlng").text(t.latLng.toUrlValue())})}function s(n){if(n){if(n.geometry){var t=mapp.Geocoder.parseAddress(n.formatted_address),i=n.name?n.name:t.firstLine,f=n.name?t.firstLine+", "+t.secondLine:t.secondLine,e=new mapp.Poi({address:n.formatted_address,body:f,iconid:r.lastIcon,overlay:new google.maps.Marker({position:n.geometry.location}),title:i,type:null,viewport:n.geometry.viewport?n.geometry.viewport:null});u(e,!0);return}if(n instanceof google.maps.LatLng)return h(n);alert("Internal error, unable to add location")}}function h(n){poi=new mapp.Poi({body:"",iconid:r.lastIcon,overlay:new google.maps.Marker({position:n}),title:n.toUrlValue(6)});u(poi,!0)}function u(n,t){i.closeInfoWindow();f&&f.setDrawingMode(null);i.addPoi(n);t&&n.center(!0)}var f,i=t,r,e=n(".mapp-edit");this.close=function(){i.closeInfoWindow()};o.apply(this)};mapp.PoiEditor=function(t){function h(){u=i.iw.getContent();google.maps.event.addListener(i,"open",f.render);google.maps.event.addListener(i.iw,"domready",f.domReady);google.maps.event.addListener(i.iw,"closed",function(){tinyMCE.get("mapp-poi-body")&&s()});u.on("click","[data-mapp-action]",function(t){t.preventDefault();var r=n(this).attr("data-mapp-action");switch(r){case"poi-cancel":i.closeInfoWindow();break;case"poi-html":s();e=!1;break;case"poi-remove":f.remove();break;case"poi-save":f.save();break;case"poi-visual":o();e=!0}});u.on("keydown",function(t){t.which==13&&t.target!=n("#mapp-poi-body")&&(t.preventDefault(),f.save())});u.on("change","[data-mapp-iconpicker]",function(){r.setIcon(n("[data-mapp-iconpicker]").attr("data-mapp-iconid"));this.lastIcon=r.iconid;i.renderList()});u.on("change","[data-mapp-colorpicker]",function(){var t=n("[data-mapp-colorpicker]").attr("data-mapp-color"),u=n("[data-mapp-colorpicker]").attr("data-mapp-opacity"),f=n("[data-mapp-colorpicker]").attr("data-mapp-weight"),e=r.type=="polyline"?{strokeColor:t,strokeOpacity:u/100,strokeWeight:f}:{fillColor:t,fillOpacity:u/100,strokeColor:t,strokeWeight:f,strokeOpacity:1};r.setColors(e);i.renderList()})}function c(){typeof tinyMCE!="undefined"&&typeof tinyMCE.init!="undefined"&&(l(),e&&o())}function l(){var t="en",n,i;typeof tinyMCEPreInit!="undefined"&&typeof window.tinyMCEPreInit.mceInit!="undefined"&&typeof window.tinyMCEPreInit.mceInit.content!="undefined"&&(n=window.tinyMCEPreInit.mceInit.content,t=typeof n.language!="undefined"?n.language:"en");i={mode:"none",height:"75px",convert_urls:!1,language:t,menubar:!1,plugins:"wordpress,paste,wplink,textcolor,image",relative_urls:!1,remove_script_host:!1,statusbar:!1,theme:"modern",toolbar1:"bold,italic,link,unlink,image",toolbar2:"",toolbar3:"",toolbar4:""};tinyMCE.init(i)}function o(){tinyMCE.execCommand("mceAddEditor",!1,"mapp-poi-body")}function s(){tinyMCE.execCommand("mceRemoveEditor",!1,"mapp-poi-body")}var e=!0,i=t,r,u,f;this.lastIcon=null;f=this;this.render=function(){var t;r=i.poi;r.isPoly()&&(t=r.getColors(),t=r.type=="polyline"?{color:t.strokeColor,opacity:t.strokeOpacity*100,weight:t.strokeWeight}:{color:t.fillColor,opacity:t.fillOpacity*100,weight:t.strokeWeight});u.html(mapp.lib.template("poi-edit",{poi:r,colors:t}));n("[data-mapp-iconpicker]").trigger("refresh");n("[data-mapp-colorpicker]").trigger("refresh")};this.domReady=function(){c()};this.remove=function(){confirm(mappl10n.delete_prompt)&&(i.closeInfoWindow(),i.removePoi(r))};this.save=function(){tinyMCE.get("mapp-poi-body")&&tinyMCE.get("mapp-poi-body").save();r.title=n(".mapp-poi-title").val();r.body=n(".mapp-poi-body").val();i.renderList();i.closeInfoWindow()};h.apply(this)}}(jQuery)
|
js/mappress_settings.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
+function(n){function t(i){i=i?i:0;i==0&&n(".mapp-log").empty();mapp.lib.ajax({data:{action:"mapp_import"},callback:function(i){n(".mapp-log").append(i.data.log.join("<br/>"),"<br/>");i.data.start>=0?t(i.data.start):n(".mapp-spinner").hide()}})}n(document).ready(function(){new mapp.widgets.IconPicker;n(document).on("focus",".mapp-expand",function(){n(this).parent().width("100%");n(this).attr("rows",20)});n(document).on("blur",".mapp-expand",function(){n(this).parent().width("auto");n(this).attr("rows",1)});n(".mapp-autoicons").on("change","#mapp-autoicons-key",function(){mapp.lib.ajax({data:{action:"mapp_autoicons_form",key:n(this).val()},callback:function(t){n(".mapp-autoicons").html(t.data);new mapp.widgets.Grid(n("[data-mapp-grid]",".mapp-autoicons"))}})});n(".mapp-confirm").on("change",function(){var t=n(".mapp-confirm").is(":checked");n(".mapp-import").prop("disabled",!t)});n(".mapp-import").on("click",function(){n(".mapp-confirm, .mapp-import").prop("disabled",!0);t()})})}(jQuery)
|
1 |
+
+function(n){function t(i){i=i?i:0;i==0&&n(".mapp-log").empty();mapp.lib.ajax({data:{action:"mapp_import"},callback:function(i){n(".mapp-log").append(i.data.log.join("<br/>"),"<br/>");i.data.start>=0?t(i.data.start):n(".mapp-spinner").hide()}})}n(document).ready(function(){new mapp.widgets.IconPicker;n(document).on("focus",".mapp-expand",function(){n(this).parent().width("100%");n(this).attr("rows",20)});n(document).on("blur",".mapp-expand",function(){n(this).parent().width("auto");n(this).attr("rows",1)});n(".mapp-autoicons").on("change","#mapp-autoicons-key",function(){mapp.lib.ajax({data:{action:"mapp_autoicons_form",key:n(this).val()},callback:function(t){n(".mapp-autoicons").html(t.data);new mapp.widgets.Grid(n("[data-mapp-grid]",".mapp-autoicons"))}})});jQuery("#mapp-filters tbody").sortable({handle:".mapp-handle"});n(".mapp-confirm").on("change",function(){var t=n(".mapp-confirm").is(":checked");n(".mapp-import").prop("disabled",!t)});n(".mapp-import").on("click",function(){n(".mapp-confirm, .mapp-import").prop("disabled",!0);t()})})}(jQuery)
|
languages/mappress-google-maps-for-wordpress.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the same license as the MapPress Easy Google Maps package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: MapPress Easy Google Maps 2.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mappress-google-maps-for-wordpress\n"
|
7 |
-
"POT-Creation-Date: 2017-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -16,63 +16,31 @@ msgstr ""
|
|
16 |
msgid "Add POI"
|
17 |
msgstr ""
|
18 |
|
19 |
-
#: forms/map_editor.php:12 languages/texts.php:3
|
20 |
-
#: templates/map_directions.php:11
|
21 |
msgid "My location"
|
22 |
msgstr ""
|
23 |
|
24 |
-
#: forms/map_editor.php:
|
25 |
-
#: templates/map_controls.php:4
|
26 |
-
msgid "Center map"
|
27 |
-
msgstr ""
|
28 |
-
|
29 |
-
#: forms/map_editor.php:27 languages/texts.php:5
|
30 |
-
msgid "Click map for lat/lng: "
|
31 |
-
msgstr ""
|
32 |
-
|
33 |
-
#: forms/map_editor.php:50 forms/map_editor_infobox.php:33
|
34 |
-
#: languages/texts.php:10
|
35 |
msgid "Visual"
|
36 |
msgstr ""
|
37 |
|
38 |
-
#: forms/map_editor.php:
|
39 |
-
#: languages/texts.php:11
|
40 |
msgid "HTML"
|
41 |
msgstr ""
|
42 |
|
43 |
-
#: forms/map_editor.php:
|
44 |
-
#: forms/map_media.php:41 languages/texts.php:12
|
45 |
msgid "Save"
|
46 |
msgstr ""
|
47 |
|
48 |
-
#: forms/map_editor.php:
|
49 |
-
#: forms/map_media.php:42 languages/texts.php:13
|
50 |
msgid "Cancel"
|
51 |
msgstr ""
|
52 |
|
53 |
-
#: forms/map_editor.php:
|
54 |
-
#:
|
55 |
msgid "Delete"
|
56 |
msgstr ""
|
57 |
|
58 |
-
#: forms/map_editor_infobox.php:20 languages/texts.php:6
|
59 |
-
msgid "Color"
|
60 |
-
msgstr ""
|
61 |
-
|
62 |
-
#: forms/map_editor_infobox.php:22 forms/map_editor_infobox.php:23
|
63 |
-
#: languages/texts.php:7 pro/mappress_icons.php:57
|
64 |
-
msgid "Opacity"
|
65 |
-
msgstr ""
|
66 |
-
|
67 |
-
#: forms/map_editor_infobox.php:24 languages/texts.php:8
|
68 |
-
msgid "Line"
|
69 |
-
msgstr ""
|
70 |
-
|
71 |
-
#: forms/map_editor_infobox.php:25 languages/texts.php:9
|
72 |
-
#: pro/mappress_icons.php:58
|
73 |
-
msgid "Weight"
|
74 |
-
msgstr ""
|
75 |
-
|
76 |
#: forms/map_media.php:4 languages/texts.php:14
|
77 |
msgid "Maps for This Post"
|
78 |
msgstr ""
|
@@ -89,39 +57,59 @@ msgstr ""
|
|
89 |
msgid "Map Title"
|
90 |
msgstr ""
|
91 |
|
|
|
|
|
|
|
|
|
92 |
#: forms/map_media.php:24
|
93 |
msgid "Display Size"
|
94 |
msgstr ""
|
95 |
|
96 |
-
#: forms/map_media.php:
|
97 |
-
msgid "
|
98 |
msgstr ""
|
99 |
|
100 |
-
#:
|
101 |
-
msgid "
|
102 |
msgstr ""
|
103 |
|
104 |
-
#:
|
105 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
msgstr ""
|
107 |
|
108 |
#: languages/texts.php:18
|
109 |
msgid "Size"
|
110 |
msgstr ""
|
111 |
|
112 |
-
#: languages/texts.php:20 mappress.php:
|
113 |
msgid "Version"
|
114 |
msgstr ""
|
115 |
|
116 |
-
#: languages/texts.php:21 mappress.php:
|
117 |
msgid "Documentation"
|
118 |
msgstr ""
|
119 |
|
120 |
-
#: languages/texts.php:22 mappress.php:
|
121 |
msgid "Support"
|
122 |
msgstr ""
|
123 |
|
124 |
-
#: languages/texts.php:23 mappress.php:
|
125 |
msgid "Upgrade to MapPress Pro"
|
126 |
msgstr ""
|
127 |
|
@@ -149,8 +137,7 @@ msgstr ""
|
|
149 |
msgid "MapPress Settings"
|
150 |
msgstr ""
|
151 |
|
152 |
-
#: languages/texts.php:30 templates/
|
153 |
-
#: templates/map_directions.php:6
|
154 |
msgid "Bicycling"
|
155 |
msgstr ""
|
156 |
|
@@ -158,109 +145,104 @@ msgstr ""
|
|
158 |
msgid "Bike"
|
159 |
msgstr ""
|
160 |
|
161 |
-
#: languages/texts.php:32
|
162 |
msgid "One of the addresses could not be found."
|
163 |
msgstr ""
|
164 |
|
165 |
-
#: languages/texts.php:33 mappress.php:
|
166 |
msgid "Google cannot return directions between those addresses. There is no route between them or the routing information is not available."
|
167 |
msgstr ""
|
168 |
|
169 |
-
#: languages/texts.php:34
|
170 |
msgid "Unknown error, unable to return directions. Status code = "
|
171 |
msgstr ""
|
172 |
|
173 |
-
#: languages/texts.php:35
|
174 |
-
#: mappress_poi.php:201 mappress_settings.php:104
|
175 |
msgid "Directions"
|
176 |
msgstr ""
|
177 |
|
178 |
-
#: languages/texts.php:36 mappress.php:
|
179 |
msgid "Error reading KML file"
|
180 |
msgstr ""
|
181 |
|
182 |
-
#: languages/texts.php:37
|
183 |
msgid "Loading..."
|
184 |
msgstr ""
|
185 |
|
186 |
-
#: languages/texts.php:38 mappress.php:
|
187 |
msgid "No matching address"
|
188 |
msgstr ""
|
189 |
|
190 |
-
#: languages/texts.php:39 mappress.php:
|
191 |
msgid "Unable to get your location"
|
192 |
msgstr ""
|
193 |
|
194 |
-
#: languages/texts.php:40 templates/
|
195 |
msgid "Traffic"
|
196 |
msgstr ""
|
197 |
|
198 |
-
#: languages/texts.php:41 templates/
|
199 |
msgid "Transit"
|
200 |
msgstr ""
|
201 |
|
202 |
-
#: languages/texts.php:42
|
203 |
#: pro/mappress_widget.php:94
|
204 |
msgid "Zoom"
|
205 |
msgstr ""
|
206 |
|
207 |
-
#: languages/texts.php:43
|
208 |
msgid "Add"
|
209 |
msgstr ""
|
210 |
|
211 |
-
#: languages/texts.php:44
|
212 |
msgid "Click & drag to move"
|
213 |
msgstr ""
|
214 |
|
215 |
-
#: languages/texts.php:45
|
216 |
msgid "Click to change"
|
217 |
msgstr ""
|
218 |
|
219 |
-
#: languages/texts.php:47 mappress.php:
|
220 |
msgid "Delete this POI?"
|
221 |
msgstr ""
|
222 |
|
223 |
-
#: languages/texts.php:48 mappress.php:
|
224 |
msgid "Delete this map?"
|
225 |
msgstr ""
|
226 |
|
227 |
-
#: languages/texts.php:49
|
228 |
msgid "Please save the map first"
|
229 |
msgstr ""
|
230 |
|
231 |
-
#: languages/texts.php:50 mappress.php:
|
232 |
msgid "Shape"
|
233 |
msgstr ""
|
234 |
|
235 |
-
#: languages/texts.php:51 mappress.php:591
|
236 |
-
msgid "Untitled"
|
237 |
-
msgstr ""
|
238 |
-
|
239 |
#: languages/texts.php:52
|
240 |
msgid "New"
|
241 |
msgstr ""
|
242 |
|
243 |
-
#: languages/texts.php:53 mappress_map.php:
|
244 |
msgid "Map not found"
|
245 |
msgstr ""
|
246 |
|
247 |
-
#: languages/texts.php:54 mappress_map.php:
|
248 |
msgid "Edit"
|
249 |
msgstr ""
|
250 |
|
251 |
-
#: languages/texts.php:55 mappress_map.php:
|
252 |
msgid "Show map"
|
253 |
msgstr ""
|
254 |
|
255 |
-
#: languages/texts.php:56
|
256 |
msgid "Reset map"
|
257 |
msgstr ""
|
258 |
|
259 |
-
#: languages/texts.php:57
|
260 |
msgid "Bigger map"
|
261 |
msgstr ""
|
262 |
|
263 |
-
#: languages/texts.php:58
|
264 |
msgid "Smaller map"
|
265 |
msgstr ""
|
266 |
|
@@ -272,11 +254,11 @@ msgstr ""
|
|
272 |
msgid "Directions from"
|
273 |
msgstr ""
|
274 |
|
275 |
-
#: languages/texts.php:61 mappress_settings.php:
|
276 |
msgid "Basic Settings"
|
277 |
msgstr ""
|
278 |
|
279 |
-
#: languages/texts.php:62 mappress_settings.php:
|
280 |
msgid "Post types"
|
281 |
msgstr ""
|
282 |
|
@@ -316,7 +298,7 @@ msgstr ""
|
|
316 |
msgid "Map controls"
|
317 |
msgstr ""
|
318 |
|
319 |
-
#: languages/texts.php:72 mappress_settings.php:
|
320 |
msgid "Map Settings"
|
321 |
msgstr ""
|
322 |
|
@@ -324,15 +306,15 @@ msgstr ""
|
|
324 |
msgid "Map links"
|
325 |
msgstr ""
|
326 |
|
327 |
-
#: languages/texts.php:74 mappress_settings.php:
|
328 |
msgid "Map alignment"
|
329 |
msgstr ""
|
330 |
|
331 |
-
#: languages/texts.php:75 mappress_settings.php:
|
332 |
msgid "Open first POI"
|
333 |
msgstr ""
|
334 |
|
335 |
-
#: languages/texts.php:76 mappress_settings.php:
|
336 |
msgid "POI Settings"
|
337 |
msgstr ""
|
338 |
|
@@ -344,39 +326,39 @@ msgstr ""
|
|
344 |
msgid "Tooltips"
|
345 |
msgstr ""
|
346 |
|
347 |
-
#: languages/texts.php:79 mappress_settings.php:
|
348 |
msgid "Default zoom"
|
349 |
msgstr ""
|
350 |
|
351 |
-
#: languages/texts.php:80 mappress_settings.php:
|
352 |
msgid "Mashups"
|
353 |
msgstr ""
|
354 |
|
355 |
-
#: languages/texts.php:81 mappress_settings.php:
|
356 |
msgid "Icons"
|
357 |
msgstr ""
|
358 |
|
359 |
-
#: languages/texts.php:82 mappress_settings.php:
|
360 |
msgid "Styled Maps"
|
361 |
msgstr ""
|
362 |
|
363 |
-
#: languages/texts.php:83 mappress_settings.php:
|
364 |
msgid "Geocoding"
|
365 |
msgstr ""
|
366 |
|
367 |
-
#: languages/texts.php:84 mappress_settings.php:
|
368 |
msgid "Localization"
|
369 |
msgstr ""
|
370 |
|
371 |
-
#: languages/texts.php:85 mappress_settings.php:
|
372 |
msgid "Language"
|
373 |
msgstr ""
|
374 |
|
375 |
-
#: languages/texts.php:86 mappress_settings.php:
|
376 |
msgid "Country"
|
377 |
msgstr ""
|
378 |
|
379 |
-
#: languages/texts.php:87 mappress_settings.php:
|
380 |
msgid "Directions server"
|
381 |
msgstr ""
|
382 |
|
@@ -384,15 +366,15 @@ msgstr ""
|
|
384 |
msgid "Directions units"
|
385 |
msgstr ""
|
386 |
|
387 |
-
#: languages/texts.php:89 mappress_settings.php:
|
388 |
msgid "Miscellaneous"
|
389 |
msgstr ""
|
390 |
|
391 |
-
#: languages/texts.php:90 mappress_settings.php:
|
392 |
msgid "Map sizes"
|
393 |
msgstr ""
|
394 |
|
395 |
-
#: languages/texts.php:91 mappress_settings.php:
|
396 |
msgid "Scripts"
|
397 |
msgstr ""
|
398 |
|
@@ -408,20 +390,20 @@ msgstr ""
|
|
408 |
msgid "Use the settings below to automatically create maps from custom fields."
|
409 |
msgstr ""
|
410 |
|
411 |
-
#: languages/texts.php:95
|
412 |
msgid "Recenter maps when window is resized"
|
413 |
msgstr ""
|
414 |
|
415 |
-
#: languages/texts.php:96 mappress_settings.php:
|
416 |
-
#: pro/mappress_pro_settings.php:
|
417 |
msgid "more info"
|
418 |
msgstr ""
|
419 |
|
420 |
-
#: languages/texts.php:97 mappress_settings.php:
|
421 |
msgid "Required to display maps"
|
422 |
msgstr ""
|
423 |
|
424 |
-
#: languages/texts.php:98 mappress_settings.php:
|
425 |
msgid "Output scripts in footer"
|
426 |
msgstr ""
|
427 |
|
@@ -469,7 +451,7 @@ msgstr ""
|
|
469 |
msgid "Use a specific %s for map controls and geocoding"
|
470 |
msgstr ""
|
471 |
|
472 |
-
#: languages/texts.php:110 mappress_settings.php:
|
473 |
msgid "Default"
|
474 |
msgstr ""
|
475 |
|
@@ -557,15 +539,15 @@ msgstr ""
|
|
557 |
msgid "Hybrid"
|
558 |
msgstr ""
|
559 |
|
560 |
-
#: languages/texts.php:132 mappress_settings.php:
|
561 |
msgid "Google"
|
562 |
msgstr ""
|
563 |
|
564 |
-
#: languages/texts.php:133 mappress_settings.php:
|
565 |
msgid "Inline"
|
566 |
msgstr ""
|
567 |
|
568 |
-
#: languages/texts.php:134 mappress_settings.php:
|
569 |
msgid "None"
|
570 |
msgstr ""
|
571 |
|
@@ -589,15 +571,15 @@ msgstr ""
|
|
589 |
msgid "Default alignment"
|
590 |
msgstr ""
|
591 |
|
592 |
-
#: languages/texts.php:140 mappress_settings.php:
|
593 |
msgid "Center"
|
594 |
msgstr ""
|
595 |
|
596 |
-
#: languages/texts.php:141 mappress_settings.php:
|
597 |
msgid "Left"
|
598 |
msgstr ""
|
599 |
|
600 |
-
#: languages/texts.php:142 mappress_settings.php:
|
601 |
msgid "Right"
|
602 |
msgstr ""
|
603 |
|
@@ -605,11 +587,11 @@ msgstr ""
|
|
605 |
msgid "Default zoom for POIs entered by lat/lng"
|
606 |
msgstr ""
|
607 |
|
608 |
-
#: languages/texts.php:144 mappress_settings.php:
|
609 |
msgid "Top of post"
|
610 |
msgstr ""
|
611 |
|
612 |
-
#: languages/texts.php:145 mappress_settings.php:
|
613 |
msgid "Bottom of post"
|
614 |
msgstr ""
|
615 |
|
@@ -669,7 +651,7 @@ msgstr ""
|
|
669 |
msgid "Reset Defaults"
|
670 |
msgstr ""
|
671 |
|
672 |
-
#: languages/texts.php:160 mappress.php:
|
673 |
msgid "Settings"
|
674 |
msgstr ""
|
675 |
|
@@ -758,19 +740,19 @@ msgstr ""
|
|
758 |
msgid "Automatic icons"
|
759 |
msgstr ""
|
760 |
|
761 |
-
#: languages/texts.php:182 pro/mappress_pro_settings.php:
|
762 |
msgid "Styled maps"
|
763 |
msgstr ""
|
764 |
|
765 |
-
#: languages/texts.php:183 pro/mappress_pro_settings.php:
|
766 |
msgid "Default style"
|
767 |
msgstr ""
|
768 |
|
769 |
-
#: languages/texts.php:184 pro/mappress_pro_settings.php:
|
770 |
msgid "Geocoding fields"
|
771 |
msgstr ""
|
772 |
|
773 |
-
#: languages/texts.php:185 pro/mappress_pro_settings.php:
|
774 |
msgid "Force resize"
|
775 |
msgstr ""
|
776 |
|
@@ -778,19 +760,20 @@ msgstr ""
|
|
778 |
msgid "Optional - for geocoding only"
|
779 |
msgstr ""
|
780 |
|
781 |
-
#: languages/texts.php:187 pro/
|
|
|
782 |
msgid "Post type"
|
783 |
msgstr ""
|
784 |
|
785 |
-
#: languages/texts.php:188
|
786 |
msgid "Key"
|
787 |
msgstr ""
|
788 |
|
789 |
-
#: languages/texts.php:189 pro/mappress_pro_settings.php:
|
790 |
msgid "Value"
|
791 |
msgstr ""
|
792 |
|
793 |
-
#: languages/texts.php:190 pro/mappress_pro_settings.php:
|
794 |
#: pro/mappress_pro_settings.php:244
|
795 |
msgid "Icon"
|
796 |
msgstr ""
|
@@ -803,7 +786,7 @@ msgstr ""
|
|
803 |
msgid "Show the POI list as a sortable %s"
|
804 |
msgstr ""
|
805 |
|
806 |
-
#: languages/texts.php:193 pro/mappress_pro_settings.php:
|
807 |
#: pro/mappress_pro_settings.php:236
|
808 |
msgid "POI title"
|
809 |
msgstr ""
|
@@ -812,7 +795,7 @@ msgstr ""
|
|
812 |
msgid "Post title"
|
813 |
msgstr ""
|
814 |
|
815 |
-
#: languages/texts.php:195 pro/mappress_pro_settings.php:
|
816 |
#: pro/mappress_pro_settings.php:226
|
817 |
msgid "POI body"
|
818 |
msgstr ""
|
@@ -925,7 +908,8 @@ msgstr ""
|
|
925 |
msgid "Map"
|
926 |
msgstr ""
|
927 |
|
928 |
-
#: languages/texts.php:223 pro/
|
|
|
929 |
msgid "Custom Field"
|
930 |
msgstr ""
|
931 |
|
@@ -997,31 +981,31 @@ msgstr ""
|
|
997 |
msgid "Example: traffic=\"false\" maplinks=\"\""
|
998 |
msgstr ""
|
999 |
|
1000 |
-
#: languages/texts.php:241
|
1001 |
msgid "By car"
|
1002 |
msgstr ""
|
1003 |
|
1004 |
-
#: languages/texts.php:242
|
1005 |
msgid "Public Transit"
|
1006 |
msgstr ""
|
1007 |
|
1008 |
-
#: languages/texts.php:243
|
1009 |
msgid "Walking"
|
1010 |
msgstr ""
|
1011 |
|
1012 |
-
#: languages/texts.php:244
|
1013 |
msgid "Swap start and end"
|
1014 |
msgstr ""
|
1015 |
|
1016 |
-
#: languages/texts.php:245 templates/
|
1017 |
msgid "Get Directions"
|
1018 |
msgstr ""
|
1019 |
|
1020 |
-
#: languages/texts.php:246
|
1021 |
msgid "Print"
|
1022 |
msgstr ""
|
1023 |
|
1024 |
-
#: languages/texts.php:247
|
1025 |
msgid "Close"
|
1026 |
msgstr ""
|
1027 |
|
@@ -1041,30 +1025,38 @@ msgstr ""
|
|
1041 |
msgid "Chris Richardson"
|
1042 |
msgstr ""
|
1043 |
|
1044 |
-
#: mappress_settings.php:
|
1045 |
msgid "License"
|
1046 |
msgstr ""
|
1047 |
|
1048 |
-
#: mappress_settings.php:
|
1049 |
msgid "Google API key"
|
1050 |
msgstr ""
|
1051 |
|
1052 |
-
#: mappress_settings.php:
|
1053 |
msgid "Automatic display"
|
1054 |
msgstr ""
|
1055 |
|
1056 |
-
#: mappress_settings.php:
|
1057 |
msgid "Google Server API key"
|
1058 |
msgstr ""
|
1059 |
|
1060 |
-
#: mappress_settings.php:
|
1061 |
msgid "Country code"
|
1062 |
msgstr ""
|
1063 |
|
1064 |
-
#: mappress_settings.php:
|
1065 |
msgid "%s for searching"
|
1066 |
msgstr ""
|
1067 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1068 |
#: mappress_settings.php:240
|
1069 |
msgid "%s for map controls"
|
1070 |
msgstr ""
|
@@ -1085,6 +1077,14 @@ msgstr ""
|
|
1085 |
msgid "Please %s on WordPress.org."
|
1086 |
msgstr ""
|
1087 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1088 |
#: pro/mappress_pro_settings.php:16
|
1089 |
msgid "MapPress license key"
|
1090 |
msgstr ""
|
@@ -1101,38 +1101,54 @@ msgstr ""
|
|
1101 |
msgid "Icon directory"
|
1102 |
msgstr ""
|
1103 |
|
1104 |
-
#: pro/mappress_pro_settings.php:
|
1105 |
-
msgid "
|
1106 |
msgstr ""
|
1107 |
|
1108 |
#: pro/mappress_pro_settings.php:35
|
1109 |
-
msgid "
|
1110 |
msgstr ""
|
1111 |
|
1112 |
#: pro/mappress_pro_settings.php:36
|
|
|
|
|
|
|
|
|
1113 |
msgid "Thumbnail size"
|
1114 |
msgstr ""
|
1115 |
|
1116 |
-
#: pro/mappress_pro_settings.php:
|
1117 |
msgid "Overwrite"
|
1118 |
msgstr ""
|
1119 |
|
1120 |
-
#: pro/mappress_pro_settings.php:
|
1121 |
msgid "Automatic updates"
|
1122 |
msgstr ""
|
1123 |
|
1124 |
-
#: pro/mappress_pro_settings.php:
|
1125 |
msgid "API key secured by IP address for geocoding (optional)"
|
1126 |
msgstr ""
|
1127 |
|
1128 |
-
#: pro/mappress_pro_settings.php:
|
1129 |
msgid "Enable settings for automatic updates (experimental)"
|
1130 |
msgstr ""
|
1131 |
|
1132 |
-
#: pro/mappress_pro_settings.php:
|
1133 |
msgid "Enable automatic updates for beta versions"
|
1134 |
msgstr ""
|
1135 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1136 |
#: pro/mappress_pro_settings.php:208
|
1137 |
msgid "Enter your license key"
|
1138 |
msgstr ""
|
@@ -1189,9 +1205,33 @@ msgstr ""
|
|
1189 |
msgid "Example: initialopeninfo=\"true\""
|
1190 |
msgstr ""
|
1191 |
|
1192 |
-
#: templates/
|
1193 |
msgid "Menu"
|
1194 |
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1195 |
#. Plugin Name of the plugin/theme
|
1196 |
msgid "MapPress Easy Google Maps"
|
1197 |
msgstr ""
|
2 |
# This file is distributed under the same license as the MapPress Easy Google Maps package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: MapPress Easy Google Maps 2.46\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mappress-google-maps-for-wordpress\n"
|
7 |
+
"POT-Creation-Date: 2017-09-05 16:26:38+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
16 |
msgid "Add POI"
|
17 |
msgstr ""
|
18 |
|
19 |
+
#: forms/map_editor.php:12 languages/texts.php:3 templates/map-directions.php:4
|
|
|
20 |
msgid "My location"
|
21 |
msgstr ""
|
22 |
|
23 |
+
#: forms/map_editor.php:43 languages/texts.php:10
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
msgid "Visual"
|
25 |
msgstr ""
|
26 |
|
27 |
+
#: forms/map_editor.php:43 languages/texts.php:11
|
|
|
28 |
msgid "HTML"
|
29 |
msgstr ""
|
30 |
|
31 |
+
#: forms/map_editor.php:49 forms/map_media.php:37 languages/texts.php:12
|
|
|
32 |
msgid "Save"
|
33 |
msgstr ""
|
34 |
|
35 |
+
#: forms/map_editor.php:50 forms/map_media.php:38 languages/texts.php:13
|
|
|
36 |
msgid "Cancel"
|
37 |
msgstr ""
|
38 |
|
39 |
+
#: forms/map_editor.php:51 languages/texts.php:46 mappress_controls.php:102
|
40 |
+
#: mappress_map.php:490
|
41 |
msgid "Delete"
|
42 |
msgstr ""
|
43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
#: forms/map_media.php:4 languages/texts.php:14
|
45 |
msgid "Maps for This Post"
|
46 |
msgstr ""
|
57 |
msgid "Map Title"
|
58 |
msgstr ""
|
59 |
|
60 |
+
#: forms/map_media.php:20 languages/texts.php:51 mappress_map.php:495
|
61 |
+
msgid "Untitled"
|
62 |
+
msgstr ""
|
63 |
+
|
64 |
#: forms/map_media.php:24
|
65 |
msgid "Display Size"
|
66 |
msgstr ""
|
67 |
|
68 |
+
#: forms/map_media.php:39 languages/texts.php:19 mappress_map.php:489
|
69 |
+
msgid "Insert into post"
|
70 |
msgstr ""
|
71 |
|
72 |
+
#: languages/texts.php:4 templates/map-controls.php:10
|
73 |
+
msgid "Center map"
|
74 |
msgstr ""
|
75 |
|
76 |
+
#: languages/texts.php:5
|
77 |
+
msgid "Click map for lat/lng: "
|
78 |
+
msgstr ""
|
79 |
+
|
80 |
+
#: languages/texts.php:6
|
81 |
+
msgid "Color"
|
82 |
+
msgstr ""
|
83 |
+
|
84 |
+
#: languages/texts.php:7 pro/mappress_icons.php:57
|
85 |
+
msgid "Opacity"
|
86 |
+
msgstr ""
|
87 |
+
|
88 |
+
#: languages/texts.php:8
|
89 |
+
msgid "Line"
|
90 |
+
msgstr ""
|
91 |
+
|
92 |
+
#: languages/texts.php:9 pro/mappress_icons.php:58
|
93 |
+
msgid "Weight"
|
94 |
msgstr ""
|
95 |
|
96 |
#: languages/texts.php:18
|
97 |
msgid "Size"
|
98 |
msgstr ""
|
99 |
|
100 |
+
#: languages/texts.php:20 mappress.php:132
|
101 |
msgid "Version"
|
102 |
msgstr ""
|
103 |
|
104 |
+
#: languages/texts.php:21 mappress.php:140
|
105 |
msgid "Documentation"
|
106 |
msgstr ""
|
107 |
|
108 |
+
#: languages/texts.php:22 mappress.php:141
|
109 |
msgid "Support"
|
110 |
msgstr ""
|
111 |
|
112 |
+
#: languages/texts.php:23 mappress.php:143
|
113 |
msgid "Upgrade to MapPress Pro"
|
114 |
msgstr ""
|
115 |
|
137 |
msgid "MapPress Settings"
|
138 |
msgstr ""
|
139 |
|
140 |
+
#: languages/texts.php:30 templates/map-controls.php:14
|
|
|
141 |
msgid "Bicycling"
|
142 |
msgstr ""
|
143 |
|
145 |
msgid "Bike"
|
146 |
msgstr ""
|
147 |
|
148 |
+
#: languages/texts.php:32
|
149 |
msgid "One of the addresses could not be found."
|
150 |
msgstr ""
|
151 |
|
152 |
+
#: languages/texts.php:33 mappress.php:570
|
153 |
msgid "Google cannot return directions between those addresses. There is no route between them or the routing information is not available."
|
154 |
msgstr ""
|
155 |
|
156 |
+
#: languages/texts.php:34
|
157 |
msgid "Unknown error, unable to return directions. Status code = "
|
158 |
msgstr ""
|
159 |
|
160 |
+
#: languages/texts.php:35 mappress_poi.php:122 mappress_settings.php:102
|
|
|
161 |
msgid "Directions"
|
162 |
msgstr ""
|
163 |
|
164 |
+
#: languages/texts.php:36 mappress.php:571
|
165 |
msgid "Error reading KML file"
|
166 |
msgstr ""
|
167 |
|
168 |
+
#: languages/texts.php:37
|
169 |
msgid "Loading..."
|
170 |
msgstr ""
|
171 |
|
172 |
+
#: languages/texts.php:38 mappress.php:572
|
173 |
msgid "No matching address"
|
174 |
msgstr ""
|
175 |
|
176 |
+
#: languages/texts.php:39 mappress.php:573
|
177 |
msgid "Unable to get your location"
|
178 |
msgstr ""
|
179 |
|
180 |
+
#: languages/texts.php:40 templates/map-controls.php:13
|
181 |
msgid "Traffic"
|
182 |
msgstr ""
|
183 |
|
184 |
+
#: languages/texts.php:41 templates/map-controls.php:15
|
185 |
msgid "Transit"
|
186 |
msgstr ""
|
187 |
|
188 |
+
#: languages/texts.php:42 pro/mappress_pro_settings.php:244
|
189 |
#: pro/mappress_widget.php:94
|
190 |
msgid "Zoom"
|
191 |
msgstr ""
|
192 |
|
193 |
+
#: languages/texts.php:43 mappress_controls.php:93
|
194 |
msgid "Add"
|
195 |
msgstr ""
|
196 |
|
197 |
+
#: languages/texts.php:44
|
198 |
msgid "Click & drag to move"
|
199 |
msgstr ""
|
200 |
|
201 |
+
#: languages/texts.php:45
|
202 |
msgid "Click to change"
|
203 |
msgstr ""
|
204 |
|
205 |
+
#: languages/texts.php:47 mappress.php:574
|
206 |
msgid "Delete this POI?"
|
207 |
msgstr ""
|
208 |
|
209 |
+
#: languages/texts.php:48 mappress.php:575
|
210 |
msgid "Delete this map?"
|
211 |
msgstr ""
|
212 |
|
213 |
+
#: languages/texts.php:49
|
214 |
msgid "Please save the map first"
|
215 |
msgstr ""
|
216 |
|
217 |
+
#: languages/texts.php:50 mappress.php:576
|
218 |
msgid "Shape"
|
219 |
msgstr ""
|
220 |
|
|
|
|
|
|
|
|
|
221 |
#: languages/texts.php:52
|
222 |
msgid "New"
|
223 |
msgstr ""
|
224 |
|
225 |
+
#: languages/texts.php:53 mappress_map.php:514
|
226 |
msgid "Map not found"
|
227 |
msgstr ""
|
228 |
|
229 |
+
#: languages/texts.php:54 mappress_map.php:488
|
230 |
msgid "Edit"
|
231 |
msgstr ""
|
232 |
|
233 |
+
#: languages/texts.php:55 mappress_map.php:362
|
234 |
msgid "Show map"
|
235 |
msgstr ""
|
236 |
|
237 |
+
#: languages/texts.php:56
|
238 |
msgid "Reset map"
|
239 |
msgstr ""
|
240 |
|
241 |
+
#: languages/texts.php:57
|
242 |
msgid "Bigger map"
|
243 |
msgstr ""
|
244 |
|
245 |
+
#: languages/texts.php:58
|
246 |
msgid "Smaller map"
|
247 |
msgstr ""
|
248 |
|
254 |
msgid "Directions from"
|
255 |
msgstr ""
|
256 |
|
257 |
+
#: languages/texts.php:61 mappress_settings.php:95
|
258 |
msgid "Basic Settings"
|
259 |
msgstr ""
|
260 |
|
261 |
+
#: languages/texts.php:62 mappress_settings.php:97
|
262 |
msgid "Post types"
|
263 |
msgstr ""
|
264 |
|
298 |
msgid "Map controls"
|
299 |
msgstr ""
|
300 |
|
301 |
+
#: languages/texts.php:72 mappress_settings.php:100
|
302 |
msgid "Map Settings"
|
303 |
msgstr ""
|
304 |
|
306 |
msgid "Map links"
|
307 |
msgstr ""
|
308 |
|
309 |
+
#: languages/texts.php:74 mappress_settings.php:101
|
310 |
msgid "Map alignment"
|
311 |
msgstr ""
|
312 |
|
313 |
+
#: languages/texts.php:75 mappress_settings.php:106 mappress_settings.php:234
|
314 |
msgid "Open first POI"
|
315 |
msgstr ""
|
316 |
|
317 |
+
#: languages/texts.php:76 mappress_settings.php:104
|
318 |
msgid "POI Settings"
|
319 |
msgstr ""
|
320 |
|
326 |
msgid "Tooltips"
|
327 |
msgstr ""
|
328 |
|
329 |
+
#: languages/texts.php:79 mappress_settings.php:105
|
330 |
msgid "Default zoom"
|
331 |
msgstr ""
|
332 |
|
333 |
+
#: languages/texts.php:80 mappress_settings.php:109
|
334 |
msgid "Mashups"
|
335 |
msgstr ""
|
336 |
|
337 |
+
#: languages/texts.php:81 mappress_settings.php:110
|
338 |
msgid "Icons"
|
339 |
msgstr ""
|
340 |
|
341 |
+
#: languages/texts.php:82 mappress_settings.php:111
|
342 |
msgid "Styled Maps"
|
343 |
msgstr ""
|
344 |
|
345 |
+
#: languages/texts.php:83 mappress_settings.php:112
|
346 |
msgid "Geocoding"
|
347 |
msgstr ""
|
348 |
|
349 |
+
#: languages/texts.php:84 mappress_settings.php:116
|
350 |
msgid "Localization"
|
351 |
msgstr ""
|
352 |
|
353 |
+
#: languages/texts.php:85 mappress_settings.php:117 mappress_settings.php:238
|
354 |
msgid "Language"
|
355 |
msgstr ""
|
356 |
|
357 |
+
#: languages/texts.php:86 mappress_settings.php:118
|
358 |
msgid "Country"
|
359 |
msgstr ""
|
360 |
|
361 |
+
#: languages/texts.php:87 mappress_settings.php:119
|
362 |
msgid "Directions server"
|
363 |
msgstr ""
|
364 |
|
366 |
msgid "Directions units"
|
367 |
msgstr ""
|
368 |
|
369 |
+
#: languages/texts.php:89 mappress_settings.php:121
|
370 |
msgid "Miscellaneous"
|
371 |
msgstr ""
|
372 |
|
373 |
+
#: languages/texts.php:90 mappress_settings.php:122
|
374 |
msgid "Map sizes"
|
375 |
msgstr ""
|
376 |
|
377 |
+
#: languages/texts.php:91 mappress_settings.php:123
|
378 |
msgid "Scripts"
|
379 |
msgstr ""
|
380 |
|
390 |
msgid "Use the settings below to automatically create maps from custom fields."
|
391 |
msgstr ""
|
392 |
|
393 |
+
#: languages/texts.php:95
|
394 |
msgid "Recenter maps when window is resized"
|
395 |
msgstr ""
|
396 |
|
397 |
+
#: languages/texts.php:96 mappress_settings.php:189
|
398 |
+
#: pro/mappress_pro_settings.php:111
|
399 |
msgid "more info"
|
400 |
msgstr ""
|
401 |
|
402 |
+
#: languages/texts.php:97 mappress_settings.php:190
|
403 |
msgid "Required to display maps"
|
404 |
msgstr ""
|
405 |
|
406 |
+
#: languages/texts.php:98 mappress_settings.php:225 mappress_settings.php:228
|
407 |
msgid "Output scripts in footer"
|
408 |
msgstr ""
|
409 |
|
451 |
msgid "Use a specific %s for map controls and geocoding"
|
452 |
msgstr ""
|
453 |
|
454 |
+
#: languages/texts.php:110 mappress_settings.php:178
|
455 |
msgid "Default"
|
456 |
msgstr ""
|
457 |
|
539 |
msgid "Hybrid"
|
540 |
msgstr ""
|
541 |
|
542 |
+
#: languages/texts.php:132 mappress_settings.php:211
|
543 |
msgid "Google"
|
544 |
msgstr ""
|
545 |
|
546 |
+
#: languages/texts.php:133 mappress_settings.php:212
|
547 |
msgid "Inline"
|
548 |
msgstr ""
|
549 |
|
550 |
+
#: languages/texts.php:134 mappress_settings.php:197 mappress_settings.php:213
|
551 |
msgid "None"
|
552 |
msgstr ""
|
553 |
|
571 |
msgid "Default alignment"
|
572 |
msgstr ""
|
573 |
|
574 |
+
#: languages/texts.php:140 mappress_settings.php:179
|
575 |
msgid "Center"
|
576 |
msgstr ""
|
577 |
|
578 |
+
#: languages/texts.php:141 mappress_settings.php:180
|
579 |
msgid "Left"
|
580 |
msgstr ""
|
581 |
|
582 |
+
#: languages/texts.php:142 mappress_settings.php:181
|
583 |
msgid "Right"
|
584 |
msgstr ""
|
585 |
|
587 |
msgid "Default zoom for POIs entered by lat/lng"
|
588 |
msgstr ""
|
589 |
|
590 |
+
#: languages/texts.php:144 mappress_settings.php:195
|
591 |
msgid "Top of post"
|
592 |
msgstr ""
|
593 |
|
594 |
+
#: languages/texts.php:145 mappress_settings.php:196
|
595 |
msgid "Bottom of post"
|
596 |
msgstr ""
|
597 |
|
651 |
msgid "Reset Defaults"
|
652 |
msgstr ""
|
653 |
|
654 |
+
#: languages/texts.php:160 mappress.php:126
|
655 |
msgid "Settings"
|
656 |
msgstr ""
|
657 |
|
740 |
msgid "Automatic icons"
|
741 |
msgstr ""
|
742 |
|
743 |
+
#: languages/texts.php:182 pro/mappress_pro_settings.php:39
|
744 |
msgid "Styled maps"
|
745 |
msgstr ""
|
746 |
|
747 |
+
#: languages/texts.php:183 pro/mappress_pro_settings.php:40
|
748 |
msgid "Default style"
|
749 |
msgstr ""
|
750 |
|
751 |
+
#: languages/texts.php:184 pro/mappress_pro_settings.php:42
|
752 |
msgid "Geocoding fields"
|
753 |
msgstr ""
|
754 |
|
755 |
+
#: languages/texts.php:185 pro/mappress_pro_settings.php:44
|
756 |
msgid "Force resize"
|
757 |
msgstr ""
|
758 |
|
760 |
msgid "Optional - for geocoding only"
|
761 |
msgstr ""
|
762 |
|
763 |
+
#: languages/texts.php:187 pro/mappress_filter.php:57
|
764 |
+
#: pro/mappress_filter.php:105 pro/mappress_pro_settings.php:124
|
765 |
msgid "Post type"
|
766 |
msgstr ""
|
767 |
|
768 |
+
#: languages/texts.php:188 pro/mappress_pro_settings.php:170
|
769 |
msgid "Key"
|
770 |
msgstr ""
|
771 |
|
772 |
+
#: languages/texts.php:189 pro/mappress_pro_settings.php:131
|
773 |
msgid "Value"
|
774 |
msgstr ""
|
775 |
|
776 |
+
#: languages/texts.php:190 pro/mappress_pro_settings.php:131
|
777 |
#: pro/mappress_pro_settings.php:244
|
778 |
msgid "Icon"
|
779 |
msgstr ""
|
786 |
msgid "Show the POI list as a sortable %s"
|
787 |
msgstr ""
|
788 |
|
789 |
+
#: languages/texts.php:193 pro/mappress_pro_settings.php:33
|
790 |
#: pro/mappress_pro_settings.php:236
|
791 |
msgid "POI title"
|
792 |
msgstr ""
|
795 |
msgid "Post title"
|
796 |
msgstr ""
|
797 |
|
798 |
+
#: languages/texts.php:195 pro/mappress_pro_settings.php:34
|
799 |
#: pro/mappress_pro_settings.php:226
|
800 |
msgid "POI body"
|
801 |
msgstr ""
|
908 |
msgid "Map"
|
909 |
msgstr ""
|
910 |
|
911 |
+
#: languages/texts.php:223 pro/mappress_filter.php:92
|
912 |
+
#: pro/mappress_pro_settings.php:249
|
913 |
msgid "Custom Field"
|
914 |
msgstr ""
|
915 |
|
981 |
msgid "Example: traffic=\"false\" maplinks=\"\""
|
982 |
msgstr ""
|
983 |
|
984 |
+
#: languages/texts.php:241
|
985 |
msgid "By car"
|
986 |
msgstr ""
|
987 |
|
988 |
+
#: languages/texts.php:242
|
989 |
msgid "Public Transit"
|
990 |
msgstr ""
|
991 |
|
992 |
+
#: languages/texts.php:243
|
993 |
msgid "Walking"
|
994 |
msgstr ""
|
995 |
|
996 |
+
#: languages/texts.php:244
|
997 |
msgid "Swap start and end"
|
998 |
msgstr ""
|
999 |
|
1000 |
+
#: languages/texts.php:245 templates/map-directions.php:19
|
1001 |
msgid "Get Directions"
|
1002 |
msgstr ""
|
1003 |
|
1004 |
+
#: languages/texts.php:246
|
1005 |
msgid "Print"
|
1006 |
msgstr ""
|
1007 |
|
1008 |
+
#: languages/texts.php:247
|
1009 |
msgid "Close"
|
1010 |
msgstr ""
|
1011 |
|
1025 |
msgid "Chris Richardson"
|
1026 |
msgstr ""
|
1027 |
|
1028 |
+
#: mappress_settings.php:93
|
1029 |
msgid "License"
|
1030 |
msgstr ""
|
1031 |
|
1032 |
+
#: mappress_settings.php:96
|
1033 |
msgid "Google API key"
|
1034 |
msgstr ""
|
1035 |
|
1036 |
+
#: mappress_settings.php:98
|
1037 |
msgid "Automatic display"
|
1038 |
msgstr ""
|
1039 |
|
1040 |
+
#: mappress_settings.php:113
|
1041 |
msgid "Google Server API key"
|
1042 |
msgstr ""
|
1043 |
|
1044 |
+
#: mappress_settings.php:204
|
1045 |
msgid "Country code"
|
1046 |
msgstr ""
|
1047 |
|
1048 |
+
#: mappress_settings.php:206
|
1049 |
msgid "%s for searching"
|
1050 |
msgstr ""
|
1051 |
|
1052 |
+
#: mappress_settings.php:226
|
1053 |
+
msgid "disabled for Jetpack Infinite Scroll"
|
1054 |
+
msgstr ""
|
1055 |
+
|
1056 |
+
#: mappress_settings.php:229
|
1057 |
+
msgid "disable if maps are output using AJAX"
|
1058 |
+
msgstr ""
|
1059 |
+
|
1060 |
#: mappress_settings.php:240
|
1061 |
msgid "%s for map controls"
|
1062 |
msgstr ""
|
1077 |
msgid "Please %s on WordPress.org."
|
1078 |
msgstr ""
|
1079 |
|
1080 |
+
#: pro/mappress_filter.php:92
|
1081 |
+
msgid "Taxonomy"
|
1082 |
+
msgstr ""
|
1083 |
+
|
1084 |
+
#: pro/mappress_filter.php:92
|
1085 |
+
msgid "Post field"
|
1086 |
+
msgstr ""
|
1087 |
+
|
1088 |
#: pro/mappress_pro_settings.php:16
|
1089 |
msgid "MapPress license key"
|
1090 |
msgstr ""
|
1101 |
msgid "Icon directory"
|
1102 |
msgstr ""
|
1103 |
|
1104 |
+
#: pro/mappress_pro_settings.php:32 templates/map-header.php:2
|
1105 |
+
msgid "Filter"
|
1106 |
msgstr ""
|
1107 |
|
1108 |
#: pro/mappress_pro_settings.php:35
|
1109 |
+
msgid "POI click"
|
1110 |
msgstr ""
|
1111 |
|
1112 |
#: pro/mappress_pro_settings.php:36
|
1113 |
+
msgid "Thumbnails"
|
1114 |
+
msgstr ""
|
1115 |
+
|
1116 |
+
#: pro/mappress_pro_settings.php:37
|
1117 |
msgid "Thumbnail size"
|
1118 |
msgstr ""
|
1119 |
|
1120 |
+
#: pro/mappress_pro_settings.php:43
|
1121 |
msgid "Overwrite"
|
1122 |
msgstr ""
|
1123 |
|
1124 |
+
#: pro/mappress_pro_settings.php:45
|
1125 |
msgid "Automatic updates"
|
1126 |
msgstr ""
|
1127 |
|
1128 |
+
#: pro/mappress_pro_settings.php:112
|
1129 |
msgid "API key secured by IP address for geocoding (optional)"
|
1130 |
msgstr ""
|
1131 |
|
1132 |
+
#: pro/mappress_pro_settings.php:146
|
1133 |
msgid "Enable settings for automatic updates (experimental)"
|
1134 |
msgstr ""
|
1135 |
|
1136 |
+
#: pro/mappress_pro_settings.php:150
|
1137 |
msgid "Enable automatic updates for beta versions"
|
1138 |
msgstr ""
|
1139 |
|
1140 |
+
#: pro/mappress_pro_settings.php:163
|
1141 |
+
msgid "Checkboxes"
|
1142 |
+
msgstr ""
|
1143 |
+
|
1144 |
+
#: pro/mappress_pro_settings.php:163
|
1145 |
+
msgid "Select"
|
1146 |
+
msgstr ""
|
1147 |
+
|
1148 |
+
#: pro/mappress_pro_settings.php:170
|
1149 |
+
msgid "Format"
|
1150 |
+
msgstr ""
|
1151 |
+
|
1152 |
#: pro/mappress_pro_settings.php:208
|
1153 |
msgid "Enter your license key"
|
1154 |
msgstr ""
|
1205 |
msgid "Example: initialopeninfo=\"true\""
|
1206 |
msgstr ""
|
1207 |
|
1208 |
+
#: templates/map-controls.php:2
|
1209 |
msgid "Menu"
|
1210 |
msgstr ""
|
1211 |
+
|
1212 |
+
#: templates/map-controls.php:5
|
1213 |
+
msgid "Set center/zoom"
|
1214 |
+
msgstr ""
|
1215 |
+
|
1216 |
+
#: templates/map-controls.php:6
|
1217 |
+
msgid "Clear center/zoom"
|
1218 |
+
msgstr ""
|
1219 |
+
|
1220 |
+
#: templates/map-directions.php:18
|
1221 |
+
msgid "Google Maps"
|
1222 |
+
msgstr ""
|
1223 |
+
|
1224 |
+
#: templates/map-filters.php:9
|
1225 |
+
msgid "Done"
|
1226 |
+
msgstr ""
|
1227 |
+
|
1228 |
+
#: templates/map-filters.php:10
|
1229 |
+
msgid "Reset"
|
1230 |
+
msgstr ""
|
1231 |
+
|
1232 |
+
#: templates/map.php:7
|
1233 |
+
msgid "Loading"
|
1234 |
+
msgstr ""
|
1235 |
#. Plugin Name of the plugin/theme
|
1236 |
msgid "MapPress Easy Google Maps"
|
1237 |
msgstr ""
|
languages/texts.php
CHANGED
@@ -1,25 +1,24 @@
|
|
1 |
<?php
|
2 |
__("Add POI");
|
3 |
__("My location");
|
4 |
-
__("Center map");
|
5 |
-
__("Click map for lat/lng: ");
|
6 |
__("Visual");
|
7 |
__("HTML");
|
8 |
__("Save");
|
9 |
__("Cancel");
|
10 |
__("Delete");
|
11 |
-
__("Color");
|
12 |
-
__("Opacity");
|
13 |
-
__("Line");
|
14 |
-
__("Weight");
|
15 |
__("Maps for This Post");
|
16 |
__("New Map");
|
17 |
__("Map ID");
|
18 |
__("Map Title");
|
|
|
19 |
__("Display Size");
|
20 |
-
__("Viewport");
|
21 |
-
__("Save center and zoom");
|
22 |
__("Insert into post");
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
__("Size");
|
24 |
__("Version");
|
25 |
__("Documentation");
|
@@ -51,7 +50,6 @@ __("Delete this POI?");
|
|
51 |
__("Delete this map?");
|
52 |
__("Please save the map first");
|
53 |
__("Shape");
|
54 |
-
__("Untitled");
|
55 |
__("New");
|
56 |
__("Map not found");
|
57 |
__("Edit");
|
@@ -258,15 +256,20 @@ __("Automatic display");
|
|
258 |
__("Google Server API key");
|
259 |
__("Country code");
|
260 |
__("%s for searching");
|
|
|
|
|
261 |
__("%s for map controls");
|
262 |
__("Width (px or %)");
|
263 |
__("Height (px)");
|
264 |
__("rate it 5 Stars");
|
265 |
__("Please %s on WordPress.org.");
|
|
|
|
|
266 |
__("MapPress license key");
|
267 |
__("Beta versions");
|
268 |
__("Sort");
|
269 |
__("Icon directory");
|
|
|
270 |
__("POI click");
|
271 |
__("Thumbnails");
|
272 |
__("Thumbnail size");
|
@@ -275,6 +278,9 @@ __("Automatic updates");
|
|
275 |
__("API key secured by IP address for geocoding (optional)");
|
276 |
__("Enable settings for automatic updates (experimental)");
|
277 |
__("Enable automatic updates for beta versions");
|
|
|
|
|
|
|
278 |
__("Enter your license key");
|
279 |
__("Communication error, please try again later");
|
280 |
__("Active");
|
@@ -290,6 +296,12 @@ __("JSON from Google's %s");
|
|
290 |
__("or ");
|
291 |
__("Example: initialopeninfo=\"true\"");
|
292 |
__("Menu");
|
|
|
|
|
|
|
|
|
|
|
|
|
293 |
__("MapPress Easy Google Maps");
|
294 |
__("http://www.wphostreviews.com/mappress");
|
295 |
__("MapPress makes it easy to insert Google Maps in WordPress posts and pages.");
|
1 |
<?php
|
2 |
__("Add POI");
|
3 |
__("My location");
|
|
|
|
|
4 |
__("Visual");
|
5 |
__("HTML");
|
6 |
__("Save");
|
7 |
__("Cancel");
|
8 |
__("Delete");
|
|
|
|
|
|
|
|
|
9 |
__("Maps for This Post");
|
10 |
__("New Map");
|
11 |
__("Map ID");
|
12 |
__("Map Title");
|
13 |
+
__("Untitled");
|
14 |
__("Display Size");
|
|
|
|
|
15 |
__("Insert into post");
|
16 |
+
__("Center map");
|
17 |
+
__("Click map for lat/lng: ");
|
18 |
+
__("Color");
|
19 |
+
__("Opacity");
|
20 |
+
__("Line");
|
21 |
+
__("Weight");
|
22 |
__("Size");
|
23 |
__("Version");
|
24 |
__("Documentation");
|
50 |
__("Delete this map?");
|
51 |
__("Please save the map first");
|
52 |
__("Shape");
|
|
|
53 |
__("New");
|
54 |
__("Map not found");
|
55 |
__("Edit");
|
256 |
__("Google Server API key");
|
257 |
__("Country code");
|
258 |
__("%s for searching");
|
259 |
+
__("disabled for Jetpack Infinite Scroll");
|
260 |
+
__("disable if maps are output using AJAX");
|
261 |
__("%s for map controls");
|
262 |
__("Width (px or %)");
|
263 |
__("Height (px)");
|
264 |
__("rate it 5 Stars");
|
265 |
__("Please %s on WordPress.org.");
|
266 |
+
__("Taxonomy");
|
267 |
+
__("Post field");
|
268 |
__("MapPress license key");
|
269 |
__("Beta versions");
|
270 |
__("Sort");
|
271 |
__("Icon directory");
|
272 |
+
__("Filter");
|
273 |
__("POI click");
|
274 |
__("Thumbnails");
|
275 |
__("Thumbnail size");
|
278 |
__("API key secured by IP address for geocoding (optional)");
|
279 |
__("Enable settings for automatic updates (experimental)");
|
280 |
__("Enable automatic updates for beta versions");
|
281 |
+
__("Checkboxes");
|
282 |
+
__("Select");
|
283 |
+
__("Format");
|
284 |
__("Enter your license key");
|
285 |
__("Communication error, please try again later");
|
286 |
__("Active");
|
296 |
__("or ");
|
297 |
__("Example: initialopeninfo=\"true\"");
|
298 |
__("Menu");
|
299 |
+
__("Set center/zoom");
|
300 |
+
__("Clear center/zoom");
|
301 |
+
__("Google Maps");
|
302 |
+
__("Done");
|
303 |
+
__("Reset");
|
304 |
+
__("Loading");
|
305 |
__("MapPress Easy Google Maps");
|
306 |
__("http://www.wphostreviews.com/mappress");
|
307 |
__("MapPress makes it easy to insert Google Maps in WordPress posts and pages.");
|
mappress.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: MapPress Easy Google Maps
|
|
4 |
Plugin URI: http://www.wphostreviews.com/mappress
|
5 |
Author URI: http://www.wphostreviews.com/mappress
|
6 |
Description: MapPress makes it easy to insert Google Maps in WordPress posts and pages.
|
7 |
-
Version: 2.
|
8 |
Author: Chris Richardson
|
9 |
Text Domain: mappress-google-maps-for-wordpress
|
10 |
Thanks to all the translators and to Matthias Stasiak for his wonderful icons (http://code.google.com/p/google-maps-icons/)
|
@@ -23,6 +23,7 @@ require_once dirname( __FILE__ ) . '/mappress_map.php';
|
|
23 |
require_once dirname( __FILE__ ) . '/mappress_settings.php';
|
24 |
|
25 |
if (is_dir(dirname( __FILE__ ) . '/pro')) {
|
|
|
26 |
include_once dirname( __FILE__ ) . '/pro/mappress_geocoder.php';
|
27 |
include_once dirname( __FILE__ ) . '/pro/mappress_icons.php';
|
28 |
include_once dirname( __FILE__ ) . '/pro/mappress_meta.php';
|
@@ -31,8 +32,9 @@ if (is_dir(dirname( __FILE__ ) . '/pro')) {
|
|
31 |
include_once dirname( __FILE__ ) . '/pro/mappress_updater.php';
|
32 |
include_once dirname( __FILE__ ) . '/pro/mappress_widget.php';
|
33 |
}
|
|
|
34 |
class Mappress {
|
35 |
-
const VERSION = '2.
|
36 |
|
37 |
static
|
38 |
$baseurl,
|
@@ -161,7 +163,7 @@ class Mappress {
|
|
161 |
static function admin_menu() {
|
162 |
// Settings
|
163 |
$settings = (self::$pro) ? new Mappress_Pro_Settings() : new Mappress_Settings();
|
164 |
-
self::$pages[] = add_menu_page('MapPress', 'MapPress', 'manage_options', 'mappress', array(&$settings, 'options_page'),
|
165 |
}
|
166 |
|
167 |
/**
|
@@ -279,8 +281,6 @@ class Mappress {
|
|
279 |
* @param mixed $atts
|
280 |
*/
|
281 |
static function get_mashup($atts) {
|
282 |
-
global $wp_query;
|
283 |
-
|
284 |
$mashup = new Mappress_Map($atts);
|
285 |
$mashup->query = Mappress_Query::parse_query($atts);
|
286 |
|
@@ -292,7 +292,7 @@ class Mappress {
|
|
292 |
|
293 |
// If using query 'current' then create a static map for current posts
|
294 |
if (empty($mashup->query))
|
295 |
-
|
296 |
|
297 |
// If 'hideEmpty' is set, try to suppress the map if there are no POIs
|
298 |
if ($mashup->options->hideEmpty) {
|
@@ -330,7 +330,7 @@ class Mappress {
|
|
330 |
wp_enqueue_style('mappress-custom', $file, array('mappress'), self::VERSION);
|
331 |
|
332 |
// Load scripts in header
|
333 |
-
if (!self::$options->footer)
|
334 |
self::load();
|
335 |
}
|
336 |
|
@@ -527,7 +527,7 @@ class Mappress {
|
|
527 |
$loaded = true;
|
528 |
|
529 |
$version = self::VERSION;
|
530 |
-
$footer = (is_admin()) ? true : self::$options->footer;
|
531 |
$dev = (defined('MAPPRESS_DEV')) ? MAPPRESS_DEV : null;
|
532 |
$dev = (isset($_REQUEST['mp_dev'])) ? $_REQUEST['mp_dev'] : $dev;
|
533 |
$dev = (isset($dev) && empty($dev)) ? 'dev' : $dev;
|
@@ -567,31 +567,15 @@ class Mappress {
|
|
567 |
global $post;
|
568 |
|
569 |
$l10n = array(
|
570 |
-
'
|
571 |
-
'dir_zero_results' => __('Google cannot return directions between those addresses. There is no route between them or the routing information is not available.', 'mappress-google-maps-for-wordpress'),
|
572 |
-
'dir_default' => __('Unknown error, unable to return directions. Status code = ', 'mappress-google-maps-for-wordpress'),
|
573 |
-
'directions' => __('Directions', 'mappress-google-maps-for-wordpress'),
|
574 |
'kml_error' => __('Error reading KML file', 'mappress-google-maps-for-wordpress'),
|
575 |
-
'loading' => __('Loading...', 'mappress-google-maps-for-wordpress'),
|
576 |
'no_address' => __('No matching address', 'mappress-google-maps-for-wordpress'),
|
577 |
'no_geolocate' => __('Unable to get your location', 'mappress-google-maps-for-wordpress'),
|
578 |
-
'
|
|
|
|
|
579 |
);
|
580 |
|
581 |
-
if (is_admin()) {
|
582 |
-
$l10n = array_merge($l10n, array(
|
583 |
-
'add' => __('Add', 'mappress-google-maps-for-wordpress'),
|
584 |
-
'click_and_drag' => __('Click & drag to move', 'mappress-google-maps-for-wordpress'),
|
585 |
-
'click_to_change' => __('Click to change', 'mappress-google-maps-for-wordpress'),
|
586 |
-
'del' => __('Delete', 'mappress-google-maps-for-wordpress'),
|
587 |
-
'delete_prompt' => __('Delete this POI?', 'mappress-google-maps-for-wordpress'),
|
588 |
-
'delete_map_prompt' => __('Delete this map?', 'mappress-google-maps-for-wordpress'),
|
589 |
-
'save_first' => __('Please save the map first', 'mappress-google-maps-for-wordpress'),
|
590 |
-
'shape' => __('Shape', 'mappress-google-maps-for-wordpress'),
|
591 |
-
'untitled' => __('Untitled', 'mappress-google-maps-for-wordpress')
|
592 |
-
));
|
593 |
-
}
|
594 |
-
|
595 |
// Globals
|
596 |
$l10n['options'] = array(
|
597 |
'admin' => current_user_can('administrator'),
|
@@ -606,7 +590,7 @@ class Mappress {
|
|
606 |
);
|
607 |
|
608 |
// Global settings
|
609 |
-
$options = array('country', 'defaultIcon', 'directions', 'directionsServer', '
|
610 |
foreach($options as $option)
|
611 |
$l10n['options'][$option] = self::$options->$option;
|
612 |
|
@@ -633,6 +617,24 @@ class Mappress {
|
|
633 |
return self::$options->language;
|
634 |
}
|
635 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
636 |
/**
|
637 |
* Get template.
|
638 |
*/
|
@@ -681,7 +683,6 @@ class Mappress {
|
|
681 |
static function ssl() {
|
682 |
return (is_ssl() || !filter_var($_SERVER['REMOTE_ADDR'], FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE));
|
683 |
}
|
684 |
-
|
685 |
} // End Mappress class
|
686 |
|
687 |
$mappress = new Mappress();
|
4 |
Plugin URI: http://www.wphostreviews.com/mappress
|
5 |
Author URI: http://www.wphostreviews.com/mappress
|
6 |
Description: MapPress makes it easy to insert Google Maps in WordPress posts and pages.
|
7 |
+
Version: 2.46
|
8 |
Author: Chris Richardson
|
9 |
Text Domain: mappress-google-maps-for-wordpress
|
10 |
Thanks to all the translators and to Matthias Stasiak for his wonderful icons (http://code.google.com/p/google-maps-icons/)
|
23 |
require_once dirname( __FILE__ ) . '/mappress_settings.php';
|
24 |
|
25 |
if (is_dir(dirname( __FILE__ ) . '/pro')) {
|
26 |
+
include_once dirname( __FILE__ ) . '/pro/mappress_filter.php';
|
27 |
include_once dirname( __FILE__ ) . '/pro/mappress_geocoder.php';
|
28 |
include_once dirname( __FILE__ ) . '/pro/mappress_icons.php';
|
29 |
include_once dirname( __FILE__ ) . '/pro/mappress_meta.php';
|
32 |
include_once dirname( __FILE__ ) . '/pro/mappress_updater.php';
|
33 |
include_once dirname( __FILE__ ) . '/pro/mappress_widget.php';
|
34 |
}
|
35 |
+
|
36 |
class Mappress {
|
37 |
+
const VERSION = '2.46';
|
38 |
|
39 |
static
|
40 |
$baseurl,
|
163 |
static function admin_menu() {
|
164 |
// Settings
|
165 |
$settings = (self::$pro) ? new Mappress_Pro_Settings() : new Mappress_Settings();
|
166 |
+
self::$pages[] = add_menu_page('MapPress', 'MapPress', 'manage_options', 'mappress', array(&$settings, 'options_page'), 'dashicons-location');
|
167 |
}
|
168 |
|
169 |
/**
|
281 |
* @param mixed $atts
|
282 |
*/
|
283 |
static function get_mashup($atts) {
|
|
|
|
|
284 |
$mashup = new Mappress_Map($atts);
|
285 |
$mashup->query = Mappress_Query::parse_query($atts);
|
286 |
|
292 |
|
293 |
// If using query 'current' then create a static map for current posts
|
294 |
if (empty($mashup->query))
|
295 |
+
Mappress_Query::get_query_pois($mashup);
|
296 |
|
297 |
// If 'hideEmpty' is set, try to suppress the map if there are no POIs
|
298 |
if ($mashup->options->hideEmpty) {
|
330 |
wp_enqueue_style('mappress-custom', $file, array('mappress'), self::VERSION);
|
331 |
|
332 |
// Load scripts in header
|
333 |
+
if (!self::$options->footer || self::infinite_scroll())
|
334 |
self::load();
|
335 |
}
|
336 |
|
527 |
$loaded = true;
|
528 |
|
529 |
$version = self::VERSION;
|
530 |
+
$footer = (is_admin()) ? true : self::$options->footer && !self::infinite_scroll();
|
531 |
$dev = (defined('MAPPRESS_DEV')) ? MAPPRESS_DEV : null;
|
532 |
$dev = (isset($_REQUEST['mp_dev'])) ? $_REQUEST['mp_dev'] : $dev;
|
533 |
$dev = (isset($dev) && empty($dev)) ? 'dev' : $dev;
|
567 |
global $post;
|
568 |
|
569 |
$l10n = array(
|
570 |
+
'dir_error' => __('Google cannot return directions between those addresses. There is no route between them or the routing information is not available.', 'mappress-google-maps-for-wordpress'),
|
|
|
|
|
|
|
571 |
'kml_error' => __('Error reading KML file', 'mappress-google-maps-for-wordpress'),
|
|
|
572 |
'no_address' => __('No matching address', 'mappress-google-maps-for-wordpress'),
|
573 |
'no_geolocate' => __('Unable to get your location', 'mappress-google-maps-for-wordpress'),
|
574 |
+
'delete_prompt' => __('Delete this POI?', 'mappress-google-maps-for-wordpress'),
|
575 |
+
'delete_map_prompt' => __('Delete this map?', 'mappress-google-maps-for-wordpress'),
|
576 |
+
'shape' => __('Shape', 'mappress-google-maps-for-wordpress')
|
577 |
);
|
578 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
579 |
// Globals
|
580 |
$l10n['options'] = array(
|
581 |
'admin' => current_user_can('administrator'),
|
590 |
);
|
591 |
|
592 |
// Global settings
|
593 |
+
$options = array('country', 'defaultIcon', 'directions', 'directionsServer', 'iconScale', 'iwType', 'mashupBody', 'mashupTitle', 'poiZoom', 'styles');
|
594 |
foreach($options as $option)
|
595 |
$l10n['options'][$option] = self::$options->$option;
|
596 |
|
617 |
return self::$options->language;
|
618 |
}
|
619 |
|
620 |
+
/**
|
621 |
+
* Switch WPML language during AJAX calls
|
622 |
+
*/
|
623 |
+
static function set_language() {
|
624 |
+
global $sitepress;
|
625 |
+
if ($sitepress && method_exists($sitepress, 'switch_lang')) {
|
626 |
+
$language = self::get_language();
|
627 |
+
$sitepress->switch_lang($language);
|
628 |
+
}
|
629 |
+
}
|
630 |
+
|
631 |
+
/**
|
632 |
+
* Returns true if Jetpack infinite scroll is enabled
|
633 |
+
*/
|
634 |
+
static function infinite_scroll() {
|
635 |
+
return get_option('infinite_scroll') ? true : false;
|
636 |
+
}
|
637 |
+
|
638 |
/**
|
639 |
* Get template.
|
640 |
*/
|
683 |
static function ssl() {
|
684 |
return (is_ssl() || !filter_var($_SERVER['REMOTE_ADDR'], FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE));
|
685 |
}
|
|
|
686 |
} // End Mappress class
|
687 |
|
688 |
$mappress = new Mappress();
|
mappress_controls.php
CHANGED
@@ -65,16 +65,28 @@ class Mappress_Controls {
|
|
65 |
static function grid($headers, $rows, $args = '') {
|
66 |
$atts = (object) wp_parse_args($args, array('style' => (count($rows) < 2) ? 'display:none' : null));
|
67 |
$atts = self::parse_atts(null, $atts);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
$headers[] = '';
|
|
|
69 |
$html = "<div data-mapp-grid class='mapp-grid'>";
|
70 |
$html .= "<table $atts>";
|
71 |
$html .= "<thead>" . self::table_row($headers, 'th') . "</thead>";
|
72 |
$html .= "<tbody>";
|
|
|
73 |
foreach($rows as $i => $row) {
|
|
|
74 |
if ($i == count($rows) - 1)
|
75 |
-
$template = self::grid_row($row);
|
76 |
else
|
77 |
-
$html .= self::grid_row($row);
|
78 |
}
|
79 |
$html .= "</tbody>";
|
80 |
$html .= "</table>";
|
@@ -84,7 +96,9 @@ class Mappress_Controls {
|
|
84 |
return $html;
|
85 |
}
|
86 |
|
87 |
-
static function grid_row($row) {
|
|
|
|
|
88 |
$row[] = "<span data-mapp-action='remove' class='mapp-close' title='" . __('Delete', 'mappress-google-maps-for-wordpress') . "'></span>";
|
89 |
return self::table_row($row);
|
90 |
}
|
@@ -228,7 +242,7 @@ class Mappress_Walker extends Walker {
|
|
228 |
$output = array();
|
229 |
|
230 |
// If 'indent' set, use spaces (for hierarchical lists like taxonomies)
|
231 |
-
$indent = (isset($args['indent']) && $args['indent']) ? str_repeat('&
|
232 |
$output[$term->slug] = $indent . $term->slug;
|
233 |
}
|
234 |
}
|
65 |
static function grid($headers, $rows, $args = '') {
|
66 |
$atts = (object) wp_parse_args($args, array('style' => (count($rows) < 2) ? 'display:none' : null));
|
67 |
$atts = self::parse_atts(null, $atts);
|
68 |
+
|
69 |
+
// Prefix sortable rows with a drag icon
|
70 |
+
$sortable = (isset($args['sortable']) && $args['sortable']);
|
71 |
+
|
72 |
+
// Add a sortable header column
|
73 |
+
if ($sortable)
|
74 |
+
array_unshift($headers, '');
|
75 |
+
|
76 |
+
// Add an action header column
|
77 |
$headers[] = '';
|
78 |
+
|
79 |
$html = "<div data-mapp-grid class='mapp-grid'>";
|
80 |
$html .= "<table $atts>";
|
81 |
$html .= "<thead>" . self::table_row($headers, 'th') . "</thead>";
|
82 |
$html .= "<tbody>";
|
83 |
+
|
84 |
foreach($rows as $i => $row) {
|
85 |
+
// Grab the last (presumably blank) row as a template
|
86 |
if ($i == count($rows) - 1)
|
87 |
+
$template = self::grid_row($row, $sortable);
|
88 |
else
|
89 |
+
$html .= self::grid_row($row, $sortable);
|
90 |
}
|
91 |
$html .= "</tbody>";
|
92 |
$html .= "</table>";
|
96 |
return $html;
|
97 |
}
|
98 |
|
99 |
+
static function grid_row($row, $sortable) {
|
100 |
+
if ($sortable)
|
101 |
+
array_unshift($row, '<span class="mapp-handle dashicons dashicons-menu"></span>');
|
102 |
$row[] = "<span data-mapp-action='remove' class='mapp-close' title='" . __('Delete', 'mappress-google-maps-for-wordpress') . "'></span>";
|
103 |
return self::table_row($row);
|
104 |
}
|
242 |
$output = array();
|
243 |
|
244 |
// If 'indent' set, use spaces (for hierarchical lists like taxonomies)
|
245 |
+
$indent = (isset($args['indent']) && $args['indent']) ? str_repeat('—', $depth) : '';
|
246 |
$output[$term->slug] = $indent . $term->slug;
|
247 |
}
|
248 |
}
|
mappress_map.php
CHANGED
@@ -96,24 +96,9 @@ class Mappress_Map extends Mappress_Obj {
|
|
96 |
}
|
97 |
|
98 |
static function meta_box($post) {
|
99 |
-
require(Mappress::$basedir . '/forms/map_media.php');
|
100 |
Mappress::load('editor');
|
101 |
-
|
102 |
-
|
103 |
-
static function ajax_create() {
|
104 |
-
ob_start();
|
105 |
-
$map = new Mappress_Map();
|
106 |
-
Mappress::ajax_response('OK', array('map' => $map));
|
107 |
-
}
|
108 |
-
|
109 |
-
static function ajax_get($mapid) {
|
110 |
-
ob_start();
|
111 |
-
$mapid = (isset($_GET['mapid'])) ? $_GET['mapid'] : null;
|
112 |
-
$map = ($mapid) ? self::get($mapid) : null;
|
113 |
-
if (!$map)
|
114 |
-
Mappress::ajax_response(__('Map not found', 'mappress-google-maps-for-wordpress'));
|
115 |
-
else
|
116 |
-
Mappress::ajax_response('OK', array('map' => $map));
|
117 |
}
|
118 |
|
119 |
/**
|
@@ -187,26 +172,6 @@ class Mappress_Map extends Mappress_Obj {
|
|
187 |
return $this->mapid;
|
188 |
}
|
189 |
|
190 |
-
static function ajax_save() {
|
191 |
-
ob_start();
|
192 |
-
|
193 |
-
// WP adds extra slashes to $_POST, make sure to remove them!
|
194 |
-
$mapdata = (isset($_POST['map'])) ? json_decode(stripslashes($_POST['map']), true) : null;
|
195 |
-
$postid = (isset($_POST['postid'])) ? $_POST['postid'] : null;
|
196 |
-
|
197 |
-
if (!$mapdata)
|
198 |
-
Mappress::ajax_response('Internal error, your data has not been saved!');
|
199 |
-
|
200 |
-
$map = new Mappress_Map($mapdata);
|
201 |
-
$mapid = $map->save($postid);
|
202 |
-
|
203 |
-
if ($mapid === false)
|
204 |
-
Mappress::ajax_response('Internal error, your data has not been saved!');
|
205 |
-
|
206 |
-
do_action('mappress_map_save', $mapid); // Use for your own developments
|
207 |
-
Mappress::ajax_response('OK', array('mapid' => $mapid, 'list' => self::get_map_list($postid)) );
|
208 |
-
}
|
209 |
-
|
210 |
/**
|
211 |
* Delete a map and all of its post assignments
|
212 |
*
|
@@ -230,19 +195,6 @@ class Mappress_Map extends Mappress_Obj {
|
|
230 |
return true;
|
231 |
}
|
232 |
|
233 |
-
static function ajax_delete() {
|
234 |
-
ob_start();
|
235 |
-
|
236 |
-
$mapid = (isset($_POST['mapid'])) ? $_POST['mapid'] : null;
|
237 |
-
$result = Mappress_Map::delete($mapid);
|
238 |
-
|
239 |
-
if (!$result)
|
240 |
-
Mappress::ajax_response("Internal error when deleting map ID '$mapid'!");
|
241 |
-
|
242 |
-
do_action('mappress_map_delete', $mapid); // Use for your own developments
|
243 |
-
Mappress::ajax_response('OK', array('mapid' => $mapid));
|
244 |
-
}
|
245 |
-
|
246 |
/**
|
247 |
* Delete a map assignment(s) for a post
|
248 |
* If $mapid is null, then ALL maps will be removed from the post
|
@@ -322,34 +274,14 @@ class Mappress_Map extends Mappress_Obj {
|
|
322 |
$div++;
|
323 |
}
|
324 |
|
325 |
-
|
326 |
-
|
327 |
-
// Output map
|
328 |
Mappress::load();
|
329 |
|
330 |
// For static maps: prepare the pois
|
331 |
if (empty($this->query))
|
332 |
$this->prepare();
|
333 |
|
334 |
-
|
335 |
-
$html .= "<div id='{$this->name}_controls'>";
|
336 |
-
$html .= Mappress::get_template('map_controls', array('map' => $this));
|
337 |
-
$html .= "</div>";
|
338 |
-
|
339 |
-
// Print directions
|
340 |
-
if ($this->options->directions == 'inline') {
|
341 |
-
$html .= "<div id='{$this->name}_directions_' style='display:none'>";
|
342 |
-
$html .= Mappress::get_template('map_directions', array('map' => $this));
|
343 |
-
$html .= "</div>";
|
344 |
-
}
|
345 |
-
|
346 |
-
// For static maps: print the poi list
|
347 |
-
if (empty($this->query) && $this->options->poiList) {
|
348 |
-
$html .= "<div id='{$this->name}_poi_list_' style='display:none'>";
|
349 |
-
$html .= Mappress::get_template('map_poi_list', array('map' => $this));
|
350 |
-
$html .= "</div>";
|
351 |
-
}
|
352 |
-
|
353 |
$script = "mapp.data.push( " . json_encode($this) . " ); \r\nif (typeof mapp.load != 'undefined') { mapp.load(); };";
|
354 |
|
355 |
// WP 4.5: queue maps for XHTML compatibility
|
@@ -361,6 +293,94 @@ class Mappress_Map extends Mappress_Obj {
|
|
361 |
return $html;
|
362 |
}
|
363 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
364 |
/**
|
365 |
* Prepare map for output
|
366 |
*
|
@@ -471,57 +491,62 @@ class Mappress_Map extends Mappress_Obj {
|
|
471 |
. "</div>";
|
472 |
|
473 |
$html = "<table class='mapp-m-map-list'>";
|
474 |
-
foreach($maps as $map)
|
475 |
-
$
|
|
|
|
|
476 |
|
477 |
$html .= "</table>";
|
478 |
return $html;
|
479 |
}
|
480 |
|
481 |
-
function
|
482 |
-
|
483 |
-
$
|
484 |
-
|
485 |
-
return $class;
|
486 |
}
|
487 |
|
488 |
-
function
|
489 |
-
|
490 |
-
|
|
|
|
|
|
|
|
|
|
|
491 |
}
|
492 |
|
493 |
-
function
|
494 |
-
|
495 |
|
496 |
-
|
497 |
-
|
498 |
|
499 |
-
|
500 |
-
|
501 |
-
}
|
502 |
|
503 |
-
|
504 |
-
$
|
505 |
-
$click = "{$this->name}.autoCenter(true); return false;";
|
506 |
-
return "<a href='#' onclick='$click'>$text</a>";
|
507 |
-
}
|
508 |
|
509 |
-
|
510 |
-
|
511 |
-
$click = "{$this->name}.reset(); return false;";
|
512 |
-
return "<a href='#' onclick='$click'>$text</a>";
|
513 |
-
}
|
514 |
|
515 |
-
|
516 |
-
|
517 |
-
$small_text = "« " . __('Smaller map', 'mappress-google-maps-for-wordpress');
|
518 |
-
$click = "{$this->name}.bigger(this, \"$big_text\", \"$small_text\"); return false;";
|
519 |
-
return "<a href='#' onclick='$click'>$big_text</a>";
|
520 |
}
|
521 |
|
522 |
-
|
523 |
-
|
524 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
525 |
}
|
|
|
526 |
}
|
527 |
?>
|
96 |
}
|
97 |
|
98 |
static function meta_box($post) {
|
|
|
99 |
Mappress::load('editor');
|
100 |
+
$map = new Mappress_Map(array('editable' => true, 'layout' => 'left', 'poiList' => true));
|
101 |
+
require(Mappress::$basedir . '/forms/map_media.php');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
}
|
103 |
|
104 |
/**
|
172 |
return $this->mapid;
|
173 |
}
|
174 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
/**
|
176 |
* Delete a map and all of its post assignments
|
177 |
*
|
195 |
return true;
|
196 |
}
|
197 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
198 |
/**
|
199 |
* Delete a map assignment(s) for a post
|
200 |
* If $mapid is null, then ALL maps will be removed from the post
|
274 |
$div++;
|
275 |
}
|
276 |
|
277 |
+
// Output scripts
|
|
|
|
|
278 |
Mappress::load();
|
279 |
|
280 |
// For static maps: prepare the pois
|
281 |
if (empty($this->query))
|
282 |
$this->prepare();
|
283 |
|
284 |
+
$html = Mappress::get_template('map', array('map' => $this));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
285 |
$script = "mapp.data.push( " . json_encode($this) . " ); \r\nif (typeof mapp.load != 'undefined') { mapp.load(); };";
|
286 |
|
287 |
// WP 4.5: queue maps for XHTML compatibility
|
293 |
return $html;
|
294 |
}
|
295 |
|
296 |
+
function check($part) {
|
297 |
+
switch ($part) {
|
298 |
+
case 'directions' :
|
299 |
+
return !$this->options->editable && $this->options->directions == 'inline';
|
300 |
+
|
301 |
+
case 'filters' :
|
302 |
+
return !$this->options->editable && $this->query && $this->options->filter && $this->options->filter;
|
303 |
+
|
304 |
+
case 'header' :
|
305 |
+
return !$this->options->editable && $this->query && ($this->check('filters') || $this->check('search'));
|
306 |
+
|
307 |
+
case 'list-inline' :
|
308 |
+
return $this->options->poiList && $this->options->layout != 'left';
|
309 |
+
|
310 |
+
case 'list-left' :
|
311 |
+
return $this->options->poiList && $this->options->layout == 'left';
|
312 |
+
|
313 |
+
case 'show' :
|
314 |
+
return $this->options->hidden;
|
315 |
+
}
|
316 |
+
return false;
|
317 |
+
}
|
318 |
+
|
319 |
+
function part($part) {
|
320 |
+
|
321 |
+
switch ($part) {
|
322 |
+
case 'controls' :
|
323 |
+
$html = Mappress::get_template('map-controls', array('map' => $this));
|
324 |
+
break;
|
325 |
+
|
326 |
+
case 'directions' :
|
327 |
+
$html = ($this->check($part)) ? Mappress::get_template('map-directions', array('map' => $this)) : '';
|
328 |
+
break;
|
329 |
+
|
330 |
+
case 'filters' :
|
331 |
+
$html = ($this->check($part)) ? Mappress::get_template('map-filters', array('map' => $this)) : '';
|
332 |
+
break;
|
333 |
+
|
334 |
+
case 'header' :
|
335 |
+
$html = ($this->check($part)) ? Mappress::get_template('map-header', array('map' => $this)) : '';
|
336 |
+
break;
|
337 |
+
|
338 |
+
case 'layout-class' :
|
339 |
+
$class = 'mapp-layout';
|
340 |
+
$class .= ($this->options->layout == 'left') ? ' mapp-left' : ' mapp-inline';
|
341 |
+
$class .= (wp_is_mobile()) ? ' mobile' : '';
|
342 |
+
if (!$this->options->editable) {
|
343 |
+
$class .= ($this->options->alignment) ? " mapp-align-{$this->options->alignment}" : '';
|
344 |
+
$class .= ($this->options->hidden) ? ' mapp-hidden' : '';
|
345 |
+
}
|
346 |
+
$html = $class;
|
347 |
+
break;
|
348 |
+
|
349 |
+
case 'layout-style' :
|
350 |
+
$width = (!stripos($this->width, 'px') && !strpos($this->width, '%')) ? $this->width . 'px' : $this->width;
|
351 |
+
$style = "width: $width";
|
352 |
+
$html = $style;
|
353 |
+
break;
|
354 |
+
|
355 |
+
case 'list-inline' :
|
356 |
+
case 'list-left' :
|
357 |
+
$html = ($this->check($part)) ? Mappress::get_template('map-list', array('map' => $this)) : '';
|
358 |
+
break;
|
359 |
+
|
360 |
+
case 'show' :
|
361 |
+
// Should be onclick...
|
362 |
+
$html = ($this->check($part)) ? sprintf("<a href='#' data-mapp-action='show'>%s</a>", __('Show map', 'mappress-google-maps-for-wordpress')) : '';
|
363 |
+
break;
|
364 |
+
|
365 |
+
case 'wrapper-style' :
|
366 |
+
$height = $this->height;
|
367 |
+
|
368 |
+
// Aspect ratio
|
369 |
+
if (stristr($height, ':')) {
|
370 |
+
$parts = explode(':', $height);
|
371 |
+
if (count($parts) == 2 && $parts[0] > 0)
|
372 |
+
$height = round((100 * $parts[1] / $parts[0]), 2) . '%';
|
373 |
+
}
|
374 |
+
|
375 |
+
// Parse px/%
|
376 |
+
$height = (!stripos($height, 'px') && !strpos($height, '%')) ? $height . 'px' : $height;
|
377 |
+
$html = (stristr($height, '%')) ? "padding-bottom: $height;" : "height: $height;";
|
378 |
+
break;
|
379 |
+
}
|
380 |
+
|
381 |
+
return (isset($html)) ? $html : "<!-- unknown part $part -->";
|
382 |
+
}
|
383 |
+
|
384 |
/**
|
385 |
* Prepare map for output
|
386 |
*
|
491 |
. "</div>";
|
492 |
|
493 |
$html = "<table class='mapp-m-map-list'>";
|
494 |
+
foreach($maps as $map) {
|
495 |
+
$title = ($map->title) ? $map->title : __('Untitled', 'mappress-google-maps-for-wordpress');
|
496 |
+
$html .= "<tr data-mapid='$map->mapid'><td><b><a href='#' class='mapp-maplist-title mapp-maplist-edit'>[$map->mapid] " . esc_html($title) . "</a></b>$actions</td></tr>";
|
497 |
+
}
|
498 |
|
499 |
$html .= "</table>";
|
500 |
return $html;
|
501 |
}
|
502 |
|
503 |
+
static function ajax_create() {
|
504 |
+
ob_start();
|
505 |
+
$map = new Mappress_Map();
|
506 |
+
Mappress::ajax_response('OK', array('map' => $map));
|
|
|
507 |
}
|
508 |
|
509 |
+
static function ajax_get($mapid) {
|
510 |
+
ob_start();
|
511 |
+
$mapid = (isset($_GET['mapid'])) ? $_GET['mapid'] : null;
|
512 |
+
$map = ($mapid) ? self::get($mapid) : null;
|
513 |
+
if (!$map)
|
514 |
+
Mappress::ajax_response(__('Map not found', 'mappress-google-maps-for-wordpress'));
|
515 |
+
else
|
516 |
+
Mappress::ajax_response('OK', array('map' => $map));
|
517 |
}
|
518 |
|
519 |
+
static function ajax_save() {
|
520 |
+
ob_start();
|
521 |
|
522 |
+
$mapdata = (isset($_POST['map'])) ? json_decode(stripslashes($_POST['map']), true) : null;
|
523 |
+
$postid = (isset($_POST['postid'])) ? $_POST['postid'] : null;
|
524 |
|
525 |
+
if (!$mapdata)
|
526 |
+
Mappress::ajax_response('Internal error, your data has not been saved!');
|
|
|
527 |
|
528 |
+
$map = new Mappress_Map($mapdata);
|
529 |
+
$mapid = $map->save($postid);
|
|
|
|
|
|
|
530 |
|
531 |
+
if ($mapid === false)
|
532 |
+
Mappress::ajax_response('Internal error, your data has not been saved!');
|
|
|
|
|
|
|
533 |
|
534 |
+
do_action('mappress_map_save', $mapid); // Use for your own developments
|
535 |
+
Mappress::ajax_response('OK', array('mapid' => $mapid, 'list' => self::get_map_list($postid)) );
|
|
|
|
|
|
|
536 |
}
|
537 |
|
538 |
+
static function ajax_delete() {
|
539 |
+
ob_start();
|
540 |
+
|
541 |
+
$mapid = (isset($_POST['mapid'])) ? $_POST['mapid'] : null;
|
542 |
+
$result = Mappress_Map::delete($mapid);
|
543 |
+
|
544 |
+
if (!$result)
|
545 |
+
Mappress::ajax_response("Internal error when deleting map ID '$mapid'!");
|
546 |
+
|
547 |
+
do_action('mappress_map_delete', $mapid); // Use for your own developments
|
548 |
+
Mappress::ajax_response('OK', array('mapid' => $mapid));
|
549 |
}
|
550 |
+
|
551 |
}
|
552 |
?>
|
mappress_poi.php
CHANGED
@@ -72,7 +72,7 @@ class Mappress_Poi extends Mappress_Obj {
|
|
72 |
|
73 |
function set_html() {
|
74 |
global $post;
|
75 |
-
$html = Mappress::get_template('
|
76 |
$html = apply_filters('mappress_poi_html', $html, $this);
|
77 |
$this->html = $html;
|
78 |
}
|
@@ -81,53 +81,73 @@ class Mappress_Poi extends Mappress_Obj {
|
|
81 |
* Prepare poi for output
|
82 |
*/
|
83 |
function prepare() {
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
$map = $this->map();
|
85 |
|
86 |
// Set title
|
87 |
-
if (Mappress::$options->mashupTitle == 'post'
|
88 |
$post = get_post($this->postid);
|
89 |
$this->title = $post->post_title;
|
90 |
}
|
91 |
|
92 |
// Set body
|
93 |
-
if (
|
94 |
-
|
95 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
}
|
97 |
|
98 |
// Set URL
|
99 |
-
|
100 |
-
$this->url = get_permalink($this->postid);
|
101 |
-
}
|
102 |
-
|
103 |
-
/**
|
104 |
-
* Get the poi title
|
105 |
-
*
|
106 |
-
*/
|
107 |
-
function get_title() {
|
108 |
-
return $this->title;
|
109 |
}
|
110 |
|
111 |
-
|
112 |
-
* Based on style settings, gets either the poi title or a link to the underlying post with poi title as text
|
113 |
-
*
|
114 |
-
*/
|
115 |
-
function get_title_link() {
|
116 |
$map = $this->map();
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
|
123 |
-
|
124 |
-
|
125 |
-
*
|
126 |
-
*/
|
127 |
-
function get_body() {
|
128 |
-
return $this->body;
|
129 |
}
|
130 |
|
|
|
131 |
/**
|
132 |
* Get a post excerpt for a poi
|
133 |
* Uses the WP get_the_excerpt(), which requires postdata to be set up.
|
@@ -153,102 +173,5 @@ class Mappress_Poi extends Mappress_Obj {
|
|
153 |
|
154 |
return $html;
|
155 |
}
|
156 |
-
|
157 |
-
/**
|
158 |
-
* Get the formatted address as HTML
|
159 |
-
* A <br> tag is inserted between the first line and subsequent lines
|
160 |
-
*
|
161 |
-
*/
|
162 |
-
function get_address() {
|
163 |
-
$parsed = Mappress_Geocoder::parse_address($this->correctedAddress);
|
164 |
-
if (!$parsed)
|
165 |
-
return "";
|
166 |
-
|
167 |
-
return isset($parsed[1]) ? $parsed[0] . "<br/>" . $parsed[1] : $parsed[0];
|
168 |
-
}
|
169 |
-
|
170 |
-
/**
|
171 |
-
* Get links for poi in infowindow or poi list
|
172 |
-
*
|
173 |
-
* @param mixed $context - blank or 'poi' | 'poi_list'
|
174 |
-
*/
|
175 |
-
function get_links($context = '') {
|
176 |
-
//2.45 - no links in poi list
|
177 |
-
$map = $this->map();
|
178 |
-
if ($context == 'poi_list' || $map->options->directions == 'none')
|
179 |
-
return '';
|
180 |
-
return $this->get_directions_link(array('to' => $this, 'text' => __('Directions', 'mappress-google-maps-for-wordpress')));
|
181 |
-
}
|
182 |
-
|
183 |
-
function get_icon() {
|
184 |
-
$map = $this->map();
|
185 |
-
return sprintf("<img class='mapp-icon' src='%s' />", Mappress_Icons::get($this->iconid));
|
186 |
-
}
|
187 |
-
|
188 |
-
/**
|
189 |
-
* Get a directions link
|
190 |
-
*
|
191 |
-
* @param bool $from - 'from' poi object or a string address
|
192 |
-
* @param bool $to - 'to' poi object or a string address
|
193 |
-
* @param mixed $text
|
194 |
-
*/
|
195 |
-
function get_directions_link($args = '') {
|
196 |
-
$map = $this->map();
|
197 |
-
|
198 |
-
$args = (object) wp_parse_args($args, array(
|
199 |
-
'from' => $map->options->from,
|
200 |
-
'to' => $map->options->to,
|
201 |
-
'text' => __('Directions', 'mappress-google-maps-for-wordpress')
|
202 |
-
));
|
203 |
-
|
204 |
-
// Convert objects to indexes, quote strings
|
205 |
-
if (is_object($args->from)) {
|
206 |
-
$i = array_search($args->from, $map->pois);
|
207 |
-
$from = "{$map->name}.getPoi($i)";
|
208 |
-
} else {
|
209 |
-
$from = "\"{$args->from}\"";
|
210 |
-
}
|
211 |
-
|
212 |
-
if (is_object($args->to)) {
|
213 |
-
$i = array_search($args->to, $map->pois);
|
214 |
-
$to = "{$map->name}.getPoi($i)";
|
215 |
-
} else {
|
216 |
-
$to = "\"{$args->to}\"";
|
217 |
-
}
|
218 |
-
|
219 |
-
// 2.45-
|
220 |
-
$link = "<a href='#' onclick = '{$map->name}.openDirections(%s, %s, true); return false;'>{$args->text}</a>";
|
221 |
-
return sprintf($link, $from, $to);
|
222 |
-
}
|
223 |
-
|
224 |
-
/**
|
225 |
-
* Back-compat: get a link to open a poi, currently returns just the title
|
226 |
-
*/
|
227 |
-
function get_open_link ($args = '') {
|
228 |
-
return $this->title;
|
229 |
-
}
|
230 |
-
|
231 |
-
/**
|
232 |
-
* Get poi thumbnail
|
233 |
-
*
|
234 |
-
* @param mixed $map
|
235 |
-
* @param mixed $args - arguments to pass to WP get_the_post_thumbnail() function
|
236 |
-
*/
|
237 |
-
function get_thumbnail( $args = '' ) {
|
238 |
-
$map = $this->map();
|
239 |
-
|
240 |
-
if (!$this->postid || !Mappress::$options->thumbs)
|
241 |
-
return '';
|
242 |
-
|
243 |
-
$args = ($args) ? $args : array();
|
244 |
-
$size = (Mappress::$options->thumbSize) ? Mappress::$options->thumbSize : null;
|
245 |
-
|
246 |
-
if (Mappress::$options->thumbWidth && Mappress::$options->thumbHeight)
|
247 |
-
$args['style'] = sprintf("width: %spx; height : %spx;", Mappress::$options->thumbWidth, Mappress::$options->thumbHeight);
|
248 |
-
|
249 |
-
$html = get_the_post_thumbnail($this->postid, $size, $args);
|
250 |
-
$html = "<a href='" . $this->url . "'>$html</a>";
|
251 |
-
return $html;
|
252 |
-
}
|
253 |
}
|
254 |
?>
|
72 |
|
73 |
function set_html() {
|
74 |
global $post;
|
75 |
+
$html = Mappress::get_template('map-poi', array('poi' => $this));
|
76 |
$html = apply_filters('mappress_poi_html', $html, $this);
|
77 |
$this->html = $html;
|
78 |
}
|
81 |
* Prepare poi for output
|
82 |
*/
|
83 |
function prepare() {
|
84 |
+
global $post;
|
85 |
+
|
86 |
+
// Only mashup POIs need to be modified
|
87 |
+
if (!$this->postid)
|
88 |
+
return;
|
89 |
+
|
90 |
$map = $this->map();
|
91 |
|
92 |
// Set title
|
93 |
+
if (Mappress::$options->mashupTitle == 'post') {
|
94 |
$post = get_post($this->postid);
|
95 |
$this->title = $post->post_title;
|
96 |
}
|
97 |
|
98 |
// Set body
|
99 |
+
if (Mappress::$options->mashupBody == 'post') {
|
100 |
+
$post = get_post($this->postid);
|
101 |
+
if ($post) {
|
102 |
+
$old_post = clone $post;
|
103 |
+
setup_postdata($post);
|
104 |
+
$this->body = get_the_excerpt();
|
105 |
+
$post = $old_post;
|
106 |
+
setup_postdata($post);
|
107 |
+
}
|
108 |
}
|
109 |
|
110 |
// Set URL
|
111 |
+
$this->url = get_permalink($this->postid);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
}
|
113 |
|
114 |
+
function part($part) {
|
|
|
|
|
|
|
|
|
115 |
$map = $this->map();
|
116 |
+
switch($part) {
|
117 |
+
case 'body' :
|
118 |
+
$html = $this->body;
|
119 |
+
break;
|
120 |
+
|
121 |
+
case 'directions' :
|
122 |
+
$html = ($map->options->directions != 'none') ? sprintf("<a href='#' data-mapp-action='dir'>%s</a>", __('Directions', 'mappress-google-maps-for-wordpress')) : '';
|
123 |
+
break;
|
124 |
+
|
125 |
+
case 'icon' :
|
126 |
+
$html = sprintf("<img class='mapp-icon' src='%s' />", Mappress_Icons::get($this->iconid));
|
127 |
+
break;
|
128 |
+
|
129 |
+
case 'thumbnail' :
|
130 |
+
if ($this->postid && Mappress::$options->thumbs) {
|
131 |
+
$size = (Mappress::$options->thumbSize) ? Mappress::$options->thumbSize : null;
|
132 |
+
$style = (Mappress::$options->thumbWidth && Mappress::$options->thumbHeight) ? sprintf("width: %spx; height : %spx;", Mappress::$options->thumbWidth, Mappress::$options->thumbHeight) : null;
|
133 |
+
$html = sprintf("<a href='%s'>%s</a>", $this->url, get_the_post_thumbnail($this->postid, $size, array('style' => $style)));
|
134 |
+
}
|
135 |
+
break;
|
136 |
+
|
137 |
+
case 'title' :
|
138 |
+
$html = $this->title;
|
139 |
+
break;
|
140 |
+
|
141 |
+
case 'title-link' :
|
142 |
+
$link = ($this->postid) ? sprintf("<a href='%s'>%s</a>", $this->url, esc_html($this->title)) : $this->title;
|
143 |
+
$html = $link;
|
144 |
+
break;
|
145 |
|
146 |
+
}
|
147 |
+
return (isset($html)) ? $html : "<!-- unknown poi part $part -->";
|
|
|
|
|
|
|
|
|
148 |
}
|
149 |
|
150 |
+
|
151 |
/**
|
152 |
* Get a post excerpt for a poi
|
153 |
* Uses the WP get_the_excerpt(), which requires postdata to be set up.
|
173 |
|
174 |
return $html;
|
175 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
176 |
}
|
177 |
?>
|
mappress_settings.php
CHANGED
@@ -3,31 +3,30 @@
|
|
3 |
* Options
|
4 |
*/
|
5 |
class Mappress_Options extends Mappress_Obj {
|
6 |
-
var $
|
7 |
-
$alignment,
|
8 |
$autoicons,
|
9 |
$autoupdate,
|
10 |
$apiKey,
|
11 |
$apiKeyServer,
|
12 |
$autodisplay = 'top',
|
13 |
-
$betas
|
14 |
$country,
|
15 |
$css = true,
|
16 |
$defaultIcon,
|
17 |
$directions = 'google',
|
18 |
$directionsServer = 'https://maps.google.com',
|
19 |
-
$
|
20 |
-
$
|
21 |
$footer = true,
|
22 |
-
$
|
23 |
-
$
|
24 |
-
$hideEmpty = false,
|
25 |
$iconScale,
|
26 |
-
$initialOpenDirections
|
27 |
-
$initialOpenInfo
|
28 |
$iwType = 'iw',
|
29 |
$language,
|
30 |
$layers,
|
|
|
31 |
$license,
|
32 |
$mashupTitle = 'poi',
|
33 |
$mashupBody = 'poi',
|
@@ -51,8 +50,7 @@ class Mappress_Options extends Mappress_Obj {
|
|
51 |
$thumbs = true,
|
52 |
$thumbSize,
|
53 |
$thumbWidth = 64,
|
54 |
-
$thumbHeight = 64
|
55 |
-
$to
|
56 |
;
|
57 |
|
58 |
function __construct($options = '') {
|
@@ -123,7 +121,6 @@ class Mappress_Settings {
|
|
123 |
$this->add_section('misc', __('Miscellaneous', 'mappress-google-maps-for-wordpress'));
|
124 |
$this->add_field('sizes', __('Map sizes', 'mappress-google-maps-for-wordpress'), 'misc');
|
125 |
$this->add_field('footer', __('Scripts', 'mappress-google-maps-for-wordpress'), 'misc');
|
126 |
-
// 2.45.2 $this->add_field('adaptive', __('Adaptive display'), 'misc');
|
127 |
}
|
128 |
|
129 |
function add_section($section, $title) {
|
@@ -176,10 +173,6 @@ class Mappress_Settings {
|
|
176 |
return $input;
|
177 |
}
|
178 |
|
179 |
-
function set_adaptive($name) {
|
180 |
-
echo Mappress_Controls::checkmark($name, $this->options->adaptive, __("Recenter maps when window is resized", 'mappress-google-maps-for-wordpress'));
|
181 |
-
}
|
182 |
-
|
183 |
function set_alignment($name) {
|
184 |
$alignments = array(
|
185 |
'' => __('Default', 'mappress-google-maps-for-wordpress'),
|
@@ -227,7 +220,14 @@ class Mappress_Settings {
|
|
227 |
}
|
228 |
|
229 |
function set_footer($name) {
|
230 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
231 |
}
|
232 |
|
233 |
function set_initial_open_info($name) {
|
3 |
* Options
|
4 |
*/
|
5 |
class Mappress_Options extends Mappress_Obj {
|
6 |
+
var $alignment,
|
|
|
7 |
$autoicons,
|
8 |
$autoupdate,
|
9 |
$apiKey,
|
10 |
$apiKeyServer,
|
11 |
$autodisplay = 'top',
|
12 |
+
$betas,
|
13 |
$country,
|
14 |
$css = true,
|
15 |
$defaultIcon,
|
16 |
$directions = 'google',
|
17 |
$directionsServer = 'https://maps.google.com',
|
18 |
+
$editable,
|
19 |
+
$filter,
|
20 |
$footer = true,
|
21 |
+
$hidden,
|
22 |
+
$hideEmpty,
|
|
|
23 |
$iconScale,
|
24 |
+
$initialOpenDirections,
|
25 |
+
$initialOpenInfo,
|
26 |
$iwType = 'iw',
|
27 |
$language,
|
28 |
$layers,
|
29 |
+
$layout,
|
30 |
$license,
|
31 |
$mashupTitle = 'poi',
|
32 |
$mashupBody = 'poi',
|
50 |
$thumbs = true,
|
51 |
$thumbSize,
|
52 |
$thumbWidth = 64,
|
53 |
+
$thumbHeight = 64
|
|
|
54 |
;
|
55 |
|
56 |
function __construct($options = '') {
|
121 |
$this->add_section('misc', __('Miscellaneous', 'mappress-google-maps-for-wordpress'));
|
122 |
$this->add_field('sizes', __('Map sizes', 'mappress-google-maps-for-wordpress'), 'misc');
|
123 |
$this->add_field('footer', __('Scripts', 'mappress-google-maps-for-wordpress'), 'misc');
|
|
|
124 |
}
|
125 |
|
126 |
function add_section($section, $title) {
|
173 |
return $input;
|
174 |
}
|
175 |
|
|
|
|
|
|
|
|
|
176 |
function set_alignment($name) {
|
177 |
$alignments = array(
|
178 |
'' => __('Default', 'mappress-google-maps-for-wordpress'),
|
220 |
}
|
221 |
|
222 |
function set_footer($name) {
|
223 |
+
// Disable if jetpack infinite scroll is used
|
224 |
+
if (Mappress::infinite_scroll()) {
|
225 |
+
echo Mappress_Controls::checkmark($name, false, __('Output scripts in footer', 'mappress-google-maps-for-wordpress'), array('disabled' => true));
|
226 |
+
printf("<br/><i>(%s)</i>", __('disabled for Jetpack Infinite Scroll', 'mappress-google-maps-for-wordpress'));
|
227 |
+
} else {
|
228 |
+
echo Mappress_Controls::checkmark($name, $this->options->footer, __('Output scripts in footer', 'mappress-google-maps-for-wordpress'));
|
229 |
+
printf("<br/><i>(%s)</i>", __('disable if maps are output using AJAX', 'mappress-google-maps-for-wordpress'));
|
230 |
+
}
|
231 |
}
|
232 |
|
233 |
function set_initial_open_info($name) {
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
4 |
Tags: google maps,google,map,maps,easy,poi,mapping,mapper,gps,lat,lon,latitude,longitude,geocoder,geocoding,georss,geo rss,geo,v3,marker,mashup,mash,api,v3,buddypress,mashup,geo,wp-geo,geo mashup,simplemap,simple,wpml
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 4.9
|
7 |
-
Stable tag: 2.
|
8 |
|
9 |
MapPress is the most popular and easiest way to create great-looking Google Maps and driving directions in your blog.
|
10 |
|
@@ -86,6 +86,21 @@ Please see the plugin documentation pages:
|
|
86 |
|
87 |
== Changelog ==
|
88 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
= 2.45.4 =
|
90 |
* Fixed: default custom style not applied when displaying map
|
91 |
|
@@ -107,7 +122,7 @@ Please see the plugin documentation pages:
|
|
107 |
* Removed: POI links ('poiLinks') setting removed
|
108 |
|
109 |
= 2.45 =
|
110 |
-
|
111 |
* Added: POI list sorting can now be set via the settings screen, the default is no sort
|
112 |
* Added: POI list can now be clicked anywhere to select a POI (not just the POI title)
|
113 |
* Added: a new 'hamburger' menu on the map provides map functions including centering and the bicycling, traffic, and transit layers
|
@@ -136,7 +151,6 @@ Please see the plugin documentation pages:
|
|
136 |
* Changed: plugin repository URL updated
|
137 |
|
138 |
= 2.44.2 =
|
139 |
-
=
|
140 |
* Changed: geocoding module has been updated
|
141 |
* Changed: the Nominatim geocoder has been removed
|
142 |
* Changed: when geocoding an 'address' field in format 'lat,lng' the field is used verbatim rather than mapped to the nearest street address
|
4 |
Tags: google maps,google,map,maps,easy,poi,mapping,mapper,gps,lat,lon,latitude,longitude,geocoder,geocoding,georss,geo rss,geo,v3,marker,mashup,mash,api,v3,buddypress,mashup,geo,wp-geo,geo mashup,simplemap,simple,wpml
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 4.9
|
7 |
+
Stable tag: 2.46
|
8 |
|
9 |
MapPress is the most popular and easiest way to create great-looking Google Maps and driving directions in your blog.
|
10 |
|
86 |
|
87 |
== Changelog ==
|
88 |
|
89 |
+
= 2.46 =
|
90 |
+
* Added: NEW TEMPLATES - this release includes all new template files - please update any custom templates to match the new versions.
|
91 |
+
* Added: mashup results can now be filtered by taxonomies, see the MapPress settings screen
|
92 |
+
* Added: setting 'Automatic updates' allows automatic updates for the Pro version
|
93 |
+
* Added: new layout with POIs on the left instead of under map, enable with: [mappresss layout="left"]
|
94 |
+
* Added: check for multiple Google Maps API loads
|
95 |
+
* Changed: template names now use hyphens instead of underscores and some names have changed: map_layout.php => map.php, map_poi_list.php => map-list.php
|
96 |
+
* Changed: CSS class names, for example for the POI list class '.mapp-poi-list' is now '.mapp-list'. Please update any custom CSS.
|
97 |
+
* Changed: use the 'hamburger' menu in the map editor to set a map's center & zoom (previously a checkbox was shown in the map editor)
|
98 |
+
* Changed: mashups now ignore any center/zoom settings and automatically center to show all POIs
|
99 |
+
* Changed: directions now have a Google Maps link. Transportation modes have been removed
|
100 |
+
* Changed: 'my location' shown only for SSL or localhost sites (Google has forbidden geolocation on non-secure sites)
|
101 |
+
* Changed: maps automatically recenter on screen resize (previously this was the 'adaptive' setting)
|
102 |
+
* Changed: scripts are now loaded in the header if JetPack Infinite Scroll is enabled
|
103 |
+
|
104 |
= 2.45.4 =
|
105 |
* Fixed: default custom style not applied when displaying map
|
106 |
|
122 |
* Removed: POI links ('poiLinks') setting removed
|
123 |
|
124 |
= 2.45 =
|
125 |
+
* Added: a new checkbox in the map editor allows you to choose whether to save the center and zoom. If unchecked, the map will auto-center when displayed.
|
126 |
* Added: POI list sorting can now be set via the settings screen, the default is no sort
|
127 |
* Added: POI list can now be clicked anywhere to select a POI (not just the POI title)
|
128 |
* Added: a new 'hamburger' menu on the map provides map functions including centering and the bicycling, traffic, and transit layers
|
151 |
* Changed: plugin repository URL updated
|
152 |
|
153 |
= 2.44.2 =
|
|
|
154 |
* Changed: geocoding module has been updated
|
155 |
* Changed: the Nominatim geocoder has been removed
|
156 |
* Changed: when geocoding an 'address' field in format 'lat,lng' the field is used verbatim rather than mapped to the nearest street address
|
templates/{map_controls.php → map-controls.php}
RENAMED
@@ -1,6 +1,12 @@
|
|
1 |
<div class='mapp-controls'>
|
2 |
-
<div data-mapp-position="TOP_LEFT" class='gmnoprint mapp-menu-toggle' data-mapp-action='menu' title='<?php _e('Menu', 'mappress-google-maps-for-wordpress');?>'></div>
|
3 |
<div data-mapp-position="TOP_LEFT" class='gmnoprint mapp-menu'>
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
<div class='mapp-menu-item' data-mapp-action='center'><?php _e('Center map', 'mappress-google-maps-for-wordpress');?></div>
|
5 |
|
6 |
<div class='mapp-menu-separator'></div>
|
1 |
<div class='mapp-controls'>
|
2 |
+
<div data-mapp-position="TOP_LEFT" class='gmnoprint mapp-menu-toggle' data-mapp-action='menu-toggle' title='<?php _e('Menu', 'mappress-google-maps-for-wordpress');?>'></div>
|
3 |
<div data-mapp-position="TOP_LEFT" class='gmnoprint mapp-menu'>
|
4 |
+
<?php if ($map->options->editable) : ?>
|
5 |
+
<div class='mapp-menu-item' data-mapp-action='viewport-set'><?php _e('Set center/zoom', 'mappress-google-maps-for-wordpress');?></div>
|
6 |
+
<div class='mapp-menu-item mapp-active' data-mapp-action='viewport-reset'><?php _e('Clear center/zoom', 'mappress-google-maps-for-wordpress');?></div>
|
7 |
+
<div class='mapp-menu-separator'></div>
|
8 |
+
<?php endif; ?>
|
9 |
+
|
10 |
<div class='mapp-menu-item' data-mapp-action='center'><?php _e('Center map', 'mappress-google-maps-for-wordpress');?></div>
|
11 |
|
12 |
<div class='mapp-menu-separator'></div>
|
templates/map-directions.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class='mapp-directions'>
|
2 |
+
<span class='mapp-close' data-mapp-action='dir-cancel'></span>
|
3 |
+
<?php if (Mappress::ssl()) : ?>
|
4 |
+
<a href='#' class='mapp-myloc' data-mapp-action='dir-myloc'><?php _e('My location', 'mappress-google-maps-for-wordpress'); ?></a>
|
5 |
+
<?php endif; ?>
|
6 |
+
<div>
|
7 |
+
<span class='mapp-dir-a'></span>
|
8 |
+
<input class='mapp-dir-saddr' tabindex='1'/>
|
9 |
+
<span data-mapp-action='dir-swap' class='mapp-dir-arrows'></span>
|
10 |
+
</div>
|
11 |
+
|
12 |
+
<div>
|
13 |
+
<span class='mapp-dir-b'></span>
|
14 |
+
<input class='mapp-dir-daddr' tabindex='2'/>
|
15 |
+
</div>
|
16 |
+
|
17 |
+
<div class='mapp-dir-toolbar'>
|
18 |
+
<a class='mapp-dir-google' href='#' data-mapp-action='dir-google'><?php esc_html_e('Google Maps', 'mappress-google-maps-for-wordpress'); ?></a>
|
19 |
+
<span class='mapp-button-submit' data-mapp-action='dir-get'><?php esc_html_e('Get Directions', 'mappress-google-maps-for-wordpress'); ?></span>
|
20 |
+
<span class='mapp-spinner' style='display:none'></span>
|
21 |
+
</div>
|
22 |
+
<div class='mapp-dir-renderer'></div>
|
23 |
+
</div>
|
templates/map-filters.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class='mapp-filters'>
|
2 |
+
<div class='mapp-filters-list'>
|
3 |
+
<?php $filter = new Mappress_Filter(array('key' => $map->options->filter, 'format' => null)); ?>
|
4 |
+
<div class='mapp-filter mapp-<?php echo $filter->key; ?>'>
|
5 |
+
<div class='mapp-filter-label'><?php echo $filter->get_label(); ?></div>
|
6 |
+
<div class='mapp-filter-values'><?php echo $filter->get_html(); ?></div>
|
7 |
+
</div>
|
8 |
+
</div>
|
9 |
+
<span class='mapp-button-submit mapp-filters-done' data-mapp-action='filters-toggle'><?php _e('Done', 'mappress-google-maps-for-wordpress');?></span>
|
10 |
+
<span class='mapp-button mapp-filters-reset' data-mapp-action='filters-reset'><?php _e('Reset', 'mappress-google-maps-for-wordpress');?></span>
|
11 |
+
|
12 |
+
</div>
|
templates/map-header.php
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<div class='mapp-header'>
|
2 |
+
<div class='mapp-caret mapp-button' data-mapp-action='filters-toggle'><?php _e('Filter', 'mappress-google-maps-for-wordpress');?></div>
|
3 |
+
</div>
|
4 |
+
|
templates/map-list.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class='mapp-list'>
|
2 |
+
<div class='mapp-pois'>
|
3 |
+
<?php foreach($map->pois as $i => $poi) : ?>
|
4 |
+
<?php if ($poi->type == 'kml') continue; ?>
|
5 |
+
<div class='mapp-poi' data-mapp-action='open' data-mapp-poi='<?php echo $i;?>'>
|
6 |
+
<div class="mapp-icon"><?php echo $poi->part('icon');?></div>
|
7 |
+
<div class='mapp-title'><?php echo $poi->part('title');?></div>
|
8 |
+
</div>
|
9 |
+
<?php endforeach; ?>
|
10 |
+
</div>
|
11 |
+
</div>
|
templates/map-poi.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class='mapp-iw'>
|
2 |
+
<div class='mapp-title'>
|
3 |
+
<?php echo $poi->part('title-link'); ?>
|
4 |
+
</div>
|
5 |
+
<div class='mapp-body'>
|
6 |
+
<?php echo $poi->part('thumbnail'); ?>
|
7 |
+
<?php echo $poi->part('body'); ?>
|
8 |
+
</div>
|
9 |
+
<div class='mapp-links'>
|
10 |
+
<?php echo $poi->part('directions'); ?>
|
11 |
+
</div>
|
12 |
+
</div>
|
templates/map.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div id="<?php echo $map->name; ?>" class='<?php echo $map->part('layout-class');?>' style='<?php echo $map->part('layout-style');?>' >
|
2 |
+
<?php echo $map->part('header'); ?>
|
3 |
+
<div class='mapp-wrapper' style='<?php echo $map->part('wrapper-style');?>' >
|
4 |
+
<div class='mapp-main'>
|
5 |
+
<?php echo $map->part('list-left'); ?>
|
6 |
+
<div class="mapp-canvas"></div>
|
7 |
+
<div class="mapp-dialog"><span class="mapp-spinner"></span><?php echo __('Loading', 'mappress-google-maps-for-wordpress'); ?></div>
|
8 |
+
<?php echo $map->part('filters'); ?>
|
9 |
+
<?php echo $map->part('controls'); ?>
|
10 |
+
</div>
|
11 |
+
</div>
|
12 |
+
<?php echo $map->part('directions'); ?>
|
13 |
+
<?php echo $map->part('list-inline'); ?>
|
14 |
+
<?php echo $map->part('footer'); ?>
|
15 |
+
</div>
|
templates/map_directions.php
DELETED
@@ -1,36 +0,0 @@
|
|
1 |
-
<form action='#'>
|
2 |
-
<div>
|
3 |
-
<a href='#' class='mapp-travelmode mapp-travelmode-on' title='<?php esc_html_e('By car', 'mappress-google-maps-for-wordpress'); ?>'><span class='mapp-dir-icon mapp-dir-car'></span></a>
|
4 |
-
<a href='#' class='mapp-travelmode' title='<?php esc_html_e('Public Transit', 'mappress-google-maps-for-wordpress'); ?>'><span class='mapp-dir-icon mapp-dir-transit'></span></a>
|
5 |
-
<a href='#' class='mapp-travelmode' title='<?php esc_html_e('Walking', 'mappress-google-maps-for-wordpress'); ?>'><span class='mapp-dir-icon mapp-dir-walk'></span></a>
|
6 |
-
<a href='#' class='mapp-travelmode' title='<?php esc_html_e('Bicycling', 'mappress-google-maps-for-wordpress'); ?>'><span class='mapp-dir-icon mapp-dir-bike'></span></a>
|
7 |
-
</div>
|
8 |
-
|
9 |
-
|
10 |
-
<div class='mapp-route'>
|
11 |
-
<a href='#' class='mapp-myloc'><?php _e('My location', 'mappress-google-maps-for-wordpress'); ?></a>
|
12 |
-
|
13 |
-
<div>
|
14 |
-
<span class='mapp-dir-icon mapp-dir-a'></span>
|
15 |
-
<input class='mapp-dir-saddr' tabindex='1'/>
|
16 |
-
<a href='#' class='mapp-dir-swap'><span class='mapp-dir-icon mapp-dir-arrows' title='<?php _e ('Swap start and end', 'mappress-google-maps-for-wordpress'); ?>'></span></a>
|
17 |
-
|
18 |
-
</div>
|
19 |
-
<div class='mapp-dir-saddr-err'></div>
|
20 |
-
|
21 |
-
<div>
|
22 |
-
<span class='mapp-dir-icon mapp-dir-b'></span>
|
23 |
-
<input class='mapp-dir-daddr' tabindex='2'/>
|
24 |
-
</div>
|
25 |
-
<div class='mapp-dir-daddr-err'></div>
|
26 |
-
</div>
|
27 |
-
|
28 |
-
<div style='margin-top: 10px;'>
|
29 |
-
<input type='submit' class='mapp-dir-get' value='<?php esc_html_e('Get Directions', 'mappress-google-maps-for-wordpress'); ?>'/>
|
30 |
-
<a href='#' class='mapp-dir-print'><?php _e('Print', 'mappress-google-maps-for-wordpress'); ?></a>
|
31 |
-
<a href='#' class='mapp-dir-close'><?php _e('Close', 'mappress-google-maps-for-wordpress'); ?></a>
|
32 |
-
<span class='mapp-spinner' style='display:none'></span>
|
33 |
-
</div>
|
34 |
-
</form>
|
35 |
-
|
36 |
-
<div class='mapp-dir-renderer'></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/map_layout.php
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
$width = $map->width();
|
3 |
-
$height = $map->height();
|
4 |
-
|
5 |
-
$id = $map->name . '_layout';
|
6 |
-
$style = "width: $width; " . $map->get_layout_style();
|
7 |
-
$class = $map->get_layout_class();
|
8 |
-
?>
|
9 |
-
|
10 |
-
<?php echo $map->get_show_link(); ?>
|
11 |
-
|
12 |
-
<div id="<?php echo $id; ?>" class="<?php echo $class; ?>" style="<?php echo $style; ?>">
|
13 |
-
<div id="<?php echo $map->name . '_links';?>" class="mapp-map-links"><?php echo $map->get_links(); ?></div>
|
14 |
-
<div id="<?php echo $map->name . '_dialog';?>" class="mapp-dialog"></div>
|
15 |
-
<div id="<?php echo $map->name;?>" class="mapp-canvas" style="<?php echo "width: 100%; height: $height; "; ?>"></div>
|
16 |
-
<div id="<?php echo $map->name . '_directions';?>" class="mapp-directions" style="width:100%"></div>
|
17 |
-
<div id="<?php echo $map->name . '_poi_list';?>" class="mapp-poi-list" style="width:100%"></div>
|
18 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/map_poi.php
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
<div class='mapp-iw'>
|
2 |
-
<div class='mapp-title'>
|
3 |
-
<?php echo $poi->get_title_link(); ?>
|
4 |
-
</div>
|
5 |
-
<div class='mapp-body'>
|
6 |
-
<?php echo $poi->get_thumbnail(array('class' => 'mapp-thumb')); ?>
|
7 |
-
<?php echo $poi->get_body(); ?>
|
8 |
-
</div>
|
9 |
-
<div class='mapp-links'>
|
10 |
-
<?php echo $poi->get_links(); ?>
|
11 |
-
</div>
|
12 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/map_poi_list.php
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
<table style='width:100%'>
|
2 |
-
<tbody>
|
3 |
-
<?php foreach($map->pois as $poi) : ?>
|
4 |
-
<?php if ($poi->type == 'kml') continue; ?>
|
5 |
-
<tr>
|
6 |
-
<td>
|
7 |
-
<?php echo $poi->get_icon(); ?>
|
8 |
-
</td>
|
9 |
-
<td style='width:100%'>
|
10 |
-
<div class='mapp-title'>
|
11 |
-
<?php echo $poi->get_open_link(); ?>
|
12 |
-
</div>
|
13 |
-
<div>
|
14 |
-
<?php echo $poi->get_links('poi_list'); ?>
|
15 |
-
</div>
|
16 |
-
</td>
|
17 |
-
</tr>
|
18 |
-
<?php endforeach; ?>
|
19 |
-
</tbody>
|
20 |
-
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|