Flexible Map - Version 1.15.0

Version Description

Download this release

Release Info

Developer webaware
Plugin Icon 128x128 Flexible Map
Version 1.15.0
Comparing to
See all releases

Code changes from version 1.14.0 to 1.15.0

changelog.md CHANGED
@@ -2,24 +2,43 @@
2
 
3
  ## Changelog
4
 
5
- ### 1.14.0, 2018-06-07
 
 
 
 
 
 
 
 
 
 
 
6
 
7
  * added: server API key to reduce `REQUEST_DENIED` errors from server side address resolution requests
8
  * changed: bump version of Google Maps API to 3.32
9
 
10
- ### 1.13.0, 2018-01-15
 
 
11
 
12
  * changed: bump version of Google Maps API to 3.30
13
 
14
- ### 1.12.1, 2016-11-18
 
 
15
 
16
  * changed: bump version of Google Maps API to 3.26
17
 
18
- ### 1.12.0, 2016-06-27
 
 
19
 
20
  * added: support for [Google Maps API key](https://cloud.google.com/maps-platform/#get-started), required [since 2016-06-22 for new websites](https://googlegeodevelopers.blogspot.com.au/2016/06/building-for-scale-updates-to-google.html).
21
 
22
- ### 1.11.0, 2016-06-05
 
 
23
 
24
  * fixed: monitor changes to invisible containers, not just non-displayed containers (thanks, [zetoun17](https://profiles.wordpress.org/zetoun17/)!)
25
  * fixed: "FlexibleMap is not defined" error when `isajax="1"` used without calling `flexmap_load_scripts()` (per the [FAQ](https://wordpress.org/plugins/wp-flexible-map/faq/))
@@ -28,7 +47,9 @@
28
  * changed: translations updated from translate.wordpress.org
29
  * changed: bump version of Google Maps API to 3.24
30
 
31
- ### 1.10.1, 2015-11-29
 
 
32
 
33
  * fixed: NextGEN Gallery breaks localisation of maps by messing with order of `wp_print_footer_scripts` calls
34
  * changed: Dutch translation updated / completed (thanks, [Chantal Coolsma](https://webpressed.nl/) and [TacoVerdo](https://profiles.wordpress.org/tacoverdo)!)
@@ -39,7 +60,9 @@
39
  * changed: bump version of Google Maps API to 3.22; NB: [control sizes have no effect with API v3.22](https://developers.google.com/maps/articles/v322-controls-diff)
40
  * changed: removed "sensor" query parameter to Google Maps API; no longer required
41
 
42
- ### 1.10.0, 2015-08-23
 
 
43
 
44
  * fixed: Brazilian Portuguese translation (thanks, Alexsandro Santos and Paulo Henrique!)
45
  * fixed: JavaScript error on KML map marker click when marker has no description
@@ -51,16 +74,22 @@
51
  * changed: bump version of Google Maps API to 3.20
52
  * changed: always load Google Maps API on HTTPS
53
 
54
- ### 1.9.2, 2015-03-21
 
 
55
 
56
  * fixed: sometimes vertical copyright message on IE8 with some themes
57
  * changed: bump version of Google Maps API to 3.19 (resolves some Safari styling issues)
58
 
59
- ### 1.9.1, 2014-12-29
 
 
60
 
61
  * fixed: zoom control styling / hiding was broken in v1.9.0
62
 
63
- ### 1.9.0, 2014-12-24
 
 
64
 
65
  * fixed: maps broken when hidden in tabs / accordions (not for IE 10 and earlier; uses MutationObserver)
66
  * fixed: strip spaces from map coordinates
@@ -70,30 +99,42 @@
70
  * added: `maptypes` attribute for selecting which map types can be picked by visitors
71
  * changed: refactored JavaScript for localised strings
72
 
73
- ### 1.8.3, 2014-12-17
 
 
74
 
75
  * fixed: CSS for directions in twentyfifteen theme and others that toss table-layout:fixed around willy nilly
76
 
77
- ### 1.8.2, 2014-12-06
 
 
78
 
79
  * added: Welsh translation (thanks, [Dylan](https://profiles.wordpress.org/dtom-ct-wp/)!)
80
 
81
- ### 1.8.1, 2014-10-05
 
 
82
 
83
  * fixed: Hungarian translation (thanks, Krisztián Vörös!)
84
  * changed: bump version of Google Maps API to 3.17
85
 
86
- ### 1.8.0, 2014-08-31
 
 
87
 
88
  * fixed: Czech translation (thanks, [caslavak](https://profiles.wordpress.org/caslavak/)!)
89
  * fixed: Norwegian translations (thanks, [neonnero](https://www.neonnero.com/)!)
90
  * changed: localisation uses standard .mo files now; if you'd like to help translate, please [sign up for an account and dig in](https://translate.wordpress.org/projects/wp-plugins/wp-flexible-map).
91
 
92
- ### 1.7.3.1, 2014-03-22
 
 
93
 
94
  * fixed: infowindow width on some Webkit browsers, and IE10/11
95
 
96
- ### 1.7.3, 2014-03-16
 
 
97
 
98
  * fixed: German translation (thanks, [Carib Design](https://www.caribdesign.com/)!)
99
  * fixed: some themes (e.g. Evolve) mess up Google Maps directions markers
@@ -104,18 +145,24 @@
104
  * added: WordPress filter `flexmap_shortcode_script`
105
  * removed: `visualrefresh` attribute doesn't do anything any more (Google Maps API has adopted Visual Refresh as standard)
106
 
107
- ### 1.7.2, 2014-01-01
 
 
108
 
109
  * fixed: Spanish translation (thanks, [edurramos](https://profiles.wordpress.org/edurramos/)!)
110
  * fixed: clean up JSHint warnings
111
  * changed: Slovenian translation refresh from Google Translate (human translators wanted!)
112
  * changed: plugin homepage, better documentation and examples, will develop as time permits!
113
 
114
- ### 1.7.1, 2013-10-13
 
 
115
 
116
  * fixed: Google link was showing marker at centre, not at marker location when marker != centre
117
 
118
- ### 1.7.0, 2013-10-12
 
 
119
 
120
  * fixed: Greek translation (thanks, [Pantelis Orfanos](https://profiles.wordpress.org/ironwiller/)!)
121
  * fixed: Dutch translation (thanks, [Ivan Beemster](https://lijndiensten.com/)!)
@@ -129,12 +176,16 @@
129
  * added: default CSS sets info window text color to #333
130
  * changed: bump version of Google Maps API to 3.13
131
 
132
- ### 1.6.5, 2013-07-19
 
 
133
 
134
  * fixed: stop twentythirteen theme stuffing up Google Maps infowindows with its too-promiscuous box-sizing rules
135
  * added: `dirdraggable` and `dirnomarkers` attributes
136
 
137
- ### 1.6.4, 2013-06-14
 
 
138
 
139
  * fixed: can set directions=false and showdirections=true
140
  * fixed: space before colon in fr translation (thanks, [mister klucha](https://wordpress.org/support/profile/mister-klucha)!)
@@ -142,16 +193,22 @@
142
  * changed: clicking directions link sets focus on From: address again
143
  * changed: bump version of Google Maps API to 3.12
144
 
145
- ### 1.6.3, 2013-03-14
 
 
146
 
147
  * fixed: HTML description now works for address-based maps (thanks, [John Sundberg](https://profiles.wordpress.org/bhwebworks/)!)
148
 
149
- ### 1.6.2, 2013-03-04
 
 
150
 
151
  * fixed: CSS fix for themes that muck up Google Maps images by specifying background colour on images without being selective
152
  * added: icon attribute to set marker icon on centre / address maps
153
 
154
- ### 1.6.1, 2013-01-29
 
 
155
 
156
  * fixed: infowindow auto-pans on load, to prevent the top of the bubble being cropped
157
  * added: WordPress filter `flexmap_google_maps_api_args` for filtering array of arguments before building Google Maps API URL
@@ -159,103 +216,143 @@
159
  * changed: all scripts now loaded through wp_enqueue_scripts, including language scripts (thanks to a [tip from toscho](https://wordpress.stackexchange.com/a/38335/24260))
160
  * changed: bump version of Google Maps API to 3.11
161
 
162
- ### 1.6.0, 2012-12-30
 
 
163
 
164
  * added: themes can call function flexmap_load_scripts() to force load of scripts, e.g. on single-page AJAX websites
165
  * added: can add HTML block to infowindow, e.g. images
166
  * fixed: no auto-focus on directions search field, thus no auto-scroll page to last directions search field!
167
 
168
- ### 1.5.3, 2012-11-30
 
 
169
 
170
  * fixed: when attributes showdirections or directionsfrom were specified, but not directions, the directions panel was not added to page and a JavaScript error was generated
171
  * changed: bump version of Google Maps API to 3.10
172
 
173
- ### 1.5.2, 2012-10-12
 
 
174
 
175
  * fixed: KML maps broken; KMLLayer status_changed event unreliable, use defaultviewport_changed event instead (possible Google Maps API change)
176
 
177
- ### 1.5.1, 2012-09-30
 
 
178
 
179
  * changed: tighten up FlexibleMap API to keep private members private (in case they change later)
180
 
181
- ### 1.5.0, 2012-09-29
 
 
182
 
183
  * added: new shortcode attribute "id" which will be used for the container div, instead of the random unique div id
184
  * added: FlexibleMap object is accessible via global variable with name derived from container div id (e.g. if you need to access the Google Maps map object in your own scripts)
185
  * added: redraw() and redrawOnce() methods, for when the map needs to be redrawn correctly (e.g. when initially hidden then revealed)
186
  * added: KML maps support directions (sponsored by [Roger Los](http://www.rogerlos.com/) -- thanks!)
187
 
188
- ### 1.4.1, 2012-09-11
 
 
189
 
190
  * fixed: targetfix was not stopping KML marker links opening in new window/tab since Google Maps API 3.9
191
 
192
- ### 1.4.0, 2012-08-22
 
 
193
 
194
  * changed: bump version of Google Maps API to 3.9
195
  * added: allow CSS units in ch, rem, vh, vw, vmin, vmax
196
 
197
- ### 1.3.1, 2012-07-13
 
 
198
 
199
  * fixed: width/height in digits (no units) defaults to pixels (sorry folks, I thought I tested that, but missed it somehow!)
200
 
201
- ### 1.3.0, 2012-07-12
 
 
202
 
203
  * fixed: Norwegian translation had incorrect file name
204
  * fixed: Malaysian translation had incorrect index (was overwriting Macedonian translation)
205
  * added: filters so that theme and plugin developers can modify the behaviour of this plugin
206
  * added: width and height can be any valid CSS units, not just pixels
207
 
208
- ### 1.2.0, 2012-06-29
 
 
209
 
210
  * added: option showdirections, to show the directions search when the map loads
211
  * added: option directionsfrom, to set the default from: location, and immediately search for directions when showdirections is set
212
 
213
- ### 1.1.2, 2012-05-20
 
 
214
 
215
  * fixed: some themes set box-shadow on all images, now forceably fixed for Google Maps images
216
  * added: option to control whether links on KML maps open in new window
217
 
218
- ### 1.1.1, 2012-04-15
 
 
219
 
220
  * fixed: instructions updated to reflect recent changes
221
 
222
- ### 1.1.0, 2012-04-15
 
 
223
 
224
  * added: locale-specific messages (using translations from Google Translate) e.g. Directions link
225
  * wanted: translators to help me add new translations, and clean up the messages I got from Google Translate!
226
  * fixed: use region to help refine street address searches
227
 
228
- ### 1.0.6, 2012-04-06
 
 
229
 
230
  * fixed: use plugin_dir_url() to get url base, and protocol-relative url to load Google Maps API (SSL compatible)
231
 
232
- ### 1.0.5, 2012-03-17
 
 
233
 
234
  * fixed: CSS fixes for themes that muck up Google Maps images (e.g. twentyeleven)
235
  * added: infowindow styles now in enqueued stylesheet
236
 
237
- ### 1.0.4, 2012-03-06
 
 
238
 
239
  * fixed: use LatLng methods to access latitude/longitude, instead of (ever changing) Google Maps API private members
240
  * added: tooltip on markers in non-KML maps
241
  * added: options to disable pan control, zoom control, drag to pan, double-click to zoom
242
 
243
- ### 1.0.3, 2012-02-27
 
 
244
 
245
  * fixed: address query updated to work with Google Maps v3.8 (so using address for centre marker works again)
246
  * fixed: tied Google Maps API to v3.8 so newer versions don't break plugin, and will keep updated as API changes
247
 
248
- ### 1.0.2, 2012-02-04
 
 
249
 
250
  * added: address attribute as alternative to center coordinates
251
  * added: use address attribute for directions, if given (so that directions match address)
252
  * changed: readme improved a little
253
  * changed: refactored code for DRY (don't repeat yourself)
254
 
255
- ### 1.0.1, 2012-01-26
 
 
256
 
257
  * fixed: directions bugs in JavaScript for Opera, IE
258
 
259
- ### 1.0.0, 2012-01-08
 
 
260
 
261
  * final cleanup for public release
2
 
3
  ## Changelog
4
 
5
+ ### 1.15.0
6
+
7
+ Released 2018-07-21
8
+
9
+ * fixed: KML maps can now use the `center` attribute to set the map center
10
+ * changed: remember server-side address lookups for up to one month
11
+ * added: attribute `hidefullscreen` for hiding the full-screen control
12
+ * added: attribute `markeranimation` for setting how a single marker is added to the map - drop, bounce, none; defaults to drop
13
+
14
+ ### 1.14.0
15
+
16
+ Released 2018-06-07
17
 
18
  * added: server API key to reduce `REQUEST_DENIED` errors from server side address resolution requests
19
  * changed: bump version of Google Maps API to 3.32
20
 
21
+ ### 1.13.0
22
+
23
+ Released 2018-01-15
24
 
25
  * changed: bump version of Google Maps API to 3.30
26
 
27
+ ### 1.12.1
28
+
29
+ Released 2016-11-18
30
 
31
  * changed: bump version of Google Maps API to 3.26
32
 
33
+ ### 1.12.0
34
+
35
+ Released 2016-06-27
36
 
37
  * added: support for [Google Maps API key](https://cloud.google.com/maps-platform/#get-started), required [since 2016-06-22 for new websites](https://googlegeodevelopers.blogspot.com.au/2016/06/building-for-scale-updates-to-google.html).
38
 
39
+ ### 1.11.0
40
+
41
+ Released 2016-06-05
42
 
43
  * fixed: monitor changes to invisible containers, not just non-displayed containers (thanks, [zetoun17](https://profiles.wordpress.org/zetoun17/)!)
44
  * fixed: "FlexibleMap is not defined" error when `isajax="1"` used without calling `flexmap_load_scripts()` (per the [FAQ](https://wordpress.org/plugins/wp-flexible-map/faq/))
47
  * changed: translations updated from translate.wordpress.org
48
  * changed: bump version of Google Maps API to 3.24
49
 
50
+ ### 1.10.1
51
+
52
+ Released 2015-11-29
53
 
54
  * fixed: NextGEN Gallery breaks localisation of maps by messing with order of `wp_print_footer_scripts` calls
55
  * changed: Dutch translation updated / completed (thanks, [Chantal Coolsma](https://webpressed.nl/) and [TacoVerdo](https://profiles.wordpress.org/tacoverdo)!)
60
  * changed: bump version of Google Maps API to 3.22; NB: [control sizes have no effect with API v3.22](https://developers.google.com/maps/articles/v322-controls-diff)
61
  * changed: removed "sensor" query parameter to Google Maps API; no longer required
62
 
63
+ ### 1.10.0
64
+
65
+ Released 2015-08-23
66
 
67
  * fixed: Brazilian Portuguese translation (thanks, Alexsandro Santos and Paulo Henrique!)
68
  * fixed: JavaScript error on KML map marker click when marker has no description
74
  * changed: bump version of Google Maps API to 3.20
75
  * changed: always load Google Maps API on HTTPS
76
 
77
+ ### 1.9.2
78
+
79
+ Released 2015-03-21
80
 
81
  * fixed: sometimes vertical copyright message on IE8 with some themes
82
  * changed: bump version of Google Maps API to 3.19 (resolves some Safari styling issues)
83
 
84
+ ### 1.9.1
85
+
86
+ Released 2014-12-29
87
 
88
  * fixed: zoom control styling / hiding was broken in v1.9.0
89
 
90
+ ### 1.9.0
91
+
92
+ Released 2014-12-24
93
 
94
  * fixed: maps broken when hidden in tabs / accordions (not for IE 10 and earlier; uses MutationObserver)
95
  * fixed: strip spaces from map coordinates
99
  * added: `maptypes` attribute for selecting which map types can be picked by visitors
100
  * changed: refactored JavaScript for localised strings
101
 
102
+ ### 1.8.3
103
+
104
+ Released 2014-12-17
105
 
106
  * fixed: CSS for directions in twentyfifteen theme and others that toss table-layout:fixed around willy nilly
107
 
108
+ ### 1.8.2
109
+
110
+ Released 2014-12-06
111
 
112
  * added: Welsh translation (thanks, [Dylan](https://profiles.wordpress.org/dtom-ct-wp/)!)
113
 
114
+ ### 1.8.1
115
+
116
+ Released 2014-10-05
117
 
118
  * fixed: Hungarian translation (thanks, Krisztián Vörös!)
119
  * changed: bump version of Google Maps API to 3.17
120
 
121
+ ### 1.8.0
122
+
123
+ Released 2014-08-31
124
 
125
  * fixed: Czech translation (thanks, [caslavak](https://profiles.wordpress.org/caslavak/)!)
126
  * fixed: Norwegian translations (thanks, [neonnero](https://www.neonnero.com/)!)
127
  * changed: localisation uses standard .mo files now; if you'd like to help translate, please [sign up for an account and dig in](https://translate.wordpress.org/projects/wp-plugins/wp-flexible-map).
128
 
129
+ ### 1.7.3.1
130
+
131
+ Released 2014-03-22
132
 
133
  * fixed: infowindow width on some Webkit browsers, and IE10/11
134
 
135
+ ### 1.7.3
136
+
137
+ Released 2014-03-16
138
 
139
  * fixed: German translation (thanks, [Carib Design](https://www.caribdesign.com/)!)
140
  * fixed: some themes (e.g. Evolve) mess up Google Maps directions markers
145
  * added: WordPress filter `flexmap_shortcode_script`
146
  * removed: `visualrefresh` attribute doesn't do anything any more (Google Maps API has adopted Visual Refresh as standard)
147
 
148
+ ### 1.7.2
149
+
150
+ Released 2014-01-01
151
 
152
  * fixed: Spanish translation (thanks, [edurramos](https://profiles.wordpress.org/edurramos/)!)
153
  * fixed: clean up JSHint warnings
154
  * changed: Slovenian translation refresh from Google Translate (human translators wanted!)
155
  * changed: plugin homepage, better documentation and examples, will develop as time permits!
156
 
157
+ ### 1.7.1
158
+
159
+ Released 2013-10-13
160
 
161
  * fixed: Google link was showing marker at centre, not at marker location when marker != centre
162
 
163
+ ### 1.7.0
164
+
165
+ Released 2013-10-12
166
 
167
  * fixed: Greek translation (thanks, [Pantelis Orfanos](https://profiles.wordpress.org/ironwiller/)!)
168
  * fixed: Dutch translation (thanks, [Ivan Beemster](https://lijndiensten.com/)!)
176
  * added: default CSS sets info window text color to #333
177
  * changed: bump version of Google Maps API to 3.13
178
 
179
+ ### 1.6.5
180
+
181
+ Released 2013-07-19
182
 
183
  * fixed: stop twentythirteen theme stuffing up Google Maps infowindows with its too-promiscuous box-sizing rules
184
  * added: `dirdraggable` and `dirnomarkers` attributes
185
 
186
+ ### 1.6.4
187
+
188
+ Released 2013-06-14
189
 
190
  * fixed: can set directions=false and showdirections=true
191
  * fixed: space before colon in fr translation (thanks, [mister klucha](https://wordpress.org/support/profile/mister-klucha)!)
193
  * changed: clicking directions link sets focus on From: address again
194
  * changed: bump version of Google Maps API to 3.12
195
 
196
+ ### 1.6.3
197
+
198
+ Released 2013-03-14
199
 
200
  * fixed: HTML description now works for address-based maps (thanks, [John Sundberg](https://profiles.wordpress.org/bhwebworks/)!)
201
 
202
+ ### 1.6.2
203
+
204
+ Released 2013-03-04
205
 
206
  * fixed: CSS fix for themes that muck up Google Maps images by specifying background colour on images without being selective
207
  * added: icon attribute to set marker icon on centre / address maps
208
 
209
+ ### 1.6.1
210
+
211
+ Released 2013-01-29
212
 
213
  * fixed: infowindow auto-pans on load, to prevent the top of the bubble being cropped
214
  * added: WordPress filter `flexmap_google_maps_api_args` for filtering array of arguments before building Google Maps API URL
216
  * changed: all scripts now loaded through wp_enqueue_scripts, including language scripts (thanks to a [tip from toscho](https://wordpress.stackexchange.com/a/38335/24260))
217
  * changed: bump version of Google Maps API to 3.11
218
 
219
+ ### 1.6.0
220
+
221
+ Released 2012-12-30
222
 
223
  * added: themes can call function flexmap_load_scripts() to force load of scripts, e.g. on single-page AJAX websites
224
  * added: can add HTML block to infowindow, e.g. images
225
  * fixed: no auto-focus on directions search field, thus no auto-scroll page to last directions search field!
226
 
227
+ ### 1.5.3
228
+
229
+ Released 2012-11-30
230
 
231
  * fixed: when attributes showdirections or directionsfrom were specified, but not directions, the directions panel was not added to page and a JavaScript error was generated
232
  * changed: bump version of Google Maps API to 3.10
233
 
234
+ ### 1.5.2
235
+
236
+ Released 2012-10-12
237
 
238
  * fixed: KML maps broken; KMLLayer status_changed event unreliable, use defaultviewport_changed event instead (possible Google Maps API change)
239
 
240
+ ### 1.5.1
241
+
242
+ Released 2012-09-30
243
 
244
  * changed: tighten up FlexibleMap API to keep private members private (in case they change later)
245
 
246
+ ### 1.5.0
247
+
248
+ Released 2012-09-29
249
 
250
  * added: new shortcode attribute "id" which will be used for the container div, instead of the random unique div id
251
  * added: FlexibleMap object is accessible via global variable with name derived from container div id (e.g. if you need to access the Google Maps map object in your own scripts)
252
  * added: redraw() and redrawOnce() methods, for when the map needs to be redrawn correctly (e.g. when initially hidden then revealed)
253
  * added: KML maps support directions (sponsored by [Roger Los](http://www.rogerlos.com/) -- thanks!)
254
 
255
+ ### 1.4.1
256
+
257
+ Released 2012-09-11
258
 
259
  * fixed: targetfix was not stopping KML marker links opening in new window/tab since Google Maps API 3.9
260
 
261
+ ### 1.4.0
262
+
263
+ Released 2012-08-22
264
 
265
  * changed: bump version of Google Maps API to 3.9
266
  * added: allow CSS units in ch, rem, vh, vw, vmin, vmax
267
 
268
+ ### 1.3.1
269
+
270
+ Released 2012-07-13
271
 
272
  * fixed: width/height in digits (no units) defaults to pixels (sorry folks, I thought I tested that, but missed it somehow!)
273
 
274
+ ### 1.3.0
275
+
276
+ Released 2012-07-12
277
 
278
  * fixed: Norwegian translation had incorrect file name
279
  * fixed: Malaysian translation had incorrect index (was overwriting Macedonian translation)
280
  * added: filters so that theme and plugin developers can modify the behaviour of this plugin
281
  * added: width and height can be any valid CSS units, not just pixels
282
 
283
+ ### 1.2.0
284
+
285
+ Released 2012-06-29
286
 
287
  * added: option showdirections, to show the directions search when the map loads
288
  * added: option directionsfrom, to set the default from: location, and immediately search for directions when showdirections is set
289
 
290
+ ### 1.1.2
291
+
292
+ Released 2012-05-20
293
 
294
  * fixed: some themes set box-shadow on all images, now forceably fixed for Google Maps images
295
  * added: option to control whether links on KML maps open in new window
296
 
297
+ ### 1.1.1
298
+
299
+ Released 2012-04-15
300
 
301
  * fixed: instructions updated to reflect recent changes
302
 
303
+ ### 1.1.0
304
+
305
+ Released 2012-04-15
306
 
307
  * added: locale-specific messages (using translations from Google Translate) e.g. Directions link
308
  * wanted: translators to help me add new translations, and clean up the messages I got from Google Translate!
309
  * fixed: use region to help refine street address searches
310
 
311
+ ### 1.0.6
312
+
313
+ Released 2012-04-06
314
 
315
  * fixed: use plugin_dir_url() to get url base, and protocol-relative url to load Google Maps API (SSL compatible)
316
 
317
+ ### 1.0.5
318
+
319
+ Released 2012-03-17
320
 
321
  * fixed: CSS fixes for themes that muck up Google Maps images (e.g. twentyeleven)
322
  * added: infowindow styles now in enqueued stylesheet
323
 
324
+ ### 1.0.4
325
+
326
+ Released 2012-03-06
327
 
328
  * fixed: use LatLng methods to access latitude/longitude, instead of (ever changing) Google Maps API private members
329
  * added: tooltip on markers in non-KML maps
330
  * added: options to disable pan control, zoom control, drag to pan, double-click to zoom
331
 
332
+ ### 1.0.3
333
+
334
+ Released 2012-02-27
335
 
336
  * fixed: address query updated to work with Google Maps v3.8 (so using address for centre marker works again)
337
  * fixed: tied Google Maps API to v3.8 so newer versions don't break plugin, and will keep updated as API changes
338
 
339
+ ### 1.0.2
340
+
341
+ Released 2012-02-04
342
 
343
  * added: address attribute as alternative to center coordinates
344
  * added: use address attribute for directions, if given (so that directions match address)
345
  * changed: readme improved a little
346
  * changed: refactored code for DRY (don't repeat yourself)
347
 
348
+ ### 1.0.1
349
+
350
+ Released 2012-01-26
351
 
352
  * fixed: directions bugs in JavaScript for Opera, IE
353
 
354
+ ### 1.0.0
355
+
356
+ Released 2012-01-08
357
 
358
  * final cleanup for public release
flexible-map.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Flexible Map
4
  Plugin URI: https://flexible-map.webaware.net.au/
5
  Description: Embed Google Maps shortcodes in pages and posts, either by centre coordinates or street address, or by URL to a Google Earth KML file. <a href="https://flexible-map.webaware.net.au/manual/getting-started/">Get started</a> with a simple shortcode. See the <a href="https://flexible-map.webaware.net.au/manual/attribute-reference/">complete attribute reference</a> for more details.
6
- Version: 1.14.0
7
  Author: WebAware
8
  Author URI: https://shop.webaware.com.au/
9
  Text Domain: wp-flexible-map
@@ -37,7 +37,7 @@ define('FLXMAP_PLUGIN_FILE', __FILE__);
37
  define('FLXMAP_PLUGIN_ROOT', dirname(__FILE__) . '/');
38
  define('FLXMAP_PLUGIN_NAME', basename(dirname(__FILE__)) . '/' . basename(__FILE__));
39
  define('FLXMAP_PLUGIN_OPTIONS', 'flexible_map');
40
- define('FLXMAP_PLUGIN_VERSION', '1.14.0');
41
 
42
  // shortcode tags
43
  define('FLXMAP_PLUGIN_TAG_MAP', 'flexiblemap');
3
  Plugin Name: Flexible Map
4
  Plugin URI: https://flexible-map.webaware.net.au/
5
  Description: Embed Google Maps shortcodes in pages and posts, either by centre coordinates or street address, or by URL to a Google Earth KML file. <a href="https://flexible-map.webaware.net.au/manual/getting-started/">Get started</a> with a simple shortcode. See the <a href="https://flexible-map.webaware.net.au/manual/attribute-reference/">complete attribute reference</a> for more details.
6
+ Version: 1.15.0
7
  Author: WebAware
8
  Author URI: https://shop.webaware.com.au/
9
  Text Domain: wp-flexible-map
37
  define('FLXMAP_PLUGIN_ROOT', dirname(__FILE__) . '/');
38
  define('FLXMAP_PLUGIN_NAME', basename(dirname(__FILE__)) . '/' . basename(__FILE__));
39
  define('FLXMAP_PLUGIN_OPTIONS', 'flexible_map');
40
+ define('FLXMAP_PLUGIN_VERSION', '1.15.0');
41
 
42
  // shortcode tags
43
  define('FLXMAP_PLUGIN_TAG_MAP', 'flexiblemap');
includes/class.FlxMapPlugin.php CHANGED
@@ -237,6 +237,10 @@ HTML;
237
  $script .= " f.zoomControl = false;\n";
238
  }
239
 
 
 
 
 
240
  if (!empty($attrs['zoomstyle'])) {
241
  $script .= " f.zoomControlStyle = \"{$this->str2js($attrs['zoomstyle'])}\";\n";
242
  }
@@ -286,6 +290,10 @@ HTML;
286
  $script .= " f.markerDirectionsInfo = false;\n";
287
  }
288
 
 
 
 
 
289
  if (isset($attrs['dirdraggable']) && self::isYes($attrs['dirdraggable'])) {
290
  $script .= " f.dirDraggable = true;\n";
291
  }
@@ -344,8 +352,8 @@ HTML;
344
  }
345
  }
346
 
347
- // add map based on coordinates, with optional marker coordinates
348
- if (isset($attrs['center']) && self::isCoordinates($attrs['center'])) {
349
  $marker = self::str2js(self::getCoordinates($attrs['center']));
350
  if (isset($attrs['marker']) && self::isCoordinates($attrs['marker']))
351
  $marker = self::str2js(self::getCoordinates($attrs['marker']));
@@ -423,11 +431,16 @@ HTML;
423
  $script .= " f.kmlcache = \"{$attrs['kmlcache']}\";\n";
424
  }
425
 
 
 
 
 
426
  $kmlfile = self::str2js($attrs['src']);
427
  $script .= " f.showKML(\"$divID\", \"$kmlfile\"";
428
 
429
- if (isset($attrs['zoom']))
430
  $script .= ', ' . preg_replace('/\D/', '', $attrs['zoom']);
 
431
 
432
  $script .= ");\n";
433
  }
@@ -556,14 +569,17 @@ HTML;
556
  // success, return array with latitude and longitude
557
  $location = $result->results[0]->geometry->location;
558
  $coords = array($location->lat, $location->lng);
 
 
 
559
  }
560
  catch (Exception $e) {
561
  $coords = "address: $address; " . $e->getMessage();
562
  error_log(__METHOD__ . ': ' . $coords);
563
- }
564
 
565
- // save coordinates to prevent unnecessary requery
566
- set_transient($cacheKey, $coords, WEEK_IN_SECONDS);
 
567
  }
568
 
569
  // handle failure to map address to coordinates by returning false
@@ -602,6 +618,15 @@ HTML;
602
  return preg_match('/^-?[0-9]+(?:\.[0-9]+),\s*-?[0-9]+(?:\.[0-9]+)$/', $text);
603
  }
604
 
 
 
 
 
 
 
 
 
 
605
  /**
606
  * return standardised coordinates from text
607
  * NB: assumes text passes isCoordinates() above
237
  $script .= " f.zoomControl = false;\n";
238
  }
239
 
240
+ if (isset($attrs['hidefullscreen']) && self::isYes($attrs['hidefullscreen'])) {
241
+ $script .= " f.fullscreen = false;\n";
242
+ }
243
+
244
  if (!empty($attrs['zoomstyle'])) {
245
  $script .= " f.zoomControlStyle = \"{$this->str2js($attrs['zoomstyle'])}\";\n";
246
  }
290
  $script .= " f.markerDirectionsInfo = false;\n";
291
  }
292
 
293
+ if (isset($attrs['markeranimation']) && self::isMarkerAnimation($attrs['markeranimation'])) {
294
+ $script .= sprintf(" f.markerAnimation = '%s';\n", strtolower($attrs['markeranimation']));
295
+ }
296
+
297
  if (isset($attrs['dirdraggable']) && self::isYes($attrs['dirdraggable'])) {
298
  $script .= " f.dirDraggable = true;\n";
299
  }
352
  }
353
  }
354
 
355
+ // add map based on coordinates, with optional marker coordinates -- but not if KML source file is set
356
+ if (isset($attrs['center']) && self::isCoordinates($attrs['center']) && empty($attrs['src'])) {
357
  $marker = self::str2js(self::getCoordinates($attrs['center']));
358
  if (isset($attrs['marker']) && self::isCoordinates($attrs['marker']))
359
  $marker = self::str2js(self::getCoordinates($attrs['marker']));
431
  $script .= " f.kmlcache = \"{$attrs['kmlcache']}\";\n";
432
  }
433
 
434
+ if (isset($attrs['center']) && self::isCoordinates($attrs['center'])) {
435
+ $script .= sprintf(" f.kmlCentre = [%s];\n", self::str2js(self::getCoordinates($attrs['center'])));
436
+ }
437
+
438
  $kmlfile = self::str2js($attrs['src']);
439
  $script .= " f.showKML(\"$divID\", \"$kmlfile\"";
440
 
441
+ if (isset($attrs['zoom'])) {
442
  $script .= ', ' . preg_replace('/\D/', '', $attrs['zoom']);
443
+ }
444
 
445
  $script .= ");\n";
446
  }
569
  // success, return array with latitude and longitude
570
  $location = $result->results[0]->geometry->location;
571
  $coords = array($location->lat, $location->lng);
572
+
573
+ // save coordinates to prevent unnecessary requery
574
+ set_transient($cacheKey, $coords, MONTH_IN_SECONDS);
575
  }
576
  catch (Exception $e) {
577
  $coords = "address: $address; " . $e->getMessage();
578
  error_log(__METHOD__ . ': ' . $coords);
 
579
 
580
+ // save error to prevent unnecessary requery
581
+ set_transient($cacheKey, $coords, WEEK_IN_SECONDS);
582
+ }
583
  }
584
 
585
  // handle failure to map address to coordinates by returning false
618
  return preg_match('/^-?[0-9]+(?:\.[0-9]+),\s*-?[0-9]+(?:\.[0-9]+)$/', $text);
619
  }
620
 
621
+ /**
622
+ * test string to see if contents equate to a marker animation constant
623
+ * @param string $text
624
+ * @return boolean
625
+ */
626
+ public static function isMarkerAnimation($text) {
627
+ return preg_match('/^(?:drop|bounce|none)$/i', $text);
628
+ }
629
+
630
  /**
631
  * return standardised coordinates from text
632
  * NB: assumes text passes isCoordinates() above
js/flexible-map.js CHANGED
@@ -137,6 +137,7 @@ window.FlexibleMap = function() {
137
  streetViewControl: this.streetViewControl,
138
  zoomControl: this.zoomControl,
139
  zoomControlOptions: { style: zoomControlStyle },
 
140
  draggable: this.draggable,
141
  disableDoubleClickZoom: !this.dblclickZoom,
142
  scrollwheel: this.scrollwheel,
@@ -169,13 +170,36 @@ window.FlexibleMap = function() {
169
  */
170
  this.loadKmlMap = function(kmlFileURL) {
171
  // load KML file as a layer and add to map
172
- kmlLayer = new google.maps.KmlLayer({ map: map, url: kmlFileURL });
 
 
 
 
 
 
 
 
 
 
 
173
 
174
- // listen for KML loaded
175
- google.maps.event.addListenerOnce(kmlLayer, "defaultviewport_changed", function() {
176
- // update centre of map from bounds on KML layer
 
177
  centre = kmlLayer.getDefaultViewport().getCenter();
178
- });
 
 
 
 
 
 
 
 
 
 
 
179
 
180
  return kmlLayer;
181
  };
@@ -193,6 +217,7 @@ window.FlexibleMap = function() {
193
  this.zoomControl = true; // show control for zooming
194
  this.zoomControlStyle = "small"; // from "small", "large", "default"
195
  this.streetViewControl = false; // no control for street view
 
196
  this.scrollwheel = false; // no scroll wheel zoom
197
  this.draggable = true; // support dragging to pan
198
  this.dblclickZoom = true; // support double-click zoom
@@ -205,6 +230,7 @@ window.FlexibleMap = function() {
205
  this.markerLinkText = false; // link text for marker link, overriding default text
206
  this.markerIcon = ""; // link for marker icon, leave blank for default
207
  this.markerShowInfo = true; // if have infowin for marker, show it immediately
 
208
  this.markerDirections = false; // show directions link in info window
209
  this.markerDirectionsShow = false; // show directions as soon as page loads
210
  this.markerDirectionsDefault = ""; // default from: location for directions
@@ -221,6 +247,7 @@ window.FlexibleMap = function() {
221
  this.region = "";
222
  this.locale = "en";
223
  this.localeActive = false;
 
224
  this.kmlcache = "none";
225
  }
226
 
@@ -525,13 +552,28 @@ FlexibleMap.prototype = (function() {
525
  * @param {Array} marker an array of two integers: [ latitude, longitude ]
526
  */
527
  showMarker: function(divID, centre, marker) {
528
- var map = this.showMap(divID, centre),
529
- markerLocation = new google.maps.LatLng(marker[0], marker[1]),
530
- point = new google.maps.Marker({
531
  map: map,
532
  position: markerLocation,
533
  icon: this.markerIcon
534
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
535
 
536
  this.setMarkerPoint(point);
537
  this.setMarkerLocation(markerLocation);
137
  streetViewControl: this.streetViewControl,
138
  zoomControl: this.zoomControl,
139
  zoomControlOptions: { style: zoomControlStyle },
140
+ fullscreenControl: this.fullscreen,
141
  draggable: this.draggable,
142
  disableDoubleClickZoom: !this.dblclickZoom,
143
  scrollwheel: this.scrollwheel,
170
  */
171
  this.loadKmlMap = function(kmlFileURL) {
172
  // load KML file as a layer and add to map
173
+ var self = this;
174
+ var options = {
175
+ map: map,
176
+ url: kmlFileURL,
177
+ };
178
+
179
+ /**
180
+ * reset the map back to the recorded centre coordinates -- only used when centre is set for map
181
+ */
182
+ function resetCentre() {
183
+ self.setCenter(new google.maps.LatLng(self.kmlCentre[0], self.kmlCentre[1]));
184
+ }
185
 
186
+ /**
187
+ * update centre of map from bounds on KML layer -- not called when centre is set for map
188
+ */
189
+ function recordKmlCentre() {
190
  centre = kmlLayer.getDefaultViewport().getCenter();
191
+ }
192
+
193
+ // if a centre has been set, stop the viewport from changing and add the centre to map options
194
+ if (this.kmlCentre) {
195
+ options.preserveViewport = true;
196
+ options.center = new google.maps.LatLng(this.kmlCentre[0], this.kmlCentre[1]);
197
+ }
198
+
199
+ kmlLayer = new google.maps.KmlLayer(options);
200
+
201
+ // listen for KML layer loaded event
202
+ google.maps.event.addListenerOnce(kmlLayer, "defaultviewport_changed", this.kmlCentre ? resetCentre : recordKmlCentre);
203
 
204
  return kmlLayer;
205
  };
217
  this.zoomControl = true; // show control for zooming
218
  this.zoomControlStyle = "small"; // from "small", "large", "default"
219
  this.streetViewControl = false; // no control for street view
220
+ this.fullscreen = true; // show control for full-screen view
221
  this.scrollwheel = false; // no scroll wheel zoom
222
  this.draggable = true; // support dragging to pan
223
  this.dblclickZoom = true; // support double-click zoom
230
  this.markerLinkText = false; // link text for marker link, overriding default text
231
  this.markerIcon = ""; // link for marker icon, leave blank for default
232
  this.markerShowInfo = true; // if have infowin for marker, show it immediately
233
+ this.markerAnimation = "drop"; // marker animation - bounce, drop, none
234
  this.markerDirections = false; // show directions link in info window
235
  this.markerDirectionsShow = false; // show directions as soon as page loads
236
  this.markerDirectionsDefault = ""; // default from: location for directions
247
  this.region = "";
248
  this.locale = "en";
249
  this.localeActive = false;
250
+ this.kmlCentre = false;
251
  this.kmlcache = "none";
252
  }
253
 
552
  * @param {Array} marker an array of two integers: [ latitude, longitude ]
553
  */
554
  showMarker: function(divID, centre, marker) {
555
+ var map = this.showMap(divID, centre);
556
+ var markerLocation = new google.maps.LatLng(marker[0], marker[1]);
557
+ var options = {
558
  map: map,
559
  position: markerLocation,
560
  icon: this.markerIcon
561
+ };
562
+ var Animation = google.maps.Animation;
563
+
564
+ switch (this.markerAnimation) {
565
+
566
+ case "drop":
567
+ options.animation = Animation.DROP;
568
+ break;
569
+
570
+ case "bounce":
571
+ options.animation = Animation.BOUNCE;
572
+ break;
573
+
574
+ }
575
+
576
+ var point = new google.maps.Marker(options);
577
 
578
  this.setMarkerPoint(point);
579
  this.setMarkerLocation(markerLocation);
js/flexible-map.min.js CHANGED
@@ -1,4 +1,4 @@
1
  // Flexible Map
2
  // https://flexible-map.webaware.net.au/
3
 
4
- window.FlexibleMap=function(){"use strict";var n,a,t,i,r,o,e=!1;this.getMap=function(){return n},this.getCenter=function(){return a},this.setCenter=function(e){a=e,n.setCenter(a)},this.setMarkerLocation=function(e){t=e},this.getMarkerLocation=function(){return t},this.setMarkerPoint=function(e){i=e},this.getMarkerPoint=function(){return i},this.setMarkerInfowin=function(e){r=e},this.getMarkerInfowin=function(){return r},this.getKmlLayer=function(){return o},this.redrawOnce=function(){e||(e=!0,this.redraw())},this.showMap=function(e,t){a=new google.maps.LatLng(t[0],t[1]);var i,r={small:google.maps.ZoomControlStyle.SMALL,large:google.maps.ZoomControlStyle.LARGE,default:google.maps.ZoomControlStyle.DEFAULT},o=r.small;return this.zoomControlStyle in r&&(o=r[this.zoomControlStyle]),i={mapTypeId:this.mapTypeId,mapTypeControl:this.mapTypeControl,scaleControl:this.scaleControl,panControl:this.panControl,streetViewControl:this.streetViewControl,zoomControl:this.zoomControl,zoomControlOptions:{style:o},draggable:this.draggable,disableDoubleClickZoom:!this.dblclickZoom,scrollwheel:this.scrollwheel,center:a,zoom:this.zoom},this.mapTypeIds&&(i.mapTypeControlOptions={mapTypeIds:this.mapTypeIds.split(",")}),n=new google.maps.Map(document.getElementById(e),i),this.mapTypeId in this.mapTypes&&n.mapTypes.set(this.mapTypeId,this.mapTypes[this.mapTypeId]._styled_map),n},this.loadKmlMap=function(e){return o=new google.maps.KmlLayer({map:n,url:e}),google.maps.event.addListenerOnce(o,"defaultviewport_changed",function(){a=o.getDefaultViewport().getCenter()}),o},!this.localised&&"flxmap"in window&&this.localise(),this.mapTypeId=google.maps.MapTypeId.ROADMAP,this.mapTypeControl=!0,this.scaleControl=!1,this.panControl=!1,this.zoomControl=!0,this.zoomControlStyle="small",this.streetViewControl=!1,this.scrollwheel=!1,this.draggable=!0,this.dblclickZoom=!0,this.zoom=16,this.markerTitle="",this.markerDescription="",this.markerHTML="",this.markerLink="",this.markerLinkTarget="",this.markerLinkText=!1,this.markerIcon="",this.markerShowInfo=!0,this.markerDirections=!1,this.markerDirectionsShow=!1,this.markerDirectionsDefault="",this.markerAddress="",this.targetFix=!0,this.dirService=!1,this.dirRenderer=!1,this.dirDraggable=!1,this.dirSuppressMarkers=!1,this.dirShowSteps=!0,this.dirShowSearch=!0,this.dirTravelMode="driving",this.dirUnitSystem=void 0,this.region="",this.locale="en",this.localeActive=!1,this.kmlcache="none"},FlexibleMap.prototype=function(){"use strict";var g,f,k;document.addEventListener?(g=function(e,t,i){e.addEventListener(t,i,!1)},f=function(e){e.stopPropagation(),e.preventDefault()}):document.attachEvent&&(g=function(e,t,i){e.attachEvent("on"+t,function(){i.call(e,window.event)})},f=function(e){e.cancelBubble=!0,e.returnValue=0}),k="undefined"!=typeof MutationObserver?function(i,e){var r=document.getElementById(e).parentNode;function o(e){var t=window.getComputedStyle(e);return"none"===t.display||"hidden"===t.visibility}o(r)&&new MutationObserver(function(e,t){o(r)||(i.redrawOnce(),t.disconnect())}).observe(r,{attributes:!0,attributeFilter:["style"]})}:function(){};var l=function(){function t(e){var t=e.charCodeAt(0),i=t.toString(16);return t<256?"\\x"+("00"+i).slice(-2):"\\u"+("0000"+i).slice(-4)}return function(e){return e.replace(/[\\/"'&<>\x00-\x1f\x7f-\xa0\u2000-\u200f\u2028-\u202f]/g,t)}}();return{constructor:FlexibleMap,i18n:{},mapTypes:{},localised:!1,localise:function(){var e,t;if("i18n"in flxmap&&(FlexibleMap.prototype.i18n=flxmap.i18n),"mapTypes"in flxmap){for(e in t=flxmap.mapTypes)t[e]._styled_map=new google.maps.StyledMapType(t[e].styles,t[e].options);FlexibleMap.prototype.mapTypes=t}FlexibleMap.prototype.localised=!0},setlocale:function(e){return(this.locale=e)in this.i18n?this.localeActive=e:e.substr(0,2)in this.i18n?this.localeActive=e:this.localeActive=!1,this.localeActive},gettext:function(e){var t=this.localeActive;return t&&e in this.i18n[t]?this.i18n[t][e]:e},showKML:function(e,t,i){void 0!==i&&(this.zoom=i);var a=this,r=document.getElementById(e),s=r.getAttribute("data-flxmap"),o=this.showMap(e,[0,0]),n=this.loadKmlMap(function(e,t){var i,r,o,n=/^(\d+)\s*(minute|hour|day)s?$/.exec(t);if(n){switch(i=(new Date).getTime(),o=+n[1],n[2]){case"minute":o<5&&(o=5),r=i/(6e4*o);break;case"hour":r=i/(36e5*o);break;case"day":r=i/(864e5*o);break;default:r=!1}r&&(r=Math.floor(r),e+=(-1<e.indexOf("?")?"&":"?")+"nocache="+r)}return e}(t,this.kmlcache));k(this,e),void 0!==i&&google.maps.event.addListenerOnce(o,"zoom_changed",function(){o.setZoom(i),a.zoom=i}),(this.markerDirections||this.markerDirectionsShow)&&this.startDirService(o),google.maps.event.addListener(n,"click",function(e){var t=e.featureData;if(!t._flxmapOnce){if(t._flxmapOnce=!0,a.targetFix&&t.description){var i=/ target="_blank"/gi;t.description=t.description.replace(i,""),t.infoWindowHtml=t.infoWindowHtml.replace(i,"")}if(a.markerDirections){var r=e.latLng,o=r.lat()+","+r.lng()+",'"+l(t.name)+"',true",n='<br /><a href="#" data-flxmap-fix-opera="1" onclick="'+s+".showDirections("+o+'); return false;">'+a.gettext("Directions")+"</a>";t.infoWindowHtml=t.infoWindowHtml.replace(/<\/div><\/div>$/i,n+"</div></div>")}}}),window.opera&&this.markerDirections&&g(r,"click",function(e){e.target.getAttribute("data-flxmap-fix-opera")&&f(e)})},showMarker:function(e,t,i){var r=this.showMap(e,t),o=new google.maps.LatLng(i[0],i[1]),n=new google.maps.Marker({map:r,position:o,icon:this.markerIcon});if(this.setMarkerPoint(n),this.setMarkerLocation(o),k(this,e),this.markerTitle||(this.markerTitle=this.markerAddress),this.markerTitle||this.markerHTML||this.markerDescription||this.markerLink||this.markerDirections){var a,s,l,c,d,m,h=this,p=document.createElement("DIV");if(p.className="flxmap-infowin",(d=document.createElement("DIV")).className="flxmap-marker-title",this.markerTitle&&(d.appendChild(document.createTextNode(this.markerTitle)),n.setTitle(this.markerTitle)),p.appendChild(d),this.markerHTML&&((d=document.createElement("DIV")).innerHTML=this.markerHTML,p.appendChild(d)),this.markerDescription||this.markerLink){if((d=document.createElement("DIV")).className="flxmap-marker-link",this.markerDescription){for(a=0,s=(l=this.markerDescription.split("\n")).length;a<s;a++)0<a&&d.appendChild(document.createElement("BR")),d.appendChild(document.createTextNode(l[a]));this.markerLink&&d.appendChild(document.createElement("BR"))}this.markerLink&&((m=document.createElement("A")).href=this.markerLink,this.markerLinkTarget&&(m.target=this.markerLinkTarget),m.appendChild(document.createTextNode(this.markerLinkText||this.gettext("Click for details"))),d.appendChild(m)),p.appendChild(d)}this.markerDirections&&((d=document.createElement("DIV")).className="flxmap-directions-link",(m=document.createElement("A")).href="#",m.dataLatitude=i[0],m.dataLongitude=i[1],g(m,"click",function(e){f(e),h.showDirections(this.dataLatitude,this.dataLongitude,!0)}),m.appendChild(document.createTextNode(this.gettext("Directions"))),d.appendChild(m),p.appendChild(d)),c=new google.maps.InfoWindow({content:p}),this.setMarkerInfowin(c),this.markerShowInfo&&google.maps.event.addListenerOnce(r,"tilesloaded",function(){c.open(r,n)}),google.maps.event.addListener(n,"click",function(){c.open(r,n)});var u=function(){h.updateGoogleLink()};google.maps.event.addListener(r,"idle",u),google.maps.event.addListener(r,"center_changed",u),google.maps.event.addListenerOnce(r,"tilesloaded",u)}(this.markerDirections||this.markerDirectionsShow)&&(this.startDirService(r),this.markerDirectionsShow&&this.showDirections(i[0],i[1],!1))},showAddress:function(o,e){var n=this,t=new google.maps.Geocoder;this.markerAddress=e,""===this.markerTitle&&(this.markerTitle=e),t.geocode({address:e,region:this.region},function(e,t){if(t===google.maps.GeocoderStatus.OK){var i=e[0].geometry.location,r=[i.lat(),i.lng()];n.showMarker(o,r,r)}else window.alert("Map address returns error: "+t)})},updateGoogleLink:function(){if("querySelectorAll"in document)try{for(var e=this.getMap().getDiv(),t=this.getMarkerLocation(),i=e.querySelectorAll("a[href*='maps.google.com/maps']:not([href*='mps_dialog']):not([href*='&q='])"),r=0,o=i.length,n=encodeURIComponent((this.markerAddress?this.markerAddress:this.markerTitle)+" @"+t.lat()+","+t.lng());r<o;r++)i[r].href+="&mrt=loc&iwloc=A&q="+n}catch(e){}},redraw:function(){var e=this.getMap(),t=this.getKmlLayer();if(google.maps.event.trigger(e,"resize"),t)e.fitBounds(t.getDefaultViewport());else{e.setCenter(this.getCenter()),e.setZoom(this.zoom);var i=this.getMarkerInfowin();i&&i.open(e,this.getMarkerPoint())}},startDirService:function(e){this.dirService||(this.dirService=new google.maps.DirectionsService),this.dirRenderer||(this.dirRenderer=new google.maps.DirectionsRenderer({map:e,draggable:this.dirDraggable,suppressMarkers:this.dirSuppressMarkers,panel:this.dirShowSteps?document.getElementById(this.markerDirectionsDiv):null}))},showDirections:function(i,r,n){var a=this;function s(e){var t={origin:e,destination:""===a.markerAddress?new google.maps.LatLng(i,r):a.markerAddress};switch(a.region&&(t.region=a.region),a.dirTravelMode){case"bicycling":t.travelMode=google.maps.TravelMode.BICYCLING;break;case"driving":t.travelMode=google.maps.TravelMode.DRIVING;break;case"transit":t.travelMode=google.maps.TravelMode.TRANSIT;break;case"walking":t.travelMode=google.maps.TravelMode.WALKING}switch(a.dirUnitSystem){case"imperial":t.unitSystem=google.maps.UnitSystem.IMPERIAL;break;case"metric":t.unitSystem=google.maps.UnitSystem.METRIC}a.dirService.route(t,o)}function o(e,t){var i=google.maps.DirectionsStatus;switch(t){case i.OK:a.dirRenderer.setDirections(e);break;case i.ZERO_RESULTS:window.alert("No route could be found between the origin and destination.");break;case i.OVER_QUERY_LIMIT:window.alert("The webpage has gone over the requests limit in too short a period of time.");break;case i.REQUEST_DENIED:window.alert("The webpage is not allowed to use the directions service.");break;case i.INVALID_REQUEST:window.alert("Invalid directions request.");break;case i.NOT_FOUND:window.alert("Origin or destination was not found.");break;default:window.alert("A directions request could not be processed due to a server error. The request may succeed if you try again.")}}this.markerDirectionsDiv&&this.dirShowSearch&&function(){var e,t,i,r=document.getElementById(a.markerDirectionsDiv),o=document.createElement("form");for(t=r.lastChild;t;t=r.lastChild)r.removeChild(t);(t=document.createElement("p")).appendChild(document.createTextNode(a.gettext("From")+": ")),(i=document.createElement("input")).type="text",i.name="from",i.value=a.markerDirectionsDefault,t.appendChild(i),(e=document.createElement("input")).type="submit",e.value=a.gettext("Get directions"),t.appendChild(e),o.appendChild(t),r.appendChild(o),void 0===o.elements.from&&(o.elements.from=i),n&&i.focus(),g(o,"submit",function(e){f(e);var t=this.elements.from.value;/\S/.test(t)&&s(t)})}(),this.markerDirectionsDefault&&s(this.markerDirectionsDefault)}}}();
1
  // Flexible Map
2
  // https://flexible-map.webaware.net.au/
3
 
4
+ window.FlexibleMap=function(){"use strict";var n,a,t,i,r,o,e=!1;this.getMap=function(){return n},this.getCenter=function(){return a},this.setCenter=function(e){a=e,n.setCenter(a)},this.setMarkerLocation=function(e){t=e},this.getMarkerLocation=function(){return t},this.setMarkerPoint=function(e){i=e},this.getMarkerPoint=function(){return i},this.setMarkerInfowin=function(e){r=e},this.getMarkerInfowin=function(){return r},this.getKmlLayer=function(){return o},this.redrawOnce=function(){e||(e=!0,this.redraw())},this.showMap=function(e,t){a=new google.maps.LatLng(t[0],t[1]);var i,r={small:google.maps.ZoomControlStyle.SMALL,large:google.maps.ZoomControlStyle.LARGE,default:google.maps.ZoomControlStyle.DEFAULT},o=r.small;return this.zoomControlStyle in r&&(o=r[this.zoomControlStyle]),i={mapTypeId:this.mapTypeId,mapTypeControl:this.mapTypeControl,scaleControl:this.scaleControl,panControl:this.panControl,streetViewControl:this.streetViewControl,zoomControl:this.zoomControl,zoomControlOptions:{style:o},fullscreenControl:this.fullscreen,draggable:this.draggable,disableDoubleClickZoom:!this.dblclickZoom,scrollwheel:this.scrollwheel,center:a,zoom:this.zoom},this.mapTypeIds&&(i.mapTypeControlOptions={mapTypeIds:this.mapTypeIds.split(",")}),n=new google.maps.Map(document.getElementById(e),i),this.mapTypeId in this.mapTypes&&n.mapTypes.set(this.mapTypeId,this.mapTypes[this.mapTypeId]._styled_map),n},this.loadKmlMap=function(e){var t=this,i={map:n,url:e};return this.kmlCentre&&(i.preserveViewport=!0,i.center=new google.maps.LatLng(this.kmlCentre[0],this.kmlCentre[1])),o=new google.maps.KmlLayer(i),google.maps.event.addListenerOnce(o,"defaultviewport_changed",this.kmlCentre?function(){t.setCenter(new google.maps.LatLng(t.kmlCentre[0],t.kmlCentre[1]))}:function(){a=o.getDefaultViewport().getCenter()}),o},!this.localised&&"flxmap"in window&&this.localise(),this.mapTypeId=google.maps.MapTypeId.ROADMAP,this.mapTypeControl=!0,this.scaleControl=!1,this.panControl=!1,this.zoomControl=!0,this.zoomControlStyle="small",this.streetViewControl=!1,this.fullscreen=!0,this.scrollwheel=!1,this.draggable=!0,this.dblclickZoom=!0,this.zoom=16,this.markerTitle="",this.markerDescription="",this.markerHTML="",this.markerLink="",this.markerLinkTarget="",this.markerLinkText=!1,this.markerIcon="",this.markerShowInfo=!0,this.markerAnimation="drop",this.markerDirections=!1,this.markerDirectionsShow=!1,this.markerDirectionsDefault="",this.markerAddress="",this.targetFix=!0,this.dirService=!1,this.dirRenderer=!1,this.dirDraggable=!1,this.dirSuppressMarkers=!1,this.dirShowSteps=!0,this.dirShowSearch=!0,this.dirTravelMode="driving",this.dirUnitSystem=void 0,this.region="",this.locale="en",this.localeActive=!1,this.kmlCentre=!1,this.kmlcache="none"},FlexibleMap.prototype=function(){"use strict";var k,v,w;document.addEventListener?(k=function(e,t,i){e.addEventListener(t,i,!1)},v=function(e){e.stopPropagation(),e.preventDefault()}):document.attachEvent&&(k=function(e,t,i){e.attachEvent("on"+t,function(){i.call(e,window.event)})},v=function(e){e.cancelBubble=!0,e.returnValue=0}),w="undefined"!=typeof MutationObserver?function(i,e){var r=document.getElementById(e).parentNode;function o(e){var t=window.getComputedStyle(e);return"none"===t.display||"hidden"===t.visibility}o(r)&&new MutationObserver(function(e,t){o(r)||(i.redrawOnce(),t.disconnect())}).observe(r,{attributes:!0,attributeFilter:["style"]})}:function(){};var l=function(){function t(e){var t=e.charCodeAt(0),i=t.toString(16);return t<256?"\\x"+("00"+i).slice(-2):"\\u"+("0000"+i).slice(-4)}return function(e){return e.replace(/[\\/"'&<>\x00-\x1f\x7f-\xa0\u2000-\u200f\u2028-\u202f]/g,t)}}();return{constructor:FlexibleMap,i18n:{},mapTypes:{},localised:!1,localise:function(){var e,t;if("i18n"in flxmap&&(FlexibleMap.prototype.i18n=flxmap.i18n),"mapTypes"in flxmap){for(e in t=flxmap.mapTypes)t[e]._styled_map=new google.maps.StyledMapType(t[e].styles,t[e].options);FlexibleMap.prototype.mapTypes=t}FlexibleMap.prototype.localised=!0},setlocale:function(e){return(this.locale=e)in this.i18n?this.localeActive=e:e.substr(0,2)in this.i18n?this.localeActive=e:this.localeActive=!1,this.localeActive},gettext:function(e){var t=this.localeActive;return t&&e in this.i18n[t]?this.i18n[t][e]:e},showKML:function(e,t,i){void 0!==i&&(this.zoom=i);var a=this,r=document.getElementById(e),s=r.getAttribute("data-flxmap"),o=this.showMap(e,[0,0]),n=this.loadKmlMap(function(e,t){var i,r,o,n=/^(\d+)\s*(minute|hour|day)s?$/.exec(t);if(n){switch(i=(new Date).getTime(),o=+n[1],n[2]){case"minute":o<5&&(o=5),r=i/(6e4*o);break;case"hour":r=i/(36e5*o);break;case"day":r=i/(864e5*o);break;default:r=!1}r&&(r=Math.floor(r),e+=(-1<e.indexOf("?")?"&":"?")+"nocache="+r)}return e}(t,this.kmlcache));w(this,e),void 0!==i&&google.maps.event.addListenerOnce(o,"zoom_changed",function(){o.setZoom(i),a.zoom=i}),(this.markerDirections||this.markerDirectionsShow)&&this.startDirService(o),google.maps.event.addListener(n,"click",function(e){var t=e.featureData;if(!t._flxmapOnce){if(t._flxmapOnce=!0,a.targetFix&&t.description){var i=/ target="_blank"/gi;t.description=t.description.replace(i,""),t.infoWindowHtml=t.infoWindowHtml.replace(i,"")}if(a.markerDirections){var r=e.latLng,o=r.lat()+","+r.lng()+",'"+l(t.name)+"',true",n='<br /><a href="#" data-flxmap-fix-opera="1" onclick="'+s+".showDirections("+o+'); return false;">'+a.gettext("Directions")+"</a>";t.infoWindowHtml=t.infoWindowHtml.replace(/<\/div><\/div>$/i,n+"</div></div>")}}}),window.opera&&this.markerDirections&&k(r,"click",function(e){e.target.getAttribute("data-flxmap-fix-opera")&&v(e)})},showMarker:function(e,t,i){var r=this.showMap(e,t),o=new google.maps.LatLng(i[0],i[1]),n={map:r,position:o,icon:this.markerIcon},a=google.maps.Animation;switch(this.markerAnimation){case"drop":n.animation=a.DROP;break;case"bounce":n.animation=a.BOUNCE}var s=new google.maps.Marker(n);if(this.setMarkerPoint(s),this.setMarkerLocation(o),w(this,e),this.markerTitle||(this.markerTitle=this.markerAddress),this.markerTitle||this.markerHTML||this.markerDescription||this.markerLink||this.markerDirections){var l,c,d,m,h,p,u=this,g=document.createElement("DIV");if(g.className="flxmap-infowin",(h=document.createElement("DIV")).className="flxmap-marker-title",this.markerTitle&&(h.appendChild(document.createTextNode(this.markerTitle)),s.setTitle(this.markerTitle)),g.appendChild(h),this.markerHTML&&((h=document.createElement("DIV")).innerHTML=this.markerHTML,g.appendChild(h)),this.markerDescription||this.markerLink){if((h=document.createElement("DIV")).className="flxmap-marker-link",this.markerDescription){for(l=0,c=(d=this.markerDescription.split("\n")).length;l<c;l++)0<l&&h.appendChild(document.createElement("BR")),h.appendChild(document.createTextNode(d[l]));this.markerLink&&h.appendChild(document.createElement("BR"))}this.markerLink&&((p=document.createElement("A")).href=this.markerLink,this.markerLinkTarget&&(p.target=this.markerLinkTarget),p.appendChild(document.createTextNode(this.markerLinkText||this.gettext("Click for details"))),h.appendChild(p)),g.appendChild(h)}this.markerDirections&&((h=document.createElement("DIV")).className="flxmap-directions-link",(p=document.createElement("A")).href="#",p.dataLatitude=i[0],p.dataLongitude=i[1],k(p,"click",function(e){v(e),u.showDirections(this.dataLatitude,this.dataLongitude,!0)}),p.appendChild(document.createTextNode(this.gettext("Directions"))),h.appendChild(p),g.appendChild(h)),m=new google.maps.InfoWindow({content:g}),this.setMarkerInfowin(m),this.markerShowInfo&&google.maps.event.addListenerOnce(r,"tilesloaded",function(){m.open(r,s)}),google.maps.event.addListener(s,"click",function(){m.open(r,s)});var f=function(){u.updateGoogleLink()};google.maps.event.addListener(r,"idle",f),google.maps.event.addListener(r,"center_changed",f),google.maps.event.addListenerOnce(r,"tilesloaded",f)}(this.markerDirections||this.markerDirectionsShow)&&(this.startDirService(r),this.markerDirectionsShow&&this.showDirections(i[0],i[1],!1))},showAddress:function(o,e){var n=this,t=new google.maps.Geocoder;this.markerAddress=e,""===this.markerTitle&&(this.markerTitle=e),t.geocode({address:e,region:this.region},function(e,t){if(t===google.maps.GeocoderStatus.OK){var i=e[0].geometry.location,r=[i.lat(),i.lng()];n.showMarker(o,r,r)}else window.alert("Map address returns error: "+t)})},updateGoogleLink:function(){if("querySelectorAll"in document)try{for(var e=this.getMap().getDiv(),t=this.getMarkerLocation(),i=e.querySelectorAll("a[href*='maps.google.com/maps']:not([href*='mps_dialog']):not([href*='&q='])"),r=0,o=i.length,n=encodeURIComponent((this.markerAddress?this.markerAddress:this.markerTitle)+" @"+t.lat()+","+t.lng());r<o;r++)i[r].href+="&mrt=loc&iwloc=A&q="+n}catch(e){}},redraw:function(){var e=this.getMap(),t=this.getKmlLayer();if(google.maps.event.trigger(e,"resize"),t)e.fitBounds(t.getDefaultViewport());else{e.setCenter(this.getCenter()),e.setZoom(this.zoom);var i=this.getMarkerInfowin();i&&i.open(e,this.getMarkerPoint())}},startDirService:function(e){this.dirService||(this.dirService=new google.maps.DirectionsService),this.dirRenderer||(this.dirRenderer=new google.maps.DirectionsRenderer({map:e,draggable:this.dirDraggable,suppressMarkers:this.dirSuppressMarkers,panel:this.dirShowSteps?document.getElementById(this.markerDirectionsDiv):null}))},showDirections:function(i,r,n){var a=this;function s(e){var t={origin:e,destination:""===a.markerAddress?new google.maps.LatLng(i,r):a.markerAddress};switch(a.region&&(t.region=a.region),a.dirTravelMode){case"bicycling":t.travelMode=google.maps.TravelMode.BICYCLING;break;case"driving":t.travelMode=google.maps.TravelMode.DRIVING;break;case"transit":t.travelMode=google.maps.TravelMode.TRANSIT;break;case"walking":t.travelMode=google.maps.TravelMode.WALKING}switch(a.dirUnitSystem){case"imperial":t.unitSystem=google.maps.UnitSystem.IMPERIAL;break;case"metric":t.unitSystem=google.maps.UnitSystem.METRIC}a.dirService.route(t,o)}function o(e,t){var i=google.maps.DirectionsStatus;switch(t){case i.OK:a.dirRenderer.setDirections(e);break;case i.ZERO_RESULTS:window.alert("No route could be found between the origin and destination.");break;case i.OVER_QUERY_LIMIT:window.alert("The webpage has gone over the requests limit in too short a period of time.");break;case i.REQUEST_DENIED:window.alert("The webpage is not allowed to use the directions service.");break;case i.INVALID_REQUEST:window.alert("Invalid directions request.");break;case i.NOT_FOUND:window.alert("Origin or destination was not found.");break;default:window.alert("A directions request could not be processed due to a server error. The request may succeed if you try again.")}}this.markerDirectionsDiv&&this.dirShowSearch&&function(){var e,t,i,r=document.getElementById(a.markerDirectionsDiv),o=document.createElement("form");for(t=r.lastChild;t;t=r.lastChild)r.removeChild(t);(t=document.createElement("p")).appendChild(document.createTextNode(a.gettext("From")+": ")),(i=document.createElement("input")).type="text",i.name="from",i.value=a.markerDirectionsDefault,t.appendChild(i),(e=document.createElement("input")).type="submit",e.value=a.gettext("Get directions"),t.appendChild(e),o.appendChild(t),r.appendChild(o),void 0===o.elements.from&&(o.elements.from=i),n&&i.focus(),k(o,"submit",function(e){v(e);var t=this.elements.from.value;/\S/.test(t)&&s(t)})}(),this.markerDirectionsDefault&&s(this.markerDirectionsDefault)}}}();
readme.txt CHANGED
@@ -7,7 +7,7 @@ Donate link: https://shop.webaware.com.au/donations/?donation_for=Flexible+Map
7
  Tags: google, map, maps, google maps, kml
8
  Requires at least: 4.0
9
  Tested up to: 4.9
10
- Stable tag: 1.14.0
11
  Requires PHP: 5.3
12
  License: GPLv2 or later
13
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -67,7 +67,7 @@ The initial translations for all other languages were made using Google Translat
67
 
68
  ### Privacy
69
 
70
- Flexible Map embeds Google Maps into your web pages. Please review Google's [Privacy and Personal Information](https://developers.google.com/maps/terms#3-privacy-and-personal-information) for information about how that affects your website's privacy policy. By using this plugin, you are agreeing to the terms of use for Google Maps.
71
 
72
  The Flexible Map plugin itself does not collect any personally identifying information, and does not set any cookies itself.
73
 
@@ -85,95 +85,9 @@ There are two ways to load maps with this plugin:
85
 
86
  To add a Flexible Map to a post or a page, add a shortcode `[flexiblemap]` and give it some useful attributes. A map can either be specified using centre coordinates or street address, or by loading a KML file.
87
 
88
- ### Attributes for centre coordinates or street address map
89
-
90
- Either the center or the address paramater is required. If you provide both, the centre coordinates will be used for the map centre, but directions will use the street address. (This will prevent directions from telling people how to get to the destination opposite yours!)
91
-
92
- * **center**: coordinates of centre in latitude,longitude, e.g. *center="-34.916721,138.828878"*
93
- * **address**: street address of map centre, e.g. *address="116 Beaumont Street Hamilton NSW Australia"*
94
- * **marker**: coordinates of the marker if different from the centre, in latitude,longitude, e.g. *marker="-34.916721,138.828878"*
95
- * **title**: title of the marker, displayed in a text bubble, e.g. *title="Adelaide Hills"*
96
- * **link**: URL to link from the marker title, e.g. *link="http://example.com/"*
97
- * **linktarget**: where marker link opens, e.g. *linktarget="_blank"*
98
- * **linktext**: marker link text, overriding the default text
99
- * **icon**: URL to icon for the marker, e.g. *icon="https://maps.google.com/mapfiles/kml/pal3/icon29.png"*
100
- * **description**: a description of the marker location (can have HTML links), e.g. *description="Lorem ipsum dolor sit amet"*
101
- * **html**: some simple HTML to add to the info window, e.g. *`<img src='https://example.com/logo.img' />`*
102
- * **showinfo**: show the marker's info window when the map loads, from [true, false], e.g. *showinfo="false"*; default=true
103
-
104
- *Samples*:
105
- `[flexiblemap center="-34.916721,138.828878" width="100%" height="400px" zoom="9" title="Adelaide Hills" description="The Adelaide Hills are repleat with wineries."]
106
- [flexiblemap address="116 Beaumont Street Hamilton NSW Australia" region="au" directions="true"]
107
- [flexiblemap center="-32.891058,151.538042" title="Mount Sugarloaf" directions="true"]
108
- [flexiblemap center="-32.918827,151.806164" title="Nobby's Head" directions="my-dir-div"]`
109
-
110
- ### Attributes for KML map
111
-
112
- * **src**: the URL for a KML file to load map details from, e.g. *src="http://example.com/map.kml"*
113
- * **targetfix**: prevent links from opening in new window, from [true, false], e.g. *targetfix="true"*; default=true
114
- * **kmlcache**: ask Google Maps to use a new map instead of cached map, specified in minutes (90 minutes), hours (2 hours), days (1 day), or "none"; minimum 5 minutes, default "none"
115
-
116
- *Sample*:
117
- `[flexiblemap src="https://webaware.com.au/maps/example-toronto.kml" width="100%" height="400px"]`
118
-
119
- ### Attributes for all maps
120
-
121
- * **width**: width in pixels or valid CSS units, e.g. *width="100%"*
122
- * **height**: height in pixels or valid CSS units, e.g. *height="400px"*
123
- * **id**: the CSS id of the container div (instead of a random generated unique ID), e.g. *id="my_map"*
124
- * **zoom**: zoom level as an integer, larger is closer, e.g. *zoom="16"*
125
- * **maptype**: type of map to show, from [roadmap, satellite, hybrid, terrain], e.g. *maptype="satellite"*; default=roadmap
126
- * **maptypes**: types of maps in the map type controls, e.g. *maptypes="custom_type,satellite"*
127
- * **hidemaptype**: hide the map type controls, from [true, false], e.g. *hidemaptype="true"*; default=false
128
- * **hidepanning**: hide the panning controls, from [true, false], e.g. *hidepanning="true"*; default=true
129
- * **hidezooming**: hide the zoom controls, from [true, false], e.g. *hidezooming="true"*; default=false
130
- * **hidestreetview**: hide the street view control, from [true, false], e.g. *hidestreetview="true"*; default=true
131
- * **hidescale**: hide the map scale, from [true, false], e.g. *hidescale="true"*; default=true
132
- * **zoomstyle**: which zoom control style, from [small, large, default]; default=small
133
- * **scrollwheel**: enable zoom with mouse scroll wheel, from [true, false], e.g. *scrollwheel="true"*; default=false
134
- * **draggable**: enable dragging to pan, from [true, false], e.g. *draggable="true"*; default=true
135
- * **dblclickzoom**: enable double-clicking to zoom, from [true, false], e.g. *dblclickzoom="true"*; default=true
136
- * **directions**: show directions link in text bubble; by default, directions will be displayed underneath map, but you can specify the element ID for directions here, e.g. *directions="true", directions="my-dir-id"*; default=false
137
- * **dirdraggable**: allow directions to be draggable, from [true, false]; default=false
138
- * **dirnomarkers**: suppress start and end markers when showing directions, from [true, false]; default=false
139
- * **dirshowsteps**: show or suppress directions steps when showing directions, from [true, false]; default=true
140
- * **dirshowssearch**: show or suppress directions search form when showing directions, from [true, false]; default=true
141
- * **showdirections**: show directions when the map loads, e.g. *showdirections="true"*; default=false
142
- * **directionsfrom**: initial from: location for directions, e.g. *directionsfrom="Sydney"*
143
- * **dirunitsystem**: force directions units to metric or imperial, from [metric, imperial, auto]; default=auto
144
- * **dirtravelmode**: select directions mode, from [driving, bicycling, walking, transit]; default=driving
145
- * **region**: specify region to help localise address searches for street address map and directions, taken from the list of [country codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) e.g. *region="AU"*
146
- * **locale**: use a specific locale (language) for messages like the text of the Directions link, e.g. *locale="nl-BE"*
147
-
148
- ### Calling from templates or plugins
149
-
150
- There is a PHP function `flexmap_show_map()` for theme and plugin developers. All of the same attributes for the shortcode can be passed to the function in an associative array. If you want it to return the map as a string without output to screen, add "echo"=>"false" to array of attributes.
151
-
152
- *Sample*:
153
- `flexmap_show_map(array(
154
- 'center' => '-34.916721,138.828878',
155
- 'width' => '100%',
156
- 'height' => 400,
157
- 'zoom' => 12,
158
- 'title' => 'Adelaide Hills',
159
- 'description' => 'The Adelaide Hills are repleat with wineries.',
160
- 'directions' => 'my-dir-div',
161
- 'hidepanning' => 'false',
162
- 'hidescale' => 'false',
163
- 'maptype' => 'satellite',
164
- ));`
165
-
166
- There are also some filter hooks that allow you to change the behaviour of the plugin.
167
-
168
- * `flexmap_google_maps_api_args`: filter the array of arguments that will be passed to the Google Maps API, e.g. `'v'=>'3.exp'`, `'sensor'=>'false'`
169
- * `flexmap_google_maps_api_url`: filter the Google Maps API URL, as a string
170
- * `flexmap_shortcode_attrs`: filter the array of shortcode attributes, e.g. change the width and height
171
- * `flexmap_shortcode_styles`: filter the array of inline styles applied to the div wrapping the map, e.g. remove width and height so that it can be specified in the theme's stylesheets
172
- * `flexmap_shortcode_html`: filter the generated HTML, e.g. wrap another div around it, add a link to Google Maps, add some additonal script, etc.
173
- * `flexmap_shortcode_script`: filter the generated JavaScript
174
- * `flexmap_custom_map_types`: register custom Google Maps map types
175
-
176
- For more information and examples, see [the reference website](https://flexible-map.webaware.net.au/).
177
 
178
  ## Frequently Asked Questions
179
 
@@ -182,6 +96,7 @@ For more information and examples, see [the reference website](https://flexible-
182
  Yes. You will need at minimum an API key for Maps, so that the Maps JavaScript API will work. If you want to add maps by address (not just coordinates or KML file), you will also need to select Places. If you want to use directions features of this plugin, you will also need to select Routes.
183
 
184
  [Get your API keys from the Google Maps Platform](https://cloud.google.com/maps-platform/#get-started)
 
185
 
186
  ### Where are the settings?
187
 
@@ -313,15 +228,19 @@ Either turn off CloudFlare Rocketscript :) or install the [Flxmap No Rocketscrip
313
 
314
  ## Upgrade Notice
315
 
316
- ### 1.14.0
317
 
318
- bump version of Google Maps API to 3.32; add server API key for server side address resolution
319
 
320
  ## Changelog
321
 
322
  The full changelog can be found [on GitHub](https://github.com/webaware/flexible-map/blob/master/changelog.md). Recent entries:
323
 
324
- ### 1.14.0, 2018-06-07
 
 
325
 
326
- * added: server API key to reduce `REQUEST_DENIED` errors from server side address resolution requests
327
- * changed: bump version of Google Maps API to 3.32
 
 
7
  Tags: google, map, maps, google maps, kml
8
  Requires at least: 4.0
9
  Tested up to: 4.9
10
+ Stable tag: 1.15.0
11
  Requires PHP: 5.3
12
  License: GPLv2 or later
13
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
67
 
68
  ### Privacy
69
 
70
+ Flexible Map embeds Google Maps into your web pages. Please review Google's [Privacy and Personal Information](https://cloud.google.com/maps-platform/terms/maps-controller-terms/) for information about how that affects your website's privacy policy. By using this plugin, you are agreeing to the terms of use for Google Maps.
71
 
72
  The Flexible Map plugin itself does not collect any personally identifying information, and does not set any cookies itself.
73
 
85
 
86
  To add a Flexible Map to a post or a page, add a shortcode `[flexiblemap]` and give it some useful attributes. A map can either be specified using centre coordinates or street address, or by loading a KML file.
87
 
88
+ [Get started with Flexible Map](https://flexible-map.webaware.net.au/manual/getting-started/).
89
+ [Read the manual online](https://flexible-map.webaware.net.au/manual/).
90
+ [Refer to the attribute reference](https://flexible-map.webaware.net.au/manual/attribute-reference/) for detailed information.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
 
92
  ## Frequently Asked Questions
93
 
96
  Yes. You will need at minimum an API key for Maps, so that the Maps JavaScript API will work. If you want to add maps by address (not just coordinates or KML file), you will also need to select Places. If you want to use directions features of this plugin, you will also need to select Routes.
97
 
98
  [Get your API keys from the Google Maps Platform](https://cloud.google.com/maps-platform/#get-started)
99
+ [Read more about API keys for Google Maps](https://flexible-map.webaware.net.au/manual/api-keys/)
100
 
101
  ### Where are the settings?
102
 
228
 
229
  ## Upgrade Notice
230
 
231
+ ### 1.15.0
232
 
233
+ KML maps can now set the map center; server-side address lookups are remembered for up to one month; add attributes hidefullscreen and markeranimation
234
 
235
  ## Changelog
236
 
237
  The full changelog can be found [on GitHub](https://github.com/webaware/flexible-map/blob/master/changelog.md). Recent entries:
238
 
239
+ ### 1.15.0
240
+
241
+ Released 2018-07-21
242
 
243
+ * fixed: KML maps can now use the `center` attribute to set the map center
244
+ * changed: remember server-side address lookups for up to one month
245
+ * added: attribute `hidefullscreen` for hiding the full-screen control
246
+ * added: attribute `markeranimation` for setting how a single marker is added to the map - drop, bounce, none; defaults to drop