react-leaflet-deflate 3.1.1 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/App.jsx CHANGED
@@ -1,299 +1,299 @@
1
-
2
- import React from 'react';
3
- import ReactDOMClient from 'react-dom/client';
4
- import { MapContainer, TileLayer } from 'react-leaflet';
5
- import Deflate from 'react-leaflet-deflate';
6
-
7
- function App() {
8
- const [mapOptions] = React.useState({
9
- center: [2.935403, 101.448205],
10
- zoom: 10,
11
- minZoom: 1,
12
- maxZoom: 22
13
- });
14
-
15
- const [markerCluster, setMarkerCluster] = React.useState(true);
16
- const [dataSet, setDataSet] = React.useState(1);
17
- const [minSize, setMinSize] = React.useState(null);
18
-
19
- const onChangeMarkerCluster = (e) => setMarkerCluster(e.target.checked);
20
- const onChangeDataSet = (e) => setDataSet(e.target.value);
21
-
22
- const onChangeMinSize = (e) => {
23
- const minSizeInput = e.target.value;
24
- let minSizeFloat = parseFloat(minSizeInput);
25
- if(isNaN(minSizeFloat) || minSizeFloat <= 1.0) {
26
- minSizeFloat = null;
27
- }
28
- setMinSize(minSizeFloat);
29
- }
30
-
31
- const onEachFeature = (feature, featureLayer) => {
32
- featureLayer.bindPopup(`<div>This is feature #${feature.properties.id}</div>`);
33
- featureLayer.bindTooltip(`Feature: #${feature.properties.id}`);
34
- };
35
-
36
- const resetOptions = () => {
37
- setMarkerCluster(true);
38
- setDataSet(1);
39
- setMinSize(null);
40
- };
41
-
42
- const deflateOptions = {
43
- minSize: minSize || 20,
44
- markerCluster: markerCluster,
45
- data: dataSet == 1 ? sample1 : sample2,
46
- onEachFeature: onEachFeature
47
- };
48
-
49
- return (
50
- <div>
51
- <div className="row d-flex">
52
- <div className="col-md-8 align-self-stretch">
53
- <div className="card" style={{ height: '500px' }}>
54
- <div className="card-body">
55
- <MapContainer {...mapOptions} className="h-100">
56
- <TileLayer
57
- attribution='&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
58
- url='http://{s}.tile.osm.org/{z}/{x}/{y}.png'
59
- />
60
- <Deflate {...deflateOptions} />
61
- </MapContainer>
62
- </div>
63
- </div>
64
- </div>
65
- <div className="col-md-4">
66
- <div className="card" style={{ height: '500px' }} >
67
- <div className="card-body">
68
- <div className="row">
69
- <div className="col-sm-6">
70
- <h6 className="mt-1"><i className="fas fa-cogs" /> Options</h6>
71
- </div>
72
- <div className="col-sm-6 text-right">
73
- <button type="button" className="btn btn-sm btn-outline-info" onClick={resetOptions}>
74
- <i className="fas fa-undo-alt" /> Reset
75
- </button>
76
- </div>
77
- </div>
78
- <hr/>
79
- <form>
80
- <div className="form-group row">
81
- <label htmlFor="cluster" className="col-sm-6 col-form-label">Enable marker clustering:</label>
82
- <div className="col-sm-6">
83
- <input
84
- className="form-control"
85
- id="cluster"
86
- name="cluster"
87
- type="checkbox"
88
- checked={markerCluster}
89
- onChange={onChangeMarkerCluster}
90
- />
91
- </div>
92
- </div>
93
- <div className="form-group row">
94
- <label htmlFor="minSize" className="col-sm-6 col-form-label">Min. Size:</label>
95
- <div className="col-sm-6">
96
- <input
97
- className="form-control"
98
- id="minSize"
99
- name="minSize"
100
- type="number"
101
- value={minSize}
102
- onChange={onChangeMinSize}
103
- />
104
- </div>
105
- </div>
106
- <div className="form-group row">
107
- <label htmlFor="geojson" className="col-sm-6 col-form-label">GeoJSON data set:</label>
108
- <div className="col-sm-6">
109
- <select className="form-control" id="geojson" name="geojson" value={dataSet} onChange={onChangeDataSet}>
110
- <option value="1">Data set 1</option>
111
- <option value="2">Data set 2</option>
112
- </select>
113
- </div>
114
- </div>
115
- </form>
116
- </div>
117
- </div>
118
- </div>
119
- </div>
120
- <div className="row">
121
- <div className="col-md-12 mt-4">
122
- <div className="card">
123
- <div className="card-body">
124
- <h4>Installation</h4>
125
- <hr />
126
- <h5>Install via NPM</h5>
127
- <div className="card bg-dark text-white">
128
- <div className="card-body">
129
- <code className="text-white">
130
- npm install react-leaflet-deflate --save
131
- </code>
132
- </div>
133
- </div>
134
- </div>
135
- </div>
136
- </div>
137
- </div>
138
- <div className="row">
139
- <div className="col-md-12 mt-4">
140
- <div className="card">
141
- <div className="card-body">
142
- <h4>Usage</h4>
143
- <hr />
144
-
145
- <h5>Example</h5>
146
- <div className="card bg-dark text-white">
147
- <div className="card-body">
148
- <pre><code className="text-white">
149
- import &#123; MapContainer, TileLayer &#125; from 'react-leaflet';<br />
150
- import Deflate from 'react-leaflet-deflate';<br />
151
- <br />
152
- const deflateOptions = &#123;<br />
153
- &nbsp;&nbsp;&nbsp;&nbsp;minSize: 20,<br />
154
- &nbsp;&nbsp;&nbsp;&nbsp;markerCluster: true,<br />
155
- &nbsp;&nbsp;&nbsp;&nbsp;data: geojsonData<br />
156
- &#125;;<br />
157
- <br />
158
- &lt;MapContainer center=&#123;[101.483459, 2.938926]&#125; zoom=&#123;12&#125;&gt;<br />
159
- &nbsp;&nbsp;&nbsp;&nbsp;&lt;TileLayer<br />
160
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;url=&quot;https://&#123;s&#125;.tile.openstreetmap.org/&#123;z&#125;/&#123;x&#125;/&#123;y&#125;.png&quot;<br/>
161
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;attribution='&amp;copy; &lt;a href=&quot;http://osm.org/copyright&quot;&gt;OpenStreetMap&lt;/a&gt; contributors'
162
- /&gt;
163
- <br />
164
- <br />
165
-
166
- &nbsp;&nbsp;&nbsp;&nbsp;&lt;Deflate &#123;...deflateOptions&#125; /&gt;<br />
167
- &lt;/MapContainer&gt;
168
- </code></pre>
169
- </div>
170
- </div>
171
-
172
- <h5 className="mt-4">react-leaflet v5</h5>
173
- <iframe
174
- style={{ height: '420px', width: '100%' }}
175
- scrolling="no"
176
- title="react-leaflet-deflate example for react-leaflet@5.x"
177
- src="https://codepen.io/m_hasbie/embed/wBGampr/?height=265&theme-id=0&default-tab=html,result"
178
- frameBorder="no"
179
- allowTransparency="true"
180
- allowFullScreen="true"
181
- >
182
- See the Pen <a href='https://codepen.io/m_hasbie/pen/wBGampr/'>react-leaflet-deflate example for react-leaflet@5.x</a> by M. Hasbie
183
- (<a href='https://codepen.io/m_hasbie'>@m_hasbie</a>) on <a href='https://codepen.io'>CodePen</a>.
184
- </iframe>
185
-
186
- <h5 className="mt-4">react-leaflet v2</h5>
187
- <iframe
188
- style={{ height: '420px', width: '100%' }}
189
- scrolling="no"
190
- title="react-leaflet-deflate example for react-leaflet@2.x"
191
- src="https://codepen.io/m_hasbie/embed/MqNPRy/?height=265&theme-id=0&default-tab=js,result"
192
- frameBorder="no"
193
- allowTransparency="true"
194
- allowFullScreen="true"
195
- >
196
- See the Pen <a href='https://codepen.io/m_hasbie/pen/MqNPRy/'>react-leaflet-deflate example for react-leaflet@2.x</a> by M. Hasbie
197
- (<a href='https://codepen.io/m_hasbie'>@m_hasbie</a>) on <a href='https://codepen.io'>CodePen</a>.
198
- </iframe>
199
-
200
- <h5 className="mt-4">react-leaflet v1</h5>
201
- <iframe
202
- style={{ height: '420px', width: '100%' }}
203
- scrolling="no"
204
- title="react-leaflet-deflate example for react-leaflet@1.9.1"
205
- src="http://codepen.io/m_hasbie/embed/jvgeVR/?height=265&theme-id=0&default-tab=js,result"
206
- frameBorder="no"
207
- allowTransparency="true"
208
- allowFullScreen="true"
209
- >
210
- See the Pen <a href='https://codepen.io/m_hasbie/pen/jvgeVR/'>react-leaflet-deflate example for react-leaflet@1.9.1</a> by M. Hasbie
211
- (<a href='https://codepen.io/m_hasbie'>@m_hasbie</a>) on <a href='https://codepen.io'>CodePen</a>.
212
- </iframe>
213
- </div>
214
- </div>
215
- </div>
216
- </div>
217
- <div className="row">
218
- <div className="col-md-12 mt-4">
219
- <div className="card">
220
- <div className="card-body">
221
- <h4>Options</h4>
222
- <hr />
223
-
224
- <table className="table table-hover table-striped table-bordered">
225
- <thead className="thead-dark">
226
- <tr>
227
- <th>Option</th>
228
- <th>Type</th>
229
- <th>Default</th>
230
- <th>Description</th>
231
- </tr>
232
- </thead>
233
- <tbody>
234
- <tr>
235
- <td className="text-nowrap"><code>data</code></td>
236
- <td><code>data</code></td>
237
- <td><code>&#123;&#125;</code></td>
238
- <td>Required. A valid <a href="http://geojson.org/geojson-spec.html" rel="nofollow">GeoJSON object</a>.</td>
239
- </tr>
240
- <tr>
241
- <td className="text-nowrap"><code>minSize</code></td>
242
- <td><code>int</code></td>
243
- <td><code>20</code></td>
244
- <td>Defines the minimum width and height in pixels for a path to be displayed in its actual shape.</td>
245
- </tr>
246
- <tr>
247
- <td className="text-nowrap"><code>markerOptions</code></td>
248
- <td><code>object</code> or <code>function</code></td>
249
- <td><code>&#123;&#125;</code></td>
250
- <td>Optional. Customize the markers of deflated features using <a href="http://leafletjs.com/reference-1.3.0.html#marker" rel="nofollow">Leaflet marker options</a>.</td>
251
- </tr>
252
- <tr>
253
- <td className="text-nowrap"><code>markerCluster</code></td>
254
- <td><code>boolean</code></td>
255
- <td><code>false</code></td>
256
- <td>Indicates whether markers should be clustered. Requires <code>Leaflet.markercluster</code>.</td>
257
- </tr>
258
- <tr>
259
- <td className="text-nowrap"><code>markerClusterOptions</code></td>
260
- <td><code>object</code></td>
261
- <td><code>&#123;&#125;</code></td>
262
- <td>Optional. Customize the appearance and behaviour of clustered markers using <a href="https://github.com/Leaflet/Leaflet.markercluster#options"><code>Leaflet.markercluster</code> options</a>.</td>
263
- </tr>
264
- <tr>
265
- <td className="text-nowrap"><code>pointToLayer</code></td>
266
- <td><code>function</code></td>
267
- <td><code>&#123;&#125;</code></td>
268
- <td><a href="https://leafletjs.com/reference.html#geojson-pointtolayer" rel="nofollow">Leaflet geojson pointToLayer options</a>.</td>
269
- </tr>
270
- <tr>
271
- <td className="text-nowrap"><code>style</code></td>
272
- <td><code>function</code></td>
273
- <td><code>&#123;&#125;</code></td>
274
- <td>Style to apply to polygons or lines. <a href="https://leafletjs.com/reference.html#geojson-style" rel="nofollow">Leaflet geojson style options</a>.</td>
275
- </tr>
276
- <tr>
277
- <td className="text-nowrap"><code>onEachFeature</code></td>
278
- <td><code>function</code></td>
279
- <td><code>&#123;&#125;</code></td>
280
- <td>Function to execute on each geojson feature. <a href="https://leafletjs.com/reference.html#geojson-oneachfeature" rel="nofollow">Leaflet geojson onEachFeature options</a>.</td>
281
- </tr>
282
- <tr>
283
- <td className="text-nowrap"><code>filter</code></td>
284
- <td><code>function</code></td>
285
- <td><code>&#123;&#125;</code></td>
286
- <td>Filter function to apply to geojson features. <a href="https://leafletjs.com/reference.html#geojson-filter" rel="nofollow">Leaflet geojson filter options</a>.</td>
287
- </tr>
288
- </tbody>
289
- </table>
290
- </div>
291
- </div>
292
- </div>
293
- </div>
294
- </div>
295
- );
296
- }
297
-
298
- const root = ReactDOMClient.createRoot(document.getElementById('container'));
299
- root.render(<App />);
1
+
2
+ import React from 'react';
3
+ import ReactDOMClient from 'react-dom/client';
4
+ import { MapContainer, TileLayer } from 'react-leaflet';
5
+ import Deflate from 'react-leaflet-deflate';
6
+
7
+ function App() {
8
+ const [mapOptions] = React.useState({
9
+ center: [2.935403, 101.448205],
10
+ zoom: 10,
11
+ minZoom: 1,
12
+ maxZoom: 22
13
+ });
14
+
15
+ const [markerCluster, setMarkerCluster] = React.useState(true);
16
+ const [dataSet, setDataSet] = React.useState(1);
17
+ const [minSize, setMinSize] = React.useState(null);
18
+
19
+ const onChangeMarkerCluster = (e) => setMarkerCluster(e.target.checked);
20
+ const onChangeDataSet = (e) => setDataSet(e.target.value);
21
+
22
+ const onChangeMinSize = (e) => {
23
+ const minSizeInput = e.target.value;
24
+ let minSizeFloat = parseFloat(minSizeInput);
25
+ if(isNaN(minSizeFloat) || minSizeFloat <= 1.0) {
26
+ minSizeFloat = null;
27
+ }
28
+ setMinSize(minSizeFloat);
29
+ }
30
+
31
+ const onEachFeature = (feature, featureLayer) => {
32
+ featureLayer.bindPopup(`<div>This is feature #${feature.properties.id}</div>`);
33
+ featureLayer.bindTooltip(`Feature: #${feature.properties.id}`);
34
+ };
35
+
36
+ const resetOptions = () => {
37
+ setMarkerCluster(true);
38
+ setDataSet(1);
39
+ setMinSize(null);
40
+ };
41
+
42
+ const deflateOptions = {
43
+ minSize: minSize || 20,
44
+ markerCluster: markerCluster,
45
+ data: dataSet == 1 ? sample1 : sample2,
46
+ onEachFeature: onEachFeature
47
+ };
48
+
49
+ return (
50
+ <div>
51
+ <div className="row d-flex">
52
+ <div className="col-md-8 align-self-stretch">
53
+ <div className="card" style={{ height: '500px' }}>
54
+ <div className="card-body">
55
+ <MapContainer {...mapOptions} className="h-100">
56
+ <TileLayer
57
+ attribution='&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
58
+ url='http://{s}.tile.osm.org/{z}/{x}/{y}.png'
59
+ />
60
+ <Deflate {...deflateOptions} />
61
+ </MapContainer>
62
+ </div>
63
+ </div>
64
+ </div>
65
+ <div className="col-md-4">
66
+ <div className="card" style={{ height: '500px' }} >
67
+ <div className="card-body">
68
+ <div className="row">
69
+ <div className="col-sm-6">
70
+ <h6 className="mt-1"><i className="fas fa-cogs" /> Options</h6>
71
+ </div>
72
+ <div className="col-sm-6 text-right">
73
+ <button type="button" className="btn btn-sm btn-outline-info" onClick={resetOptions}>
74
+ <i className="fas fa-undo-alt" /> Reset
75
+ </button>
76
+ </div>
77
+ </div>
78
+ <hr/>
79
+ <form>
80
+ <div className="form-group row">
81
+ <label htmlFor="cluster" className="col-sm-6 col-form-label">Enable marker clustering:</label>
82
+ <div className="col-sm-6">
83
+ <input
84
+ className="form-control"
85
+ id="cluster"
86
+ name="cluster"
87
+ type="checkbox"
88
+ checked={markerCluster}
89
+ onChange={onChangeMarkerCluster}
90
+ />
91
+ </div>
92
+ </div>
93
+ <div className="form-group row">
94
+ <label htmlFor="minSize" className="col-sm-6 col-form-label">Min. Size:</label>
95
+ <div className="col-sm-6">
96
+ <input
97
+ className="form-control"
98
+ id="minSize"
99
+ name="minSize"
100
+ type="number"
101
+ value={minSize}
102
+ onChange={onChangeMinSize}
103
+ />
104
+ </div>
105
+ </div>
106
+ <div className="form-group row">
107
+ <label htmlFor="geojson" className="col-sm-6 col-form-label">GeoJSON data set:</label>
108
+ <div className="col-sm-6">
109
+ <select className="form-control" id="geojson" name="geojson" value={dataSet} onChange={onChangeDataSet}>
110
+ <option value="1">Data set 1</option>
111
+ <option value="2">Data set 2</option>
112
+ </select>
113
+ </div>
114
+ </div>
115
+ </form>
116
+ </div>
117
+ </div>
118
+ </div>
119
+ </div>
120
+ <div className="row">
121
+ <div className="col-md-12 mt-4">
122
+ <div className="card">
123
+ <div className="card-body">
124
+ <h4>Installation</h4>
125
+ <hr />
126
+ <h5>Install via NPM</h5>
127
+ <div className="card bg-dark text-white">
128
+ <div className="card-body">
129
+ <code className="text-white">
130
+ npm install react-leaflet-deflate --save
131
+ </code>
132
+ </div>
133
+ </div>
134
+ </div>
135
+ </div>
136
+ </div>
137
+ </div>
138
+ <div className="row">
139
+ <div className="col-md-12 mt-4">
140
+ <div className="card">
141
+ <div className="card-body">
142
+ <h4>Usage</h4>
143
+ <hr />
144
+
145
+ <h5>Example</h5>
146
+ <div className="card bg-dark text-white">
147
+ <div className="card-body">
148
+ <pre><code className="text-white">
149
+ import &#123; MapContainer, TileLayer &#125; from 'react-leaflet';<br />
150
+ import Deflate from 'react-leaflet-deflate';<br />
151
+ <br />
152
+ const deflateOptions = &#123;<br />
153
+ &nbsp;&nbsp;&nbsp;&nbsp;minSize: 20,<br />
154
+ &nbsp;&nbsp;&nbsp;&nbsp;markerCluster: true,<br />
155
+ &nbsp;&nbsp;&nbsp;&nbsp;data: geojsonData<br />
156
+ &#125;;<br />
157
+ <br />
158
+ &lt;MapContainer center=&#123;[101.483459, 2.938926]&#125; zoom=&#123;12&#125;&gt;<br />
159
+ &nbsp;&nbsp;&nbsp;&nbsp;&lt;TileLayer<br />
160
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;url=&quot;https://&#123;s&#125;.tile.openstreetmap.org/&#123;z&#125;/&#123;x&#125;/&#123;y&#125;.png&quot;<br/>
161
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;attribution='&amp;copy; &lt;a href=&quot;http://osm.org/copyright&quot;&gt;OpenStreetMap&lt;/a&gt; contributors'
162
+ /&gt;
163
+ <br />
164
+ <br />
165
+
166
+ &nbsp;&nbsp;&nbsp;&nbsp;&lt;Deflate &#123;...deflateOptions&#125; /&gt;<br />
167
+ &lt;/MapContainer&gt;
168
+ </code></pre>
169
+ </div>
170
+ </div>
171
+
172
+ <h5 className="mt-4">react-leaflet v5</h5>
173
+ <iframe
174
+ style={{ height: '420px', width: '100%' }}
175
+ scrolling="no"
176
+ title="react-leaflet-deflate example for react-leaflet@5.x"
177
+ src="https://codepen.io/m_hasbie/embed/wBGampr/?height=265&theme-id=0&default-tab=html,result"
178
+ frameBorder="no"
179
+ allowTransparency="true"
180
+ allowFullScreen="true"
181
+ >
182
+ See the Pen <a href='https://codepen.io/m_hasbie/pen/wBGampr/'>react-leaflet-deflate example for react-leaflet@5.x</a> by M. Hasbie
183
+ (<a href='https://codepen.io/m_hasbie'>@m_hasbie</a>) on <a href='https://codepen.io'>CodePen</a>.
184
+ </iframe>
185
+
186
+ <h5 className="mt-4">react-leaflet v2</h5>
187
+ <iframe
188
+ style={{ height: '420px', width: '100%' }}
189
+ scrolling="no"
190
+ title="react-leaflet-deflate example for react-leaflet@2.x"
191
+ src="https://codepen.io/m_hasbie/embed/MqNPRy/?height=265&theme-id=0&default-tab=js,result"
192
+ frameBorder="no"
193
+ allowTransparency="true"
194
+ allowFullScreen="true"
195
+ >
196
+ See the Pen <a href='https://codepen.io/m_hasbie/pen/MqNPRy/'>react-leaflet-deflate example for react-leaflet@2.x</a> by M. Hasbie
197
+ (<a href='https://codepen.io/m_hasbie'>@m_hasbie</a>) on <a href='https://codepen.io'>CodePen</a>.
198
+ </iframe>
199
+
200
+ <h5 className="mt-4">react-leaflet v1</h5>
201
+ <iframe
202
+ style={{ height: '420px', width: '100%' }}
203
+ scrolling="no"
204
+ title="react-leaflet-deflate example for react-leaflet@1.9.1"
205
+ src="http://codepen.io/m_hasbie/embed/jvgeVR/?height=265&theme-id=0&default-tab=js,result"
206
+ frameBorder="no"
207
+ allowTransparency="true"
208
+ allowFullScreen="true"
209
+ >
210
+ See the Pen <a href='https://codepen.io/m_hasbie/pen/jvgeVR/'>react-leaflet-deflate example for react-leaflet@1.9.1</a> by M. Hasbie
211
+ (<a href='https://codepen.io/m_hasbie'>@m_hasbie</a>) on <a href='https://codepen.io'>CodePen</a>.
212
+ </iframe>
213
+ </div>
214
+ </div>
215
+ </div>
216
+ </div>
217
+ <div className="row">
218
+ <div className="col-md-12 mt-4">
219
+ <div className="card">
220
+ <div className="card-body">
221
+ <h4>Options</h4>
222
+ <hr />
223
+
224
+ <table className="table table-hover table-striped table-bordered">
225
+ <thead className="thead-dark">
226
+ <tr>
227
+ <th>Option</th>
228
+ <th>Type</th>
229
+ <th>Default</th>
230
+ <th>Description</th>
231
+ </tr>
232
+ </thead>
233
+ <tbody>
234
+ <tr>
235
+ <td className="text-nowrap"><code>data</code></td>
236
+ <td><code>data</code></td>
237
+ <td><code>&#123;&#125;</code></td>
238
+ <td>Required. A valid <a href="http://geojson.org/geojson-spec.html" rel="nofollow">GeoJSON object</a>.</td>
239
+ </tr>
240
+ <tr>
241
+ <td className="text-nowrap"><code>minSize</code></td>
242
+ <td><code>int</code></td>
243
+ <td><code>20</code></td>
244
+ <td>Defines the minimum width and height in pixels for a path to be displayed in its actual shape.</td>
245
+ </tr>
246
+ <tr>
247
+ <td className="text-nowrap"><code>markerOptions</code></td>
248
+ <td><code>object</code> or <code>function</code></td>
249
+ <td><code>&#123;&#125;</code></td>
250
+ <td>Optional. Customize the markers of deflated features using <a href="http://leafletjs.com/reference-1.3.0.html#marker" rel="nofollow">Leaflet marker options</a>.</td>
251
+ </tr>
252
+ <tr>
253
+ <td className="text-nowrap"><code>markerCluster</code></td>
254
+ <td><code>boolean</code></td>
255
+ <td><code>false</code></td>
256
+ <td>Indicates whether markers should be clustered. Requires <code>Leaflet.markercluster</code>.</td>
257
+ </tr>
258
+ <tr>
259
+ <td className="text-nowrap"><code>markerClusterOptions</code></td>
260
+ <td><code>object</code></td>
261
+ <td><code>&#123;&#125;</code></td>
262
+ <td>Optional. Customize the appearance and behaviour of clustered markers using <a href="https://github.com/Leaflet/Leaflet.markercluster#options"><code>Leaflet.markercluster</code> options</a>.</td>
263
+ </tr>
264
+ <tr>
265
+ <td className="text-nowrap"><code>pointToLayer</code></td>
266
+ <td><code>function</code></td>
267
+ <td><code>&#123;&#125;</code></td>
268
+ <td><a href="https://leafletjs.com/reference.html#geojson-pointtolayer" rel="nofollow">Leaflet geojson pointToLayer options</a>.</td>
269
+ </tr>
270
+ <tr>
271
+ <td className="text-nowrap"><code>style</code></td>
272
+ <td><code>function</code></td>
273
+ <td><code>&#123;&#125;</code></td>
274
+ <td>Style to apply to polygons or lines. <a href="https://leafletjs.com/reference.html#geojson-style" rel="nofollow">Leaflet geojson style options</a>.</td>
275
+ </tr>
276
+ <tr>
277
+ <td className="text-nowrap"><code>onEachFeature</code></td>
278
+ <td><code>function</code></td>
279
+ <td><code>&#123;&#125;</code></td>
280
+ <td>Function to execute on each geojson feature. <a href="https://leafletjs.com/reference.html#geojson-oneachfeature" rel="nofollow">Leaflet geojson onEachFeature options</a>.</td>
281
+ </tr>
282
+ <tr>
283
+ <td className="text-nowrap"><code>filter</code></td>
284
+ <td><code>function</code></td>
285
+ <td><code>&#123;&#125;</code></td>
286
+ <td>Filter function to apply to geojson features. <a href="https://leafletjs.com/reference.html#geojson-filter" rel="nofollow">Leaflet geojson filter options</a>.</td>
287
+ </tr>
288
+ </tbody>
289
+ </table>
290
+ </div>
291
+ </div>
292
+ </div>
293
+ </div>
294
+ </div>
295
+ );
296
+ }
297
+
298
+ const root = ReactDOMClient.createRoot(document.getElementById('container'));
299
+ root.render(<App />);
@@ -1,8 +1,8 @@
1
- /*!
2
- * Start Bootstrap - Busines Frontpage (https://startbootstrap.com/template-overviews/business-frontpage)
3
- * Copyright 2013-2019 Start Bootstrap
4
- * Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap-business-frontpage/blob/master/LICENSE)
5
- */
6
- body {
7
- padding-top: 56px;
8
- }
1
+ /*!
2
+ * Start Bootstrap - Busines Frontpage (https://startbootstrap.com/template-overviews/business-frontpage)
3
+ * Copyright 2013-2019 Start Bootstrap
4
+ * Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap-business-frontpage/blob/master/LICENSE)
5
+ */
6
+ body {
7
+ padding-top: 56px;
8
+ }