@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.
@@ -77,7 +77,7 @@ class OpenStreetMap {
77
77
  listLocations.forEach(location => this.addMarker(location, icon));
78
78
  }
79
79
 
80
- addMarker(geoJson, options) {
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['popup_content']);
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.coordinates);
192
+ const rings = Polygon.toLatLngRings(geoJson);
193
193
  if (!rings.length) {
194
194
  console.warn('displayGeoJSONOnMap: Polygon invalide');
195
195
  return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osimatic/helpers-js",
3
- "version": "1.4.18",
3
+ "version": "1.4.20",
4
4
  "main": "main.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"