diff --git a/package.json b/package.json index 0f4f9180..29db900f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "road2", - "version": "1.1.1", + "version": "1.1.2", "description": "Calcul d'itinéraire", "author": "RDEV - IGN", diff --git a/src/js/sources/pgrSource.js b/src/js/sources/pgrSource.js index c7a14dc8..08a7aae9 100644 --- a/src/js/sources/pgrSource.js +++ b/src/js/sources/pgrSource.js @@ -988,6 +988,11 @@ module.exports = class pgrSource extends Source { currentPgrRoute.geometry.coordinates = newRouteGeomCoords; routes[i].geometry = new Line(currentPgrRoute.geometry, "geojson", this._topology.projection); + if (!routes[i].geometry.transform(askedProjection)) { + throw errorManager.createError(" Error during reprojection of step's geometry in PGR response. "); + } else { + LOGGER.debug("step geometry is converted"); + } routes[i].portions = portions; }