forked from mcguffin/acf-openstreetmap-field
-
Notifications
You must be signed in to change notification settings - Fork 0
/
readme.txt
239 lines (167 loc) · 9.57 KB
/
readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
=== ACF OpenStreetMap Field ===
Contributors: podpirate
Donate link: https://donate.openstreetmap.org/
Tags: map acf openstreetmap leaflet
Requires at least: 4.8
Requires PHP: 5.6
Tested up to: 6.1
Stable tag: 1.3.5
License: GPLv3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html
A configurable OpenStreetMap Field for ACF.
== Description ==
Hazzle free OpenStreetMap with [ACF](https://www.advancedcustomfields.com/).
## Usage
#### In the Fieldgroup editor:
**Return Format:**
- *Raw data* will return an array holding the field configuration.
- *Leaflet JS* will return a fully functional leaflet map. Just include `<?php the_field('my_field_name'); ?>` in your Theme.
You can choose from a long list of map styles and it supports multiple markers.
- *iFrame (OpenStreetMap.org)* Will return an iFrame HTML. Only four map styles are supported
– the ones you find on [OpenStreetMap](https://www.openstreetmap.org/) – and not more than one marker.
**Map Appearance:** Pan and zoom on the map and select from the Map layers to set the initial map position and style in the editor.
**Map Position:** If you're more like a numbers person here you can enter numeric values for the map position.
**Allow layer selection:** Allow the editors to select which map layers to show up in the frontend.
**Height:** Map height in the frontend and editor.
**Max. number of Markers**
- *No value:* infinite markers
- *0:* No markers
- *Any other value:* Maximum number of markers. If the return format is *iFrame* there can ony be one marker.
## Development
Please head over to the source code [on Github](https://github.com/mcguffin/acf-openstreetmap-field).
## Credits
- Eliott Condon's [ACF](https://www.advancedcustomfields.com/) for sure!
- The [OpenStreetMap](https://www.openstreetmap.org/) project
- [The Leaflet Project](https://leafletjs.com/)
- The maintainers and [contributors](https://github.com/leaflet-extras/leaflet-providers/graphs/contributors) of [Leaflet providers](https://github.com/leaflet-extras/leaflet-providers)
- The [very same](https://github.com/perliedman/leaflet-control-geocoder/graphs/contributors) for [Leaflet Control Geocode](https://github.com/perliedman/leaflet-control-geocoder)
- [Dominik Moritz](https://www.domoritz.de/) who delighted us with [Leaflet locate control](https://github.com/domoritz/leaflet-locatecontrol)
- Numerous individuals and organizations who provide wonderful Map related services free of charge. (You are credited in the map, I hope)
== Installation ==
Follow the standard [WordPress plugin installation procedere](http://codex.wordpress.org/Managing_Plugins).
== Frequently asked questions ==
= I found a bug. Where should I post it? =
Please use the issues section in the [GitHub-Repository](https://github.com/mcguffin/acf-openstreetmap-field/issues).
I will most likely not maintain the forum support forum on wordpress.org. Anyway, other users might have an answer for you, so it's worth a shot.
= I'd like to suggest a feature. Where should I post it? =
Please post an issue in the [GitHub-Repository](https://github.com/mcguffin/acf-openstreetmap-field/issues)
= I am a map tile provider. Please don't include our service in your plugin. =
The provisers list is taken from [Leaflet providers](https://github.com/leaflet-extras/leaflet-providers), so requests for an unlisting should go there first.
If you want your service to remain in Leaflet Providers, you can Post an issue in the plugin's [GitHub-Repository](https://github.com/mcguffin/acf-openstreetmap-field/issues).
Please provide me some way for me to verify, that you are acting on behalf of the Tile service provider your want to exclude.
(E.g. the providers website has a link to your github account.)
= Im getting these "Insecure Content" Warnings =
Some providers – like OpenPtMap or MtbMap – do not support https. If these warning bother you, choose a different one.
= Why isn't the map loading? =
There is very likely an issue with the map tiles provider you've choosen. Some of them might be down or have suspended their service. Choose another one.
= I need to do some fancy JS magic with my map. =
Check out the [GitHub wiki](https://github.com/mcguffin/acf-openstreetmap-field/wiki). Some of the js events might come in handy for you.
For Documentation of the map object, please refer to [LeafletJS](https://leafletjs.com).
= Will you anwser support requests via emails? =
No.
== Screenshots ==
1. ACF Field Group Editor
2. Editing the Field Value
3. Display in the Frontend
4. Settings page. Configure API access keys and disable specific tile layers.
== Upgrade Notice ==
**Attention:** Version 1.3.0 involves some breaking changes.
**JS Events** are no longer triggered by jQuery‘s `.trigger(event)` but natively using the [`CustomEvent`](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent) type.
As a consequence event Data is now stored in the [`details`](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/detail) property.
This was necessary in order to keep compatibility with the jQuery update in WP 5.6.
See the following wiki articles for more intel:
- [JS-Event: Map Create](https://github.com/mcguffin/acf-openstreetmap-field/wiki/JS-Event:-Map-Create)
- [JS-Event: Map Created](https://github.com/mcguffin/acf-openstreetmap-field/wiki/JS-Event:-Map-Created)
- [JS Event: Map Create Markers](https://github.com/mcguffin/acf-openstreetmap-field/wiki/JS-Event:-Map-Create-Markers)
- [JS Event: Marker Create](https://github.com/mcguffin/acf-openstreetmap-field/wiki/JS-Event:-Marker-Create)
- [JS Event: Marker Created](https://github.com/mcguffin/acf-openstreetmap-field/wiki/JS-Event:-Marker-Created)
- [JS Event: Map Init](https://github.com/mcguffin/acf-openstreetmap-field/wiki/JS-Event:-Map-Init)
The *`osm_map_iframe_template` filter* has been removed in favour of theme overrides.
Please refer to this wiki article for a [migration guide](https://github.com/mcguffin/acf-openstreetmap-field/wiki/The-abandoned-osm_map_iframe_template-filter).
== Changelog ==
= 1.4.0 =
- UI: Adapt to ACF 6 field group admin
- JS API: do acf actions on marker events
- Data: add geocode results to raw data
- Fix: search submit button did not submit
- Fix: print template script only if input element is present
= 1.3.5 =
- Fix: Admin Marker styling broken
- Fix: PHP Fatal with suki theme
- Fix: include leaflet control geocode assets
= 1.3.4 =
- Fix: locate control API
= 1.3.3 =
- Upgrade leafletjs, leaflet-control-geocoder, leaflet-providers, leaflet, leaflet.locatecontrol to latest releases
- Remove HikeBike map provider
- Support ACF Rest API integration (since ACF 5.11)
- Fix: PHP 8 compatibility
- Fix: iframes in block preview not editable
- Fix: quote missing on html attribute in osm template
- Test with WP 6.0
= 1.3.2 =
- Fix: No such variant of OpenStreetMap (Mapnik)
- Fix: Popups not opening in Safari
- Quick and dirty Fix: invalid (localized) lat/lng object.
= 1.3.1 =
- Fix: JS Event acf-osm-map-marker-create not applying marker options
= 1.3.0 =
- Theme Overrides: Override map output in your theme
- Breaking Change: Use native JS Events
- Breaking Change: `osm_map_iframe_template` filter gone in WP 5.5
- Fix: jQuery 3.x (WP 5.6) compatibility
- Fix: Map not showing on login form
- Fix: Providers not loaded if webroot owner is not www-user
- Upgrade: Leaflet 1.7.1
- Upgrade: Leaflet Providers 1.11.0
- Upgrade: Leaflet Control Geocoder 2.1.0
= 1.2.2 =
- Fix: Duplicated Row (ACF 5.9+)
= 1.2.1 =
- Upgrade FreeMapSK, CyclOSM
= 1.2.0 =
- Feature: Settings page allowing you to disable specific map tile providersw
- Feature: Fit markers in view (backend)
- Upgrade: leaflet-providers, leaflet-control-geocoder, leaflet.locatecontrol
= 1.1.9 =
- UI: Add Settings link on plugins list table
- Fix: hide map provider with unconfigured api key from layer selection
- Upgrade: leaflet-control-geocoder, leaflet.locatecontrol, leaflet-providers
- Security hardening
= 1.1.8 =
- Feature: make marker address formats localizable.
- JS: pass map init object along with acf-os-map-create event
- UI: hide add marker at my location button if markers cant be added
= 1.1.7 =
- Feature: Add locate me button to backend
- Fix: Geocoder search result still visible after marker added to map.
- Fix: Required field and max_markers = 0 never saved
- Fix: HERE app code not included in api requests
= 1.1.6 =
- Feature: Observe DOM for newly added maps
- Feature: allow manipulation of layer config in JS
- Fix: JS event 'acf-osm-map-marker-create' not triggered
= 1.1.5 =
- JS: added event Listener for ajax-loaded maps. Use <code>$(my_map_div).trigger('acf-osm-map-added');</code> on each newly added map.
- Upgrade LeafletJS to 1.6.0
= 1.1.4 =
- Upgrade Leaflet Providers to 1.9.0
- Upgrade Leaflet Control Geocode to 1.10.0
- Fix: Redraw maps when they become visible
= 1.1.3 =
- UI: Better formatting for automatic marker labels
- Fix: Map controls zindex in Block-Editor
- Fix: Adding markers not working on mobile devices
= 1.1.2 =
- Fix: PHP Strict Standards message
= 1.1.1 =
- Fix: Required Field behaviour – "required" means now "must hava a marker"
= 1.1.0 =
- UI: Usability Improvements
- Tested: Verfied Compatibility with Widgets, Block-Editor, Frontend Form
- Stored data pretty much like google map field
- Code: Refactored JS
= 1.0.1 =
Convert Values from ACF Googlemaps-Field
= 1.0.0 =
Initial Release