@osimatic/helpers-js 1.4.18 → 1.4.20
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/open_street_map.js +3 -3
- package/package.json +1 -1
package/open_street_map.js
CHANGED
|
@@ -77,7 +77,7 @@ class OpenStreetMap {
|
|
|
77
77
|
listLocations.forEach(location => this.addMarker(location, icon));
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
addMarker(
|
|
80
|
+
addMarker(coordinates, options) {
|
|
81
81
|
let locationCoordinates = coordinates.split(',');
|
|
82
82
|
let latitude = parseFloat(locationCoordinates[0]);
|
|
83
83
|
let longitude = parseFloat(locationCoordinates[1]);
|
|
@@ -99,7 +99,7 @@ class OpenStreetMap {
|
|
|
99
99
|
return false;
|
|
100
100
|
});
|
|
101
101
|
marker.addTo(this.map);
|
|
102
|
-
marker.bindPopup(options['
|
|
102
|
+
marker.bindPopup(options['popup']);
|
|
103
103
|
|
|
104
104
|
this.markers.push(marker);
|
|
105
105
|
this.locations.push([latitude, longitude]);
|
|
@@ -189,7 +189,7 @@ class OpenStreetMap {
|
|
|
189
189
|
}
|
|
190
190
|
|
|
191
191
|
if (geoJson.type === 'Polygon') {
|
|
192
|
-
const rings = Polygon.toLatLngRings(geoJson
|
|
192
|
+
const rings = Polygon.toLatLngRings(geoJson);
|
|
193
193
|
if (!rings.length) {
|
|
194
194
|
console.warn('displayGeoJSONOnMap: Polygon invalide');
|
|
195
195
|
return null;
|