@osimatic/helpers-js 1.4.8 → 1.4.9

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.
Files changed (2) hide show
  1. package/location.js +4 -4
  2. package/package.json +1 -1
package/location.js CHANGED
@@ -447,8 +447,8 @@ class Polygon {
447
447
  const more = ring0.length > maxShow ? ` … (+${ring0.length - maxShow} sommets)` : '';
448
448
 
449
449
  return {
450
- label: `Polygon sommets: ${n} départ: ${GeographicCoordinates.format(firstLat, firstLon)}`,
451
- title: `Sommets: ${concise}${more}`
450
+ label: `Polygon de ${n} sommets (départ : ${GeographicCoordinates.format(firstLat, firstLon)})`,
451
+ title: `Sommets : ${concise}${more}`
452
452
  };
453
453
  }
454
454
 
@@ -639,8 +639,8 @@ class GeographicCoordinates {
639
639
  }
640
640
  }
641
641
  else if (it.type === 'Point') {
642
- const p = GeographicCoordinates.parse(it.coordinates);
643
- if (p && GeographicCoordinates.haversine(lat,lon,p[0],p[1]) <= tolMeters) {
642
+ const p = it.coordinates || [];
643
+ if (p && GeographicCoordinates.haversine(lat,lon,p[1],p[0]) <= tolMeters) {
644
644
  return true;
645
645
  }
646
646
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osimatic/helpers-js",
3
- "version": "1.4.8",
3
+ "version": "1.4.9",
4
4
  "main": "main.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"