@osimatic/helpers-js 1.4.0 → 1.4.2
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/location.js +1 -1
- package/open_street_map.js +2 -2
- package/package.json +1 -1
package/location.js
CHANGED
|
@@ -428,7 +428,7 @@ class PostalAddress {
|
|
|
428
428
|
}
|
|
429
429
|
|
|
430
430
|
class Polygon {
|
|
431
|
-
static
|
|
431
|
+
static format(geoJsonPolygon) {
|
|
432
432
|
const rings = geoJsonPolygon.coordinates || [];
|
|
433
433
|
const ring0 = rings[0] || [];
|
|
434
434
|
const n = ring0.length ? ring0.length - (JSON.stringify(ring0[0])===JSON.stringify(ring0[ring0.length-1]) ? 1 : 0) : 0;
|
package/open_street_map.js
CHANGED
|
@@ -25,12 +25,12 @@ class OpenStreetMap {
|
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
const container = L.DomUtil.get(mapContainer[0]);
|
|
29
29
|
if (container != null) {
|
|
30
30
|
container._leaflet_id = null;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
this.map = L.map(mapContainer, options || {});
|
|
33
|
+
this.map = L.map(mapContainer[0], options || {});
|
|
34
34
|
|
|
35
35
|
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
|
36
36
|
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|