From 24b78a51dea686ab827dc3e2fdf9d5d57f7d7f9f Mon Sep 17 00:00:00 2001 From: elias couppe Date: Mon, 6 Feb 2023 15:34:31 +0100 Subject: [PATCH 1/5] docs: retrait map.json (mention professionnels.ign.fr) --- map.json | 12384 ----------------------------------------------------- 1 file changed, 12384 deletions(-) delete mode 100644 map.json diff --git a/map.json b/map.json deleted file mode 100644 index 7af90f33..00000000 --- a/map.json +++ /dev/null @@ -1,12384 +0,0 @@ -{ - "errors": [], - "warnings": [ - "./src/Formats/WKT.js\n\n/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/WKT.js\n 61:21 warning Unexpected console statement no-console\n 68:21 warning Unexpected console statement no-console\n\n✖ 2 problems (0 errors, 2 warnings)\n\n @ ./src/Services/Route/Response/RouteResponseFactory.js 13:0-39\n @ ./src/Services/Route/Route.js\n @ ./src/Services/Services.js\n @ ./src/Gp.js\n @ multi ./src/Gp", - "./src/Formats/XML.js\n\n/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XML.js\n 135:5 warning Missing JSDoc for parameter 'doc' valid-jsdoc\n 270:1 warning Missing JSDoc @returns for function valid-jsdoc\n\n✖ 2 problems (0 errors, 2 warnings)\n\n @ ./src/Services/Alti/Response/AltiResponseFactory.js 12:0-39\n @ ./src/Services/Alti/Alti.js\n @ ./src/Services/Services.js\n @ ./src/Gp.js\n @ multi ./src/Gp", - "./src/Protocols/JSONP.js\n\n/home/jpbazonnais/Projets/geoportal-access-lib/src/Protocols/JSONP.js\n 165:17 warning Unexpected console statement no-console\n\n✖ 1 problem (0 errors, 1 warning)\n\n @ ./src/Protocols/Protocol.js 10:0-28\n @ ./src/Services/CommonService.js\n @ ./src/Services/Alti/Alti.js\n @ ./src/Services/Services.js\n @ ./src/Gp.js\n @ multi ./src/Gp", - "./src/Protocols/Protocol.js\n\n/home/jpbazonnais/Projets/geoportal-access-lib/src/Protocols/Protocol.js\n 87:13 warning Unexpected console statement no-console\n\n✖ 1 problem (0 errors, 1 warning)\n\n @ ./src/Services/CommonService.js 4:0-45\n @ ./src/Services/Alti/Alti.js\n @ ./src/Services/Services.js\n @ ./src/Gp.js\n @ multi ./src/Gp", - "./src/Protocols/XHR.js\n\n/home/jpbazonnais/Projets/geoportal-access-lib/src/Protocols/XHR.js\n 176:29 warning Expected the Promise rejection reason to be an Error prefer-promise-reject-errors\n 202:37 warning Expected the Promise rejection reason to be an Error prefer-promise-reject-errors\n 228:29 warning Unexpected console statement no-console\n 258:37 warning Expected the Promise rejection reason to be an Error prefer-promise-reject-errors\n 325:33 warning Expected the Promise rejection reason to be an Error prefer-promise-reject-errors\n 357:17 warning Unexpected console statement no-console\n 394:17 warning Unexpected console statement no-console\n\n✖ 7 problems (0 errors, 7 warnings)\n\n @ ./src/Gp.js 28:0-34\n @ multi ./src/Gp", - "./src/Services/Alti/Formats/AltiResponseReader.js\n\n/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Formats/AltiResponseReader.js\n 154:5 warning Missing JSDoc @returns for function valid-jsdoc\n 288:1 warning Missing JSDoc @returns for function valid-jsdoc\n\n✖ 2 problems (0 errors, 2 warnings)\n\n @ ./src/Services/Alti/Response/AltiResponseFactory.js 13:0-63\n @ ./src/Services/Alti/Alti.js\n @ ./src/Services/Services.js\n @ ./src/Gp.js\n @ multi ./src/Gp", - "./src/Services/Alti/Request/AltiRequestFactory.js\n\n/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestFactory.js\n 16:5 warning Missing JSDoc @returns for function valid-jsdoc\n\n✖ 1 problem (0 errors, 1 warning)\n\n @ ./src/Services/Alti/Alti.js 7:0-62\n @ ./src/Services/Services.js\n @ ./src/Gp.js\n @ multi ./src/Gp", - "./src/Services/Alti/Request/AltiRequestREST.js\n\n/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestREST.js\n 137:5 warning Missing JSDoc return description valid-jsdoc\n 172:5 warning Missing JSDoc return description valid-jsdoc\n\n✖ 2 problems (0 errors, 2 warnings)\n\n @ ./src/Services/Alti/Request/AltiRequestFactory.js 11:0-48\n @ ./src/Services/Alti/Alti.js\n @ ./src/Services/Services.js\n @ ./src/Gp.js\n @ multi ./src/Gp", - "./src/Services/Alti/Request/AltiRequestWPS.js\n\n/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestWPS.js\n 17:5 warning Missing JSDoc @returns for function valid-jsdoc\n\n✖ 1 problem (0 errors, 1 warning)\n\n @ ./src/Services/Alti/Request/AltiRequestFactory.js 12:0-46\n @ ./src/Services/Alti/Alti.js\n @ ./src/Services/Services.js\n @ ./src/Gp.js\n @ multi ./src/Gp", - "./src/Services/Alti/Request/model/AltiElevationRequest.js\n\n/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/model/AltiElevationRequest.js\n 50:9 warning Missing JSDoc @returns for function valid-jsdoc\n 54:9 warning Missing JSDoc for parameter 'z' valid-jsdoc\n 67:1 warning Missing JSDoc return description valid-jsdoc\n\n✖ 3 problems (0 errors, 3 warnings)\n\n @ ./src/Services/Alti/Request/AltiRequestREST.js 5:0-64\n @ ./src/Services/Alti/Request/AltiRequestFactory.js\n @ ./src/Services/Alti/Alti.js\n @ ./src/Services/Services.js\n @ ./src/Gp.js\n @ multi ./src/Gp", - "./src/Services/Alti/Request/model/AltiProfilRequest.js\n\n/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/model/AltiProfilRequest.js\n 49:9 warning Missing JSDoc @returns for function valid-jsdoc\n 53:9 warning Missing JSDoc for parameter 'value' valid-jsdoc\n 65:1 warning Missing JSDoc return description valid-jsdoc\n\n✖ 3 problems (0 errors, 3 warnings)\n\n @ ./src/Services/Alti/Request/AltiRequestREST.js 6:0-58\n @ ./src/Services/Alti/Request/AltiRequestFactory.js\n @ ./src/Services/Alti/Alti.js\n @ ./src/Services/Services.js\n @ ./src/Gp.js\n @ multi ./src/Gp", - "./src/Services/Alti/Request/model/AltiRequest.js\n\n/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/model/AltiRequest.js\n 99:5 warning Missing JSDoc return description valid-jsdoc\n 173:1 warning Missing JSDoc return description valid-jsdoc\n\n✖ 2 problems (0 errors, 2 warnings)\n\n @ ./src/Services/Alti/Request/model/AltiProfilRequest.js 3:0-40\n @ ./src/Services/Alti/Request/AltiRequestREST.js\n @ ./src/Services/Alti/Request/AltiRequestFactory.js\n @ ./src/Services/Alti/Alti.js\n @ ./src/Services/Services.js\n @ ./src/Gp.js\n @ multi ./src/Gp", - "./src/Services/AutoConf/Formats/AutoConfResponseReader.js\n\n/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Formats/AutoConfResponseReader.js\n 71:9 warning Missing JSDoc @returns for function valid-jsdoc\n 71:9 warning Missing JSDoc for parameter 'viewContextNode' valid-jsdoc\n 88:9 warning Missing JSDoc for parameter 'data' valid-jsdoc\n 88:9 warning Missing JSDoc for parameter 'titleNode' valid-jsdoc\n 98:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 98:9 warning Missing JSDoc for parameter 'data' valid-jsdoc\n 107:9 warning Missing JSDoc for parameter 'data' valid-jsdoc\n 107:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 139:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 139:9 warning Missing JSDoc for parameter 'service' valid-jsdoc\n 147:9 warning Missing JSDoc for parameter 'layerListNode' valid-jsdoc\n 147:9 warning Missing JSDoc for parameter 'config' valid-jsdoc\n 204:9 warning Missing JSDoc for parameter 'layerNode' valid-jsdoc\n 204:9 warning Missing JSDoc for parameter 'config' valid-jsdoc\n 252:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 252:9 warning Missing JSDoc for parameter 'lyrData' valid-jsdoc\n 260:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 260:9 warning Missing JSDoc for parameter 'lyrData' valid-jsdoc\n 269:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 269:9 warning Missing JSDoc for parameter 'lyrData' valid-jsdoc\n 289:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 289:9 warning Missing JSDoc for parameter 'lyrData' valid-jsdoc\n 324:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 324:9 warning Missing JSDoc for parameter 'lyrData' valid-jsdoc\n 354:9 warning Missing JSDoc for parameter 'themeNode' valid-jsdoc\n 354:9 warning Missing JSDoc for parameter 'config' valid-jsdoc\n 362:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 362:9 warning Missing JSDoc for parameter 'config' valid-jsdoc\n 370:9 warning Missing JSDoc for parameter 'territoryNode' valid-jsdoc\n 370:9 warning Missing JSDoc for parameter 'config' valid-jsdoc\n 394:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 394:9 warning Missing JSDoc for parameter 'territory' valid-jsdoc\n 404:9 warning Missing JSDoc for parameter 'data' valid-jsdoc\n 404:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 423:9 warning Missing JSDoc for parameter 'territory' valid-jsdoc\n 423:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 435:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 435:9 warning Missing JSDoc for parameter 'data' valid-jsdoc\n 480:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 480:9 warning Missing JSDoc for parameter 'territory' valid-jsdoc\n 490:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 490:9 warning Missing JSDoc for parameter 'territory' valid-jsdoc\n 499:9 warning Missing JSDoc for parameter 'territory' valid-jsdoc\n 499:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 508:9 warning Missing JSDoc for parameter 'config' valid-jsdoc\n 508:9 warning Missing JSDoc for parameter 'resNode' valid-jsdoc\n 517:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 517:9 warning Missing JSDoc for parameter 'lyrData' valid-jsdoc\n 533:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 533:9 warning Missing JSDoc for parameter 'data' valid-jsdoc\n 573:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 573:9 warning Missing JSDoc for parameter 'data' valid-jsdoc\n 582:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 582:9 warning Missing JSDoc for parameter 'lyr' valid-jsdoc\n 597:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 597:9 warning Missing JSDoc for parameter 'lyr' valid-jsdoc\n 612:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 612:9 warning Missing JSDoc for parameter 'lyr' valid-jsdoc\n 628:9 warning Missing JSDoc for parameter 'originator' valid-jsdoc\n 628:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 636:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 636:9 warning Missing JSDoc for parameter 'originator' valid-jsdoc\n 644:9 warning Missing JSDoc for parameter 'originator' valid-jsdoc\n 644:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 652:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 652:9 warning Missing JSDoc for parameter 'lyr' valid-jsdoc\n 667:9 warning Missing JSDoc for parameter 'legend' valid-jsdoc\n 667:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 682:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 682:9 warning Missing JSDoc for parameter 'lyr' valid-jsdoc\n 695:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 695:9 warning Missing JSDoc for parameter 'lyr' valid-jsdoc\n 717:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 717:9 warning Missing JSDoc for parameter 'lyr' valid-jsdoc\n 745:9 warning Missing JSDoc for parameter 'data' valid-jsdoc\n 745:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 754:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 754:9 warning Missing JSDoc for parameter 'tmsData' valid-jsdoc\n 767:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 767:9 warning Missing JSDoc for parameter 'data' valid-jsdoc\n 787:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 787:9 warning Missing JSDoc for parameter 'data' valid-jsdoc\n 808:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 808:9 warning Missing JSDoc for parameter 'lyr' valid-jsdoc\n 824:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 824:9 warning Missing JSDoc for parameter 'limits' valid-jsdoc\n 853:9 warning Missing JSDoc for parameter 'data' valid-jsdoc\n 853:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 906:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 906:9 warning Missing JSDoc for parameter 'tmsData' valid-jsdoc\n 938:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 938:9 warning Missing JSDoc for parameter 'tileMatrix' valid-jsdoc\n 947:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 947:9 warning Missing JSDoc for parameter 'tileMatrix' valid-jsdoc\n 958:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 958:9 warning Missing JSDoc for parameter 'tileMatrix' valid-jsdoc\n 967:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 967:9 warning Missing JSDoc for parameter 'tileMatrix' valid-jsdoc\n 976:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 976:9 warning Missing JSDoc for parameter 'tileMatrix' valid-jsdoc\n 985:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 985:9 warning Missing JSDoc for parameter 'tileMatrix' valid-jsdoc\n 994:5 warning Missing JSDoc @returns for function valid-jsdoc\n 994:5 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 1010:5 warning Missing JSDoc @returns for function valid-jsdoc\n 1010:5 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 1150:25 warning Unexpected console statement no-console\n 1158:25 warning Unexpected console statement no-console\n 1173:29 warning Unexpected console statement no-console\n 1182:25 warning Unexpected console statement no-console\n\n✖ 110 problems (0 errors, 110 warnings)\n\n @ ./src/Services/AutoConf/Response/AutoConfResponseFactory.js 13:0-71\n @ ./src/Services/AutoConf/AutoConf.js\n @ ./src/Services/Services.js\n @ ./src/Gp.js\n @ multi ./src/Gp", - "./src/Services/CommonService.js\n\n/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/CommonService.js\n 127:13 warning Unexpected console statement no-console\n 136:17 warning Unexpected console statement no-console\n 138:17 warning Unexpected console statement no-console\n 167:13 warning Unexpected console statement no-console\n\n✖ 4 problems (0 errors, 4 warnings)\n\n @ ./src/Services/Alti/Alti.js 5:0-45\n @ ./src/Services/Services.js\n @ ./src/Gp.js\n @ multi ./src/Gp", - "./src/Services/Geocode/Formats/DirectGeocodeResponseReader.js\n\n/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Formats/DirectGeocodeResponseReader.js\n 59:9 warning Missing JSDoc @returns for function valid-jsdoc\n 59:9 warning Missing JSDoc for parameter 'root' valid-jsdoc\n 72:9 warning Missing JSDoc for parameter 'geocodeResponse' valid-jsdoc\n 72:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 84:9 warning Missing JSDoc for parameter 'geocodedLocation' valid-jsdoc\n 84:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 96:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 96:9 warning Missing JSDoc for parameter 'geocodedLocation' valid-jsdoc\n 106:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 106:9 warning Missing JSDoc for parameter 'geocodedLocation' valid-jsdoc\n 113:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 113:9 warning Missing JSDoc for parameter 'geocodedLocation' valid-jsdoc\n 127:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 127:9 warning Missing JSDoc for parameter 'geocodedLocation' valid-jsdoc\n 141:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 141:9 warning Missing JSDoc for parameter 'geocodedLocation' valid-jsdoc\n 201:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 201:9 warning Missing JSDoc for parameter 'geocodedLocation' valid-jsdoc\n 208:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 225:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 225:9 warning Missing JSDoc for parameter 'geocodedLocation' valid-jsdoc\n 237:5 warning Missing JSDoc @returns for function valid-jsdoc\n 237:5 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 253:5 warning Missing JSDoc @returns for function valid-jsdoc\n 253:5 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 401:25 warning Unexpected console statement no-console\n 409:25 warning Unexpected console statement no-console\n 424:29 warning Unexpected console statement no-console\n 433:25 warning Unexpected console statement no-console\n\n✖ 29 problems (0 errors, 29 warnings)\n\n @ ./src/Services/Geocode/Response/DirectGeocodeResponseFactory.js 15:0-81\n @ ./src/Services/Geocode/Geocode.js\n @ ./src/Services/Services.js\n @ ./src/Gp.js\n @ multi ./src/Gp", - "./src/Services/Geocode/Formats/ReverseGeocodeResponseReader.js\n\n/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Formats/ReverseGeocodeResponseReader.js\n 79:9 warning Missing JSDoc @returns for function valid-jsdoc\n 79:9 warning Missing JSDoc for parameter 'root' valid-jsdoc\n 92:9 warning Missing JSDoc for parameter 'reverseGeocodeResponse' valid-jsdoc\n 92:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 104:9 warning Missing JSDoc for parameter 'reverseGeocodedLocation' valid-jsdoc\n 104:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 114:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 114:9 warning Missing JSDoc for parameter 'reverseGeocodedLocation' valid-jsdoc\n 128:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 128:9 warning Missing JSDoc for parameter 'reverseGeocodedLocation' valid-jsdoc\n 140:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 140:9 warning Missing JSDoc for parameter 'reverseGeocodedLocation' valid-jsdoc\n 200:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 200:9 warning Missing JSDoc for parameter 'reverseGeocodedLocation' valid-jsdoc\n 207:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 207:9 warning Missing JSDoc for parameter 'reverseGeocodedLocation' valid-jsdoc\n 214:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 230:9 warning Missing JSDoc for parameter 'reverseGeocodedLocation' valid-jsdoc\n 230:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 243:9 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 243:9 warning Missing JSDoc for parameter 'reverseGeocodedLocation' valid-jsdoc\n 251:5 warning Missing JSDoc @returns for function valid-jsdoc\n 251:5 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 267:5 warning Missing JSDoc @returns for function valid-jsdoc\n 267:5 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 410:25 warning Unexpected console statement no-console\n 418:25 warning Unexpected console statement no-console\n 433:29 warning Unexpected console statement no-console\n 442:25 warning Unexpected console statement no-console\n\n✖ 29 problems (0 errors, 29 warnings)\n\n @ ./src/Services/Geocode/Response/ReverseGeocodeResponseFactory.js 15:0-83\n @ ./src/Services/Geocode/ReverseGeocode.js\n @ ./src/Services/Services.js\n @ ./src/Gp.js\n @ multi ./src/Gp", - "./src/Services/ProcessIsoCurve/Formats/ProcessIsoCurveResponseReader.js\n\n/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Formats/ProcessIsoCurveResponseReader.js\n 78:5 warning Missing JSDoc @returns for function valid-jsdoc\n 78:5 warning Missing JSDoc for parameter 'root' valid-jsdoc\n 107:5 warning Missing JSDoc for parameter 'response' valid-jsdoc\n 107:5 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 114:5 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 114:5 warning Missing JSDoc for parameter 'response' valid-jsdoc\n 124:5 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 124:5 warning Missing JSDoc for parameter 'response' valid-jsdoc\n 131:5 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 131:5 warning Missing JSDoc for parameter 'response' valid-jsdoc\n 140:5 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 140:5 warning Missing JSDoc for parameter 'response' valid-jsdoc\n 147:5 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 147:5 warning Missing JSDoc for parameter 'response' valid-jsdoc\n 154:5 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 154:5 warning Missing JSDoc for parameter 'response' valid-jsdoc\n 161:5 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 161:5 warning Missing JSDoc for parameter 'response' valid-jsdoc\n 165:13 warning Missing JSDoc for parameter 'json' valid-jsdoc\n 180:5 warning Missing JSDoc @returns for function valid-jsdoc\n 180:5 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 197:5 warning Missing JSDoc @returns for function valid-jsdoc\n 197:5 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 213:5 warning Missing JSDoc @returns for function valid-jsdoc\n 213:5 warning Missing JSDoc for parameter 'node' valid-jsdoc\n 233:1 warning Missing JSDoc @returns for function valid-jsdoc\n 233:1 warning Missing JSDoc for parameter 'root' valid-jsdoc\n\n✖ 27 problems (0 errors, 27 warnings)\n\n @ ./src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js 14:0-85\n @ ./src/Services/ProcessIsoCurve/ProcessIsoCurve.js\n @ ./src/Services/Services.js\n @ ./src/Gp.js\n @ multi ./src/Gp", - "./src/Services/Route/Response/RouteResponseFactory.js\n\n/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Response/RouteResponseFactory.js\n 136:33 warning Unexpected console statement no-console\n\n✖ 1 problem (0 errors, 1 warning)\n\n @ ./src/Services/Route/Route.js 8:0-67\n @ ./src/Services/Services.js\n @ ./src/Gp.js\n @ multi ./src/Gp" - ], - "version": "3.11.0", - "hash": "5b3c548adb66c4c1b02b", - "time": 5987, - "publicPath": "", - "assetsByChunkName": { - "main": "GpServices-src.js" - }, - "assets": [ - { - "name": "../samples/NodeJS/Services/node-bundle-autocomplete.js", - "size": 400, - "chunks": [], - "chunkNames": [], - "emitted": true - }, - { - "name": "GpServices-src.js", - "size": 685163, - "chunks": [ - 0 - ], - "chunkNames": [ - "main" - ], - "emitted": true, - "isOverSizeLimit": true - }, - { - "name": "../samples/NodeJS/node-bundle-gp.js", - "size": 86, - "chunks": [], - "chunkNames": [], - "emitted": true - }, - { - "name": "../samples/NodeJS/Protocols/node-bundle-xhr-get.js", - "size": 599, - "chunks": [], - "chunkNames": [], - "emitted": true - }, - { - "name": "../samples/NodeJS/Protocols/node-bundle-xhr-post.js", - "size": 1491, - "chunks": [], - "chunkNames": [], - "emitted": true - }, - { - "name": "../samples/NodeJS/Services/node-bundle-alti.js", - "size": 444, - "chunks": [], - "chunkNames": [], - "emitted": true - }, - { - "name": "../samples/resources/AutoConf.js", - "size": 327203, - "chunks": [], - "chunkNames": [], - "emitted": true, - "isOverSizeLimit": true - }, - { - "name": "../samples/NodeJS/Services/node-bundle-autoconf.js", - "size": 240, - "chunks": [], - "chunkNames": [], - "emitted": true - }, - { - "name": "../samples/NodeJS/Services/node-bundle-geocode.js", - "size": 430, - "chunks": [], - "chunkNames": [], - "emitted": true - }, - { - "name": "../samples/NodeJS/Services/node-bundle-isocurve.js", - "size": 449, - "chunks": [], - "chunkNames": [], - "emitted": true - }, - { - "name": "../samples/NodeJS/Services/node-bundle-reverse.js", - "size": 440, - "chunks": [], - "chunkNames": [], - "emitted": true - }, - { - "name": "../samples/NodeJS/Services/node-bundle-route.js", - "size": 489, - "chunks": [], - "chunkNames": [], - "emitted": true - } - ], - "filteredAssets": 0, - "entrypoints": { - "main": { - "chunks": [ - 0 - ], - "assets": [ - "GpServices-src.js" - ], - "isOverSizeLimit": true - } - }, - "chunks": [ - { - "id": 0, - "rendered": true, - "initial": true, - "entry": true, - "extraAsync": false, - "size": 624495, - "names": [ - "main" - ], - "files": [ - "GpServices-src.js" - ], - "hash": "6af259bdd60e7dfaa3c8", - "parents": [], - "modules": [ - { - "id": 0, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Utils/LoggerByDefault.js", - "name": "./src/Utils/LoggerByDefault.js", - "index": 4, - "index2": 1, - "size": 553, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Protocols/XHR.js", - "issuerId": 19, - "issuerName": "./src/Protocols/XHR.js", - "profile": { - "factory": 393, - "building": 359 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 3, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/CommonService.js", - "module": "./src/Services/CommonService.js", - "moduleName": "./src/Services/CommonService.js", - "type": "harmony import", - "userRequest": "../Utils/LoggerByDefault", - "loc": "1:0-46" - }, - { - "moduleId": 6, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XML.js", - "module": "./src/Formats/XML.js", - "moduleName": "./src/Formats/XML.js", - "type": "harmony import", - "userRequest": "../Utils/LoggerByDefault", - "loc": "3:0-46" - }, - { - "moduleId": 8, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/WKT.js", - "module": "./src/Formats/WKT.js", - "moduleName": "./src/Formats/WKT.js", - "type": "harmony import", - "userRequest": "../Utils/LoggerByDefault", - "loc": "1:0-46" - }, - { - "moduleId": 11, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS.js", - "module": "./src/Formats/XLS.js", - "moduleName": "./src/Formats/XLS.js", - "type": "harmony import", - "userRequest": "../Utils/LoggerByDefault", - "loc": "1:0-46" - }, - { - "moduleId": 12, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/AbstractService.js", - "module": "./src/Formats/XLS/AbstractService.js", - "moduleName": "./src/Formats/XLS/AbstractService.js", - "type": "harmony import", - "userRequest": "../../Utils/LoggerByDefault", - "loc": "1:0-49" - }, - { - "moduleId": 13, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService/GeocodeFilterExtension.js", - "module": "./src/Formats/XLS/LocationUtilityService/GeocodeFilterExtension.js", - "moduleName": "./src/Formats/XLS/LocationUtilityService/GeocodeFilterExtension.js", - "type": "harmony import", - "userRequest": "../../../Utils/LoggerByDefault", - "loc": "2:0-52" - }, - { - "moduleId": 19, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Protocols/XHR.js", - "module": "./src/Protocols/XHR.js", - "moduleName": "./src/Protocols/XHR.js", - "type": "harmony import", - "userRequest": "../Utils/LoggerByDefault", - "loc": "3:0-46" - }, - { - "moduleId": 21, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/model/AltiElevationRequest.js", - "module": "./src/Services/Alti/Request/model/AltiElevationRequest.js", - "moduleName": "./src/Services/Alti/Request/model/AltiElevationRequest.js", - "type": "harmony import", - "userRequest": "../../../../Utils/LoggerByDefault", - "loc": "2:0-55" - }, - { - "moduleId": 22, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/model/AltiRequest.js", - "module": "./src/Services/Alti/Request/model/AltiRequest.js", - "moduleName": "./src/Services/Alti/Request/model/AltiRequest.js", - "type": "harmony import", - "userRequest": "../../../../Utils/LoggerByDefault", - "loc": "2:0-55" - }, - { - "moduleId": 23, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/model/AltiProfilRequest.js", - "module": "./src/Services/Alti/Request/model/AltiProfilRequest.js", - "moduleName": "./src/Services/Alti/Request/model/AltiProfilRequest.js", - "type": "harmony import", - "userRequest": "../../../../Utils/LoggerByDefault", - "loc": "2:0-55" - }, - { - "moduleId": 38, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService.js", - "module": "./src/Formats/XLS/LocationUtilityService.js", - "moduleName": "./src/Formats/XLS/LocationUtilityService.js", - "type": "harmony import", - "userRequest": "../../Utils/LoggerByDefault", - "loc": "1:0-49" - }, - { - "moduleId": 46, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Alti.js", - "module": "./src/Services/Alti/Alti.js", - "moduleName": "./src/Services/Alti/Alti.js", - "type": "harmony import", - "userRequest": "../../Utils/LoggerByDefault", - "loc": "2:0-49" - }, - { - "moduleId": 53, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Protocols/JSONP.js", - "module": "./src/Protocols/JSONP.js", - "moduleName": "./src/Protocols/JSONP.js", - "type": "harmony import", - "userRequest": "../Utils/LoggerByDefault", - "loc": "8:0-46" - }, - { - "moduleId": 54, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestFactory.js", - "module": "./src/Services/Alti/Request/AltiRequestFactory.js", - "moduleName": "./src/Services/Alti/Request/AltiRequestFactory.js", - "type": "harmony import", - "userRequest": "../../../Utils/LoggerByDefault", - "loc": "9:0-52" - }, - { - "moduleId": 55, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestREST.js", - "module": "./src/Services/Alti/Request/AltiRequestREST.js", - "moduleName": "./src/Services/Alti/Request/AltiRequestREST.js", - "type": "harmony import", - "userRequest": "../../../Utils/LoggerByDefault", - "loc": "3:0-52" - }, - { - "moduleId": 56, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestWPS.js", - "module": "./src/Services/Alti/Request/AltiRequestWPS.js", - "moduleName": "./src/Services/Alti/Request/AltiRequestWPS.js", - "type": "harmony import", - "userRequest": "../../../Utils/LoggerByDefault", - "loc": "9:0-52" - }, - { - "moduleId": 57, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/WPS.js", - "module": "./src/Formats/WPS.js", - "moduleName": "./src/Formats/WPS.js", - "type": "harmony import", - "userRequest": "../Utils/LoggerByDefault", - "loc": "1:0-46" - }, - { - "moduleId": 58, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Response/AltiResponseFactory.js", - "module": "./src/Services/Alti/Response/AltiResponseFactory.js", - "moduleName": "./src/Services/Alti/Response/AltiResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Utils/LoggerByDefault", - "loc": "9:0-52" - }, - { - "moduleId": 60, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/AutoConf.js", - "module": "./src/Services/AutoConf/AutoConf.js", - "moduleName": "./src/Services/AutoConf/AutoConf.js", - "type": "harmony import", - "userRequest": "../../Utils/LoggerByDefault", - "loc": "2:0-49" - }, - { - "moduleId": 61, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Response/AutoConfResponseFactory.js", - "module": "./src/Services/AutoConf/Response/AutoConfResponseFactory.js", - "moduleName": "./src/Services/AutoConf/Response/AutoConfResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Utils/LoggerByDefault", - "loc": "9:0-52" - }, - { - "moduleId": 63, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Geocode.js", - "module": "./src/Services/Geocode/Geocode.js", - "moduleName": "./src/Services/Geocode/Geocode.js", - "type": "harmony import", - "userRequest": "../../Utils/LoggerByDefault", - "loc": "2:0-49" - }, - { - "moduleId": 64, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "module": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "moduleName": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "type": "harmony import", - "userRequest": "../../../Utils/LoggerByDefault", - "loc": "9:0-52" - }, - { - "moduleId": 65, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/RequestHeader.js", - "module": "./src/Formats/XLS/RequestHeader.js", - "moduleName": "./src/Formats/XLS/RequestHeader.js", - "type": "harmony import", - "userRequest": "../../Utils/LoggerByDefault", - "loc": "1:0-49" - }, - { - "moduleId": 66, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/Request.js", - "module": "./src/Formats/XLS/Request.js", - "moduleName": "./src/Formats/XLS/Request.js", - "type": "harmony import", - "userRequest": "../../Utils/LoggerByDefault", - "loc": "2:0-49" - }, - { - "moduleId": 67, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService/GeocodeRequest.js", - "module": "./src/Formats/XLS/LocationUtilityService/GeocodeRequest.js", - "moduleName": "./src/Formats/XLS/LocationUtilityService/GeocodeRequest.js", - "type": "harmony import", - "userRequest": "../../../Utils/LoggerByDefault", - "loc": "1:0-52" - }, - { - "moduleId": 68, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService/model/Address.js", - "module": "./src/Formats/XLS/LocationUtilityService/model/Address.js", - "moduleName": "./src/Formats/XLS/LocationUtilityService/model/Address.js", - "type": "harmony import", - "userRequest": "../../../../Utils/LoggerByDefault", - "loc": "2:0-55" - }, - { - "moduleId": 69, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService/ReverseGeocodeRequest.js", - "module": "./src/Formats/XLS/LocationUtilityService/ReverseGeocodeRequest.js", - "moduleName": "./src/Formats/XLS/LocationUtilityService/ReverseGeocodeRequest.js", - "type": "harmony import", - "userRequest": "../../../Utils/LoggerByDefault", - "loc": "2:0-52" - }, - { - "moduleId": 70, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService/model/Position.js", - "module": "./src/Formats/XLS/LocationUtilityService/model/Position.js", - "moduleName": "./src/Formats/XLS/LocationUtilityService/model/Position.js", - "type": "harmony import", - "userRequest": "../../../../Utils/LoggerByDefault", - "loc": "1:0-55" - }, - { - "moduleId": 71, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService/model/Preference.js", - "module": "./src/Formats/XLS/LocationUtilityService/model/Preference.js", - "moduleName": "./src/Formats/XLS/LocationUtilityService/model/Preference.js", - "type": "harmony import", - "userRequest": "../../../../Utils/LoggerByDefault", - "loc": "1:0-55" - }, - { - "moduleId": 78, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/ReverseGeocode.js", - "module": "./src/Services/Geocode/ReverseGeocode.js", - "moduleName": "./src/Services/Geocode/ReverseGeocode.js", - "type": "harmony import", - "userRequest": "../../Utils/LoggerByDefault", - "loc": "2:0-49" - }, - { - "moduleId": 79, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/ReverseGeocodeRequestFactory.js", - "module": "./src/Services/Geocode/Request/ReverseGeocodeRequestFactory.js", - "moduleName": "./src/Services/Geocode/Request/ReverseGeocodeRequestFactory.js", - "type": "harmony import", - "userRequest": "../../../Utils/LoggerByDefault", - "loc": "9:0-52" - }, - { - "moduleId": 82, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoComplete/AutoComplete.js", - "module": "./src/Services/AutoComplete/AutoComplete.js", - "moduleName": "./src/Services/AutoComplete/AutoComplete.js", - "type": "harmony import", - "userRequest": "../../Utils/LoggerByDefault", - "loc": "3:0-49" - }, - { - "moduleId": 83, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoComplete/Response/AutoCompleteResponseFactory.js", - "module": "./src/Services/AutoComplete/Response/AutoCompleteResponseFactory.js", - "moduleName": "./src/Services/AutoComplete/Response/AutoCompleteResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Utils/LoggerByDefault", - "loc": "9:0-52" - }, - { - "moduleId": 84, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Route.js", - "module": "./src/Services/Route/Route.js", - "moduleName": "./src/Services/Route/Route.js", - "type": "harmony import", - "userRequest": "../../Utils/LoggerByDefault", - "loc": "2:0-49" - }, - { - "moduleId": 85, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Request/RouteRequestFactory.js", - "module": "./src/Services/Route/Request/RouteRequestFactory.js", - "moduleName": "./src/Services/Route/Request/RouteRequestFactory.js", - "type": "harmony import", - "userRequest": "../../../Utils/LoggerByDefault", - "loc": "9:0-52" - }, - { - "moduleId": 86, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Request/RouteRequestOLS.js", - "module": "./src/Services/Route/Request/RouteRequestOLS.js", - "moduleName": "./src/Services/Route/Request/RouteRequestOLS.js", - "type": "harmony import", - "userRequest": "../../../Utils/LoggerByDefault", - "loc": "9:0-52" - }, - { - "moduleId": 87, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/RouteService.js", - "module": "./src/Formats/XLS/RouteService.js", - "moduleName": "./src/Formats/XLS/RouteService.js", - "type": "harmony import", - "userRequest": "../../Utils/LoggerByDefault", - "loc": "1:0-49" - }, - { - "moduleId": 88, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/RouteService/DetermineRouteRequest.js", - "module": "./src/Formats/XLS/RouteService/DetermineRouteRequest.js", - "moduleName": "./src/Formats/XLS/RouteService/DetermineRouteRequest.js", - "type": "harmony import", - "userRequest": "../../../Utils/LoggerByDefault", - "loc": "1:0-52" - }, - { - "moduleId": 89, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/RouteService/model/RoutePlan.js", - "module": "./src/Formats/XLS/RouteService/model/RoutePlan.js", - "moduleName": "./src/Formats/XLS/RouteService/model/RoutePlan.js", - "type": "harmony import", - "userRequest": "../../../../Utils/LoggerByDefault", - "loc": "1:0-55" - }, - { - "moduleId": 91, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Request/RouteRequestREST.js", - "module": "./src/Services/Route/Request/RouteRequestREST.js", - "moduleName": "./src/Services/Route/Request/RouteRequestREST.js", - "type": "harmony import", - "userRequest": "../../../Utils/LoggerByDefault", - "loc": "2:0-52" - }, - { - "moduleId": 92, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Request/model/RouteParamREST.js", - "module": "./src/Services/Route/Request/model/RouteParamREST.js", - "moduleName": "./src/Services/Route/Request/model/RouteParamREST.js", - "type": "harmony import", - "userRequest": "../../../../Utils/LoggerByDefault", - "loc": "2:0-55" - }, - { - "moduleId": 93, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Response/RouteResponseFactory.js", - "module": "./src/Services/Route/Response/RouteResponseFactory.js", - "moduleName": "./src/Services/Route/Response/RouteResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Utils/LoggerByDefault", - "loc": "9:0-52" - }, - { - "moduleId": 95, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Formats/RouteResponseOLSReader.js", - "module": "./src/Services/Route/Formats/RouteResponseOLSReader.js", - "moduleName": "./src/Services/Route/Formats/RouteResponseOLSReader.js", - "type": "harmony import", - "userRequest": "../../../Utils/LoggerByDefault", - "loc": "10:0-52" - }, - { - "moduleId": 96, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "module": "./src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "moduleName": "./src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "type": "harmony import", - "userRequest": "../../Utils/LoggerByDefault", - "loc": "2:0-49" - }, - { - "moduleId": 97, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Request/ProcessIsoCurveRequest.js", - "module": "./src/Services/ProcessIsoCurve/Request/ProcessIsoCurveRequest.js", - "moduleName": "./src/Services/ProcessIsoCurve/Request/ProcessIsoCurveRequest.js", - "type": "harmony import", - "userRequest": "../../../Utils/LoggerByDefault", - "loc": "2:0-52" - }, - { - "moduleId": 98, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Request/model/ProcessIsoCurveParam.js", - "module": "./src/Services/ProcessIsoCurve/Request/model/ProcessIsoCurveParam.js", - "moduleName": "./src/Services/ProcessIsoCurve/Request/model/ProcessIsoCurveParam.js", - "type": "harmony import", - "userRequest": "../../../../Utils/LoggerByDefault", - "loc": "2:0-55" - }, - { - "moduleId": 99, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "module": "./src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "moduleName": "./src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Utils/LoggerByDefault", - "loc": "9:0-52" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 3, - "source": "/* global __PRODUCTION__ */\nimport * as Log from \"loglevel\";\n\nvar LoggerByDefault = {\n /**\n * logger statique\n *\n * @static\n * @param {String} name - nom du logger\n * @returns {Object} retourne un logger\n */\n getLogger : function (name) {\n // Substitute global constants configured at compile time\n // cf. webpack.config.js\n (__PRODUCTION__) ? Log.disableAll() : Log.enableAll();\n var logname = name || \"default\";\n return Log.getLogger(logname);\n }\n};\n\nexport default LoggerByDefault;\n" - }, - { - "id": 1, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Utils/MessagesResources.js", - "name": "./src/Utils/MessagesResources.js", - "index": 6, - "index2": 2, - "size": 3078, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Alti.js", - "issuerId": 46, - "issuerName": "./src/Services/Alti/Alti.js", - "profile": { - "factory": 362, - "building": 27 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 3, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/CommonService.js", - "module": "./src/Services/CommonService.js", - "moduleName": "./src/Services/CommonService.js", - "type": "harmony import", - "userRequest": "../Utils/MessagesResources", - "loc": "3:0-43" - }, - { - "moduleId": 46, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Alti.js", - "module": "./src/Services/Alti/Alti.js", - "moduleName": "./src/Services/Alti/Alti.js", - "type": "harmony import", - "userRequest": "../../Utils/MessagesResources", - "loc": "3:0-46" - }, - { - "moduleId": 55, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestREST.js", - "module": "./src/Services/Alti/Request/AltiRequestREST.js", - "moduleName": "./src/Services/Alti/Request/AltiRequestREST.js", - "type": "harmony import", - "userRequest": "../../../Utils/MessagesResources", - "loc": "4:0-49" - }, - { - "moduleId": 56, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestWPS.js", - "module": "./src/Services/Alti/Request/AltiRequestWPS.js", - "moduleName": "./src/Services/Alti/Request/AltiRequestWPS.js", - "type": "harmony import", - "userRequest": "../../../Utils/MessagesResources", - "loc": "10:0-49" - }, - { - "moduleId": 58, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Response/AltiResponseFactory.js", - "module": "./src/Services/Alti/Response/AltiResponseFactory.js", - "moduleName": "./src/Services/Alti/Response/AltiResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Utils/MessagesResources", - "loc": "10:0-52" - }, - { - "moduleId": 60, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/AutoConf.js", - "module": "./src/Services/AutoConf/AutoConf.js", - "moduleName": "./src/Services/AutoConf/AutoConf.js", - "type": "harmony import", - "userRequest": "../../Utils/MessagesResources", - "loc": "3:0-46" - }, - { - "moduleId": 61, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Response/AutoConfResponseFactory.js", - "module": "./src/Services/AutoConf/Response/AutoConfResponseFactory.js", - "moduleName": "./src/Services/AutoConf/Response/AutoConfResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Utils/MessagesResources", - "loc": "10:0-52" - }, - { - "moduleId": 63, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Geocode.js", - "module": "./src/Services/Geocode/Geocode.js", - "moduleName": "./src/Services/Geocode/Geocode.js", - "type": "harmony import", - "userRequest": "../../Utils/MessagesResources", - "loc": "3:0-46" - }, - { - "moduleId": 76, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Response/DirectGeocodeResponseFactory.js", - "module": "./src/Services/Geocode/Response/DirectGeocodeResponseFactory.js", - "moduleName": "./src/Services/Geocode/Response/DirectGeocodeResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Utils/MessagesResources", - "loc": "13:0-52" - }, - { - "moduleId": 77, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Formats/DirectGeocodeResponseReader.js", - "module": "./src/Services/Geocode/Formats/DirectGeocodeResponseReader.js", - "moduleName": "./src/Services/Geocode/Formats/DirectGeocodeResponseReader.js", - "type": "harmony import", - "userRequest": "../../../Utils/MessagesResources", - "loc": "12:0-50" - }, - { - "moduleId": 78, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/ReverseGeocode.js", - "module": "./src/Services/Geocode/ReverseGeocode.js", - "moduleName": "./src/Services/Geocode/ReverseGeocode.js", - "type": "harmony import", - "userRequest": "../../Utils/MessagesResources", - "loc": "3:0-46" - }, - { - "moduleId": 80, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Response/ReverseGeocodeResponseFactory.js", - "module": "./src/Services/Geocode/Response/ReverseGeocodeResponseFactory.js", - "moduleName": "./src/Services/Geocode/Response/ReverseGeocodeResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Utils/MessagesResources", - "loc": "12:0-52" - }, - { - "moduleId": 81, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Formats/ReverseGeocodeResponseReader.js", - "module": "./src/Services/Geocode/Formats/ReverseGeocodeResponseReader.js", - "moduleName": "./src/Services/Geocode/Formats/ReverseGeocodeResponseReader.js", - "type": "harmony import", - "userRequest": "../../../Utils/MessagesResources", - "loc": "12:0-50" - }, - { - "moduleId": 82, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoComplete/AutoComplete.js", - "module": "./src/Services/AutoComplete/AutoComplete.js", - "moduleName": "./src/Services/AutoComplete/AutoComplete.js", - "type": "harmony import", - "userRequest": "../../Utils/MessagesResources", - "loc": "4:0-47" - }, - { - "moduleId": 83, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoComplete/Response/AutoCompleteResponseFactory.js", - "module": "./src/Services/AutoComplete/Response/AutoCompleteResponseFactory.js", - "moduleName": "./src/Services/AutoComplete/Response/AutoCompleteResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Utils/MessagesResources", - "loc": "10:0-52" - }, - { - "moduleId": 84, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Route.js", - "module": "./src/Services/Route/Route.js", - "moduleName": "./src/Services/Route/Route.js", - "type": "harmony import", - "userRequest": "../../Utils/MessagesResources", - "loc": "3:0-46" - }, - { - "moduleId": 91, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Request/RouteRequestREST.js", - "module": "./src/Services/Route/Request/RouteRequestREST.js", - "moduleName": "./src/Services/Route/Request/RouteRequestREST.js", - "type": "harmony import", - "userRequest": "../../../Utils/MessagesResources", - "loc": "3:0-49" - }, - { - "moduleId": 93, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Response/RouteResponseFactory.js", - "module": "./src/Services/Route/Response/RouteResponseFactory.js", - "moduleName": "./src/Services/Route/Response/RouteResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Utils/MessagesResources", - "loc": "10:0-52" - }, - { - "moduleId": 94, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Formats/RouteResponseRESTReader.js", - "module": "./src/Services/Route/Formats/RouteResponseRESTReader.js", - "moduleName": "./src/Services/Route/Formats/RouteResponseRESTReader.js", - "type": "harmony import", - "userRequest": "../../../Utils/MessagesResources", - "loc": "11:0-65" - }, - { - "moduleId": 96, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "module": "./src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "moduleName": "./src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "type": "harmony import", - "userRequest": "../../Utils/MessagesResources", - "loc": "3:0-46" - }, - { - "moduleId": 97, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Request/ProcessIsoCurveRequest.js", - "module": "./src/Services/ProcessIsoCurve/Request/ProcessIsoCurveRequest.js", - "moduleName": "./src/Services/ProcessIsoCurve/Request/ProcessIsoCurveRequest.js", - "type": "harmony import", - "userRequest": "../../../Utils/MessagesResources", - "loc": "3:0-49" - }, - { - "moduleId": 99, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "module": "./src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "moduleName": "./src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Utils/MessagesResources", - "loc": "10:0-52" - }, - { - "moduleId": 100, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Formats/ProcessIsoCurveResponseReader.js", - "module": "./src/Services/ProcessIsoCurve/Formats/ProcessIsoCurveResponseReader.js", - "moduleName": "./src/Services/ProcessIsoCurve/Formats/ProcessIsoCurveResponseReader.js", - "type": "harmony import", - "userRequest": "../../../Utils/MessagesResources", - "loc": "10:0-65" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 4, - "source": "/**\n * Classe de gestion des erreurs qui permer d'associer un message d'erreur à l'exception lancée.\n *\n * @example\n * MessagesResources.getMessage(\"ERROR_PARAM_MISSING\", \"x\", \"y\", \"z\")));\n * // --> output : Parameter(s) 'x - y - z' missing\n *\n * @module MessagesResources\n * @alias Gp.Utils.MessagesResources\n * @private\n */\nvar MessagesResources = {\n\n // Paramètres\n PARAM_MISSING : \"Parameter(s) '%var%' missing\",\n PARAM_EMPTY : \"Parameter(s) '%var%' empty\",\n PARAM_TYPE : \"Wrong type(s) for parameter(s) '%var%'\",\n PARAM_FORMAT : \"Parameter(s) '%var%' not correctly formatted\",\n PARAM_NOT_SUPPORT : \"Value(s) for parameter(s) '%var%' not supported\",\n PARAM_NOT_SUPPORT_NODEJS : \"Value(s) for parameter(s) '%var%' not supported to NodeJS\",\n PARAM_UNKNOWN : \"Value(s) for parameter(s) '%var%' unknown\",\n\n // Services\n // Requête\n SERVICE_REQUEST_BUILD : \"An error occurred during the request building of the service\",\n SERVICE_REQUEST_EMPTY : \"The request sent to the service is empty\",\n\n // Réponse\n SERVICE_RESPONSE_EXCEPTION : \"The service returned an exception : '%var%'\",\n SERVICE_RESPONSE_EXCEPTION_2 : \"The service returned an exception\",\n SERVICE_RESPONSE_ANALYSE : \"An error occurred while parsing the response '%var%' of the service\",\n SERVICE_RESPONSE_ANALYSE_2 : \"An unknown error occurred while parsing the response\",\n SERVICE_RESPONSE_EMPTY : \"The response of the service is empty\",\n SERVICE_RESPONSE_EMPTY_2 : \"The response from the service could not be analyzed or is empty\",\n SERVICE_RESPONSE_FORMAT : \"The format of the service response is not supported (handled format(s) : '%var%')\",\n SERVICE_RESPONSE_FORMAT_2 : \"The format of the service response is not supported\",\n SERVICE_RESPONSE_FORMAT_3 : \"No suggestion matching the search\",\n\n // Classes\n CLASS_CONSTRUCTOR : \"'%var%' constructor cannot be called as a function.\",\n\n /**\n * Fonction qui va retourner le message d'erreur associé à la clé donnée\n *\n * @method getMessage\n * @param {String} clef - Clef de l'erreur (ex : ERROR_PARAM)\n * @param {String[]} parametres - Paramètres/variables concernés par le message d'erreur associé à la clef donnée\n * @return {String} message - String contenant le message de l'exception\n */\n getMessage : function (clef, parametres) {\n // param de la fonction uniquement pour la documentation...\n\n if (Object.keys(arguments).length === 0) {\n return \"Message indefined !\";\n }\n\n var params = Array.prototype.slice.call(arguments);\n var key = params.shift();\n var args = params;\n\n var message = this[key];\n\n try {\n if (Array.isArray(args) && args.length > 0) {\n message = message.replace(\"%var%\", args.join(\" - \"));\n } else {\n message = message.replace(\"%var%\", \"%var% (not specified)\");\n }\n } catch (e) {\n // error de string.replace()\n\n }\n\n return message;\n }\n};\n\nexport default MessagesResources;\n" - }, - { - "id": 2, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Exceptions/ErrorService.js", - "name": "./src/Exceptions/ErrorService.js", - "index": 7, - "index2": 3, - "size": 2320, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 55, - "building": 256 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 3, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/CommonService.js", - "module": "./src/Services/CommonService.js", - "moduleName": "./src/Services/CommonService.js", - "type": "harmony import", - "userRequest": "../Exceptions/ErrorService", - "loc": "5:0-54" - }, - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Exceptions/ErrorService", - "loc": "29:0-46" - }, - { - "moduleId": 46, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Alti.js", - "module": "./src/Services/Alti/Alti.js", - "moduleName": "./src/Services/Alti/Alti.js", - "type": "harmony import", - "userRequest": "../../Exceptions/ErrorService", - "loc": "4:0-57" - }, - { - "moduleId": 54, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestFactory.js", - "module": "./src/Services/Alti/Request/AltiRequestFactory.js", - "moduleName": "./src/Services/Alti/Request/AltiRequestFactory.js", - "type": "harmony import", - "userRequest": "../../../Exceptions/ErrorService", - "loc": "10:0-60" - }, - { - "moduleId": 58, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Response/AltiResponseFactory.js", - "module": "./src/Services/Alti/Response/AltiResponseFactory.js", - "moduleName": "./src/Services/Alti/Response/AltiResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Exceptions/ErrorService", - "loc": "11:0-60" - }, - { - "moduleId": 60, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/AutoConf.js", - "module": "./src/Services/AutoConf/AutoConf.js", - "moduleName": "./src/Services/AutoConf/AutoConf.js", - "type": "harmony import", - "userRequest": "../../Exceptions/ErrorService", - "loc": "5:0-57" - }, - { - "moduleId": 61, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Response/AutoConfResponseFactory.js", - "module": "./src/Services/AutoConf/Response/AutoConfResponseFactory.js", - "moduleName": "./src/Services/AutoConf/Response/AutoConfResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Exceptions/ErrorService", - "loc": "11:0-60" - }, - { - "moduleId": 63, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Geocode.js", - "module": "./src/Services/Geocode/Geocode.js", - "moduleName": "./src/Services/Geocode/Geocode.js", - "type": "harmony import", - "userRequest": "../../Exceptions/ErrorService", - "loc": "4:0-57" - }, - { - "moduleId": 76, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Response/DirectGeocodeResponseFactory.js", - "module": "./src/Services/Geocode/Response/DirectGeocodeResponseFactory.js", - "moduleName": "./src/Services/Geocode/Response/DirectGeocodeResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Exceptions/ErrorService", - "loc": "12:0-60" - }, - { - "moduleId": 77, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Formats/DirectGeocodeResponseReader.js", - "module": "./src/Services/Geocode/Formats/DirectGeocodeResponseReader.js", - "moduleName": "./src/Services/Geocode/Formats/DirectGeocodeResponseReader.js", - "type": "harmony import", - "userRequest": "../../../Exceptions/ErrorService", - "loc": "13:0-54" - }, - { - "moduleId": 78, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/ReverseGeocode.js", - "module": "./src/Services/Geocode/ReverseGeocode.js", - "moduleName": "./src/Services/Geocode/ReverseGeocode.js", - "type": "harmony import", - "userRequest": "../../Exceptions/ErrorService", - "loc": "4:0-57" - }, - { - "moduleId": 80, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Response/ReverseGeocodeResponseFactory.js", - "module": "./src/Services/Geocode/Response/ReverseGeocodeResponseFactory.js", - "moduleName": "./src/Services/Geocode/Response/ReverseGeocodeResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Exceptions/ErrorService", - "loc": "13:0-60" - }, - { - "moduleId": 81, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Formats/ReverseGeocodeResponseReader.js", - "module": "./src/Services/Geocode/Formats/ReverseGeocodeResponseReader.js", - "moduleName": "./src/Services/Geocode/Formats/ReverseGeocodeResponseReader.js", - "type": "harmony import", - "userRequest": "../../../Exceptions/ErrorService", - "loc": "13:0-54" - }, - { - "moduleId": 82, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoComplete/AutoComplete.js", - "module": "./src/Services/AutoComplete/AutoComplete.js", - "moduleName": "./src/Services/AutoComplete/AutoComplete.js", - "type": "harmony import", - "userRequest": "../../Exceptions/ErrorService", - "loc": "6:0-57" - }, - { - "moduleId": 83, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoComplete/Response/AutoCompleteResponseFactory.js", - "module": "./src/Services/AutoComplete/Response/AutoCompleteResponseFactory.js", - "moduleName": "./src/Services/AutoComplete/Response/AutoCompleteResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Exceptions/ErrorService", - "loc": "11:0-60" - }, - { - "moduleId": 84, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Route.js", - "module": "./src/Services/Route/Route.js", - "moduleName": "./src/Services/Route/Route.js", - "type": "harmony import", - "userRequest": "../../Exceptions/ErrorService", - "loc": "4:0-57" - }, - { - "moduleId": 85, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Request/RouteRequestFactory.js", - "module": "./src/Services/Route/Request/RouteRequestFactory.js", - "moduleName": "./src/Services/Route/Request/RouteRequestFactory.js", - "type": "harmony import", - "userRequest": "../../../Exceptions/ErrorService", - "loc": "10:0-60" - }, - { - "moduleId": 93, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Response/RouteResponseFactory.js", - "module": "./src/Services/Route/Response/RouteResponseFactory.js", - "moduleName": "./src/Services/Route/Response/RouteResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Exceptions/ErrorService", - "loc": "11:0-60" - }, - { - "moduleId": 94, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Formats/RouteResponseRESTReader.js", - "module": "./src/Services/Route/Formats/RouteResponseRESTReader.js", - "moduleName": "./src/Services/Route/Formats/RouteResponseRESTReader.js", - "type": "harmony import", - "userRequest": "../../../Exceptions/ErrorService", - "loc": "13:0-54" - }, - { - "moduleId": 96, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "module": "./src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "moduleName": "./src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "type": "harmony import", - "userRequest": "../../Exceptions/ErrorService", - "loc": "4:0-57" - }, - { - "moduleId": 99, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "module": "./src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "moduleName": "./src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Exceptions/ErrorService", - "loc": "11:0-60" - }, - { - "moduleId": 100, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Formats/ProcessIsoCurveResponseReader.js", - "module": "./src/Services/ProcessIsoCurve/Formats/ProcessIsoCurveResponseReader.js", - "moduleName": "./src/Services/ProcessIsoCurve/Formats/ProcessIsoCurveResponseReader.js", - "type": "harmony import", - "userRequest": "../../../Exceptions/ErrorService", - "loc": "12:0-54" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "/**\n * Errors raised by API for one among three reasons : wrong API usage, underlying service error or unknown reason.\n *\n * @property {String} message - Error message\n * @property {Number} status - Error status : when {@link Gp.Error.TYPE_SRVERR}, gives the [HTTP status of the underlying web service response]{@link https://en.wikipedia.org/wiki/List_of_HTTP_status_codes} ; -1 otherwise.\n * @property {String} type - Error type ({@link Gp.Error.TYPE_SRVERR}, {@link Gp.Error.TYPE_USEERR} or {@link Gp.Error.TYPE_UNKERR}).\n *\n * @namespace\n * @alias Gp.Error\n * @param {Object|String} error - Options for creating error object. Can be a String (message) or an Object.\n * @param {String} error.message - Error message to return to user.\n * @param {enum} [error.type=TYPE_UNKERR] - Error type\n * @param {status} [error.status=-1] - Error status : when {@link Gp.Error.TYPE_SRVERR}, gives the [HTTP status of the underlying web service response]{@link https://en.wikipedia.org/wiki/List_of_HTTP_status_codes}.\n *\n */\nfunction ErrorService (error) {\n if (!(this instanceof ErrorService)) {\n throw new TypeError(\"ErrorService constructor cannot be called as a function.\");\n }\n\n var e = error;\n if (typeof error === \"string\" || error instanceof String) {\n this.message = error;\n this.status = -1;\n this.type = ErrorService.TYPE_UNKERR;\n } else {\n this.message = e.message || \"undefined!?\";\n this.type = e.type;\n this.status = e.status || -1;\n }\n\n this.name = \"ErrorService\";\n this.stack = (new Error()).stack;\n}\n\n/**\n * Error raised when underlying geoportal service answers on error.\n *\n * @type {String}\n * @constant\n * @static\n */\nErrorService.TYPE_SRVERR = \"SERVICE_ERROR\";\n/**\n * Error raised when funcion use is inappropriate\n *\n * @type {String}\n * @constant\n * @static\n */\nErrorService.TYPE_USEERR = \"USAGE_ERROR\";\n/**\n * Error raised when API can't perform the job for a reason other than the two other ones.\n *\n * @type {String}\n * @constant\n * @static\n */\nErrorService.TYPE_UNKERR = \"UNKNOWN_ERROR\";\n\n/**\n * @lends module:ErrorService\n */\nErrorService.prototype = Object.create(Error.prototype, {\n constructor : {\n value : ErrorService,\n writable : true,\n configurable : true\n }\n});\n\nexport default ErrorService;\n" - }, - { - "id": 3, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/CommonService.js", - "name": "./src/Services/CommonService.js", - "index": 8, - "index2": 14, - "size": 20725, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Alti.js", - "issuerId": 46, - "issuerName": "./src/Services/Alti/Alti.js", - "profile": { - "factory": 363, - "building": 94, - "dependencies": 2 - }, - "failed": false, - "errors": 0, - "warnings": 1, - "reasons": [ - { - "moduleId": 46, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Alti.js", - "module": "./src/Services/Alti/Alti.js", - "moduleName": "./src/Services/Alti/Alti.js", - "type": "harmony import", - "userRequest": "../CommonService", - "loc": "5:0-45" - }, - { - "moduleId": 60, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/AutoConf.js", - "module": "./src/Services/AutoConf/AutoConf.js", - "moduleName": "./src/Services/AutoConf/AutoConf.js", - "type": "harmony import", - "userRequest": "../CommonService", - "loc": "7:0-45" - }, - { - "moduleId": 63, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Geocode.js", - "module": "./src/Services/Geocode/Geocode.js", - "moduleName": "./src/Services/Geocode/Geocode.js", - "type": "harmony import", - "userRequest": "../CommonService", - "loc": "5:0-45" - }, - { - "moduleId": 78, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/ReverseGeocode.js", - "module": "./src/Services/Geocode/ReverseGeocode.js", - "moduleName": "./src/Services/Geocode/ReverseGeocode.js", - "type": "harmony import", - "userRequest": "../CommonService", - "loc": "5:0-45" - }, - { - "moduleId": 82, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoComplete/AutoComplete.js", - "module": "./src/Services/AutoComplete/AutoComplete.js", - "moduleName": "./src/Services/AutoComplete/AutoComplete.js", - "type": "harmony import", - "userRequest": "../CommonService", - "loc": "1:0-45" - }, - { - "moduleId": 84, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Route.js", - "module": "./src/Services/Route/Route.js", - "moduleName": "./src/Services/Route/Route.js", - "type": "harmony import", - "userRequest": "../CommonService", - "loc": "5:0-45" - }, - { - "moduleId": 96, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "module": "./src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "moduleName": "./src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "type": "harmony import", - "userRequest": "../CommonService", - "loc": "5:0-45" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 4, - "source": "import Logger from \"../Utils/LoggerByDefault\";\nimport Helper from \"../Utils/Helper\";\nimport _ from \"../Utils/MessagesResources\";\nimport Protocol from \"../Protocols/Protocol\";\nimport ErrorService from \"../Exceptions/ErrorService\";\nimport DefaultUrlService from \"./DefaultUrlService\";\n\n/**\n * @classdesc\n * Composant Service\n *\n * @constructor\n * @alias Gp.Services.CommonService\n * @param {Object} options - options communes à tous les services\n *\n * @param {String} options.apiKey - Clef d'accès à la plateforme Géoportail,\n * nécessaire pour franchir la couche de contrôle des accès pour avoir une réponse du service invoqué.\n * Plusieurs clefs peuvent être passées dans le cas de l'invocation du service d'autoconfiguration.\n * Si ce paramètre n'est pas renseigné, alors le paramètre serverUrl doit être renseigné (comprenant alors, si nécessaire la clef API).\n *\n * @param {String} options.serverUrl - URL d'accès au service.\n * Permet de forcer l'utilisation d'un service équivalent déployé derrière une éventuelle autre URL d'accès.\n * Si ce paramètre est renseigné alors, le paramètre apiKey est ignoré.\n *\n * @param {String} [options.protocol] - Le protocole à utiliser pour récupérer les informations du service :\n * peut valoir 'JSONP' ou 'XHR'.\n * Par défaut, c'est le protocole XHR qui sera utilisé.\n * Attention, le protocole JSONP n'est pas valide dans un environnement NodeJS (Utilisation du mode XHR).\n *\n * @param {Boolean} [options.ssl] - Indique si l'on souhaite intérroger les services en https.\n * Ce paramètre ne fonctionne que pour une utilisation hors navigateur (ex. NodeJS).\n * Sur un navigateur, le protocole est automatiquement extrait de l'url du site...\n * Par défaut, on utilise le protocole http (ssl=false).\n *\n * @param {String} [options.proxyURL] - Le proxy à utiliser pour pallier au problème de cross-domain dans le cas d'une requête XHR.\n * Utile si le paramètre 'protocol' vaut 'XHR', il ne sera pas pris en compte si protocol vaut JSONP.\n *\n * @param {String} [options.callbackSuffix] - Suffixe de la fonction de callback à utiliser, dans le cas du protocole JSONP.\n * Par défaut, la fonction de callback portera un nom du type \"callback\"+ID, où ID est soit un identifiant unique généré à chaque requête,\n * soit le paramètre callbackSuffix s'il est spécifié. Par exemple, si callbackSuffix=\"_2\", la fonction sera \"callback_2 ()\".\n * Utile pour utiliser une réponse déjà encapsulée dans une fonction de callback, dont le nom est connu (ex : chargement de l'autoconfiguration en local)\n * Utile seulement si le paramètre 'protocol' vaut 'JSONP', il ne sera pas pris en compte si protocol vaut 'XHR'.\n *\n * @param {String} [options.httpMethod] - La méthode HTTP\n * à utiliser dans le cas d'une requête XHR : peut valoir 'GET' ou 'POST'.\n * Non pris en compte si 'protocol' vaut JSONP qui fonctionne obligatoirement en GET.\n * Par défaut, c'est la méthode GET qui est utilisée.\n *\n * @param {String} [options.contentType] - Content-Type de la requete\n * à utiliser dans le cas d'une requête XHR en mode POST.\n * Non pris en compte si 'protocol' vaut JSONP et/ou la méthode HTTP vaut GET.\n * Par défaut, c'est la méthode GET qui est utilisée donc on n'utilise pas de Content-Type.\n *\n * @param {Number} [options.timeOut] - Délai d'attente maximal (en ms) de la réponse du service (à partir de l'envoi de la requête).\n * Par défaut, aucun timeOut n'est pris en compte (timeoutDelay= 0).\n *\n * @param {Boolean} [options.rawResponse] - Indique si l'on souhaite que la réponse du service ne soit pas parsée par l'API avant d'être restituée.\n * (Cf. paramètre « onSuccess » pour plus de détails).\n *\n * @param {Function} [options.onSuccess] - Fonction appelée lorsque le service répond correctement à la requête\n * (code HTTP 200, sans message d'erreur).\n * Cette fonction prend en paramètre la réponse du service,\n * soit sous la forme d'un Object Javascript formaté par le parseur dédié à la syntaxe du service (comportement par défaut) ;\n * soit brute au format String non prétraité si le paramètre « rawResponse » a été précisé avec la valeur « true ».\n *\n * @param {Function} [options.onFailure] - Fonction appelée lorsque le service ne répond pas correctement\n * (code HTTP de retour différent de 200 ou pas de réponse).\n *\n * @param {Function} [options.onBeforeParse] - Fonction appelée avant le parsing de la réponse\n * Permet de modifier la réponse avant parsing et la fonction doit retourner une String.\n * Cette fonction prend en paramètre la réponse telle que renvoyée par le service\n * (cad au format json ou xml).\n * Pour le JSONP, si le paramètre \"rawResponse\" a été précisé avec la valeur \"true\",\n * la fonction prend en paramètre un Object JavaScript contenant la réponse XML.\n *\n * @example\n * var options = {\n * apiKey : null,\n * serverUrl : 'http://localhost/service/',\n * protocol : 'JSONP', // JSONP|XHR\n * ssl : false,\n * proxyURL : null,\n * callbackName : null,\n * httpMethod : 'GET', // GET|POST\n * timeOut : 10000, // ms\n * rawResponse : false, // true|false\n * scope : null, // this\n * onSuccess : function (response) {},\n * onFailure : function (error) {},\n * onBeforeParse : function (rawResponse) {}\n * };\n * @private\n */\nfunction CommonService (options) {\n if (!(this instanceof CommonService)) {\n throw new TypeError(_.getMessage(\"CLASS_CONSTRUCTOR\"));\n }\n\n this.logger = Logger.getLogger(\"CommonService\");\n this.logger.trace(\"[Constructeur CommonService (options)]\");\n\n // #####################\n // récupération des options par défaut pour les paramètres optionnels\n // #####################\n\n /**\n * Options du service\n * @type {Object}\n */\n this.options = {\n // protocol : \"JSONP\",\n protocol : \"XHR\",\n ssl : false,\n proxyURL : \"\",\n // callbackName : \"\",\n callbackSuffix : null,\n httpMethod : \"GET\",\n timeOut : 0,\n rawResponse : false,\n scope : this,\n /**\n * callback par defaut pour la reponse\n * @param {Object} response - response\n * @private\n */\n onSuccess : function (response) {\n console.log(\"onSuccess - la reponse est la suivante : \", response);\n },\n /**\n * callback par defaut pour les erreurs\n * @param {Object} error - error\n * @private\n */\n onFailure : function (error) {\n if (error.status === 200 || !error.status) {\n console.log(\"onFailure : \", error.message);\n } else {\n console.log(\"onFailure - Erreur (\", error.status, \") : \", error.message);\n }\n }\n };\n\n // et on ajoute les options en paramètre aux options par défaut\n for (var opt in options) {\n if (options.hasOwnProperty(opt)) {\n this.options[opt] = options[opt];\n }\n }\n\n // #####################\n // analyse des options\n // #####################\n\n // gestion des clefs API\n if (!this.options.apiKey && !this.options.serverUrl) {\n throw new Error(_.getMessage(\"PARAM_MISSING\", \"apiKey\", \"serverUrl\"));\n }\n\n // modification de la fonction de callback onSuccess dans le cas où la réponse brute est demandée\n if (this.options.rawResponse && !this.options.onSuccess) {\n /**\n * callback par defaut pour la reponse\n * @param {Object} response - response\n * @private\n */\n this.options.onSuccess = function (response) {\n console.log(\"onSuccess - la réponse brute du service est la suivante : \", response);\n };\n }\n\n // gestion du callback onSuccess\n var bOnSuccess = !!((this.options.onSuccess !== null && typeof this.options.onSuccess === \"function\"));\n if (!bOnSuccess) {\n throw new Error(_.getMessage(\"PARAM_MISSING\", \"onSuccess()\"));\n }\n\n // gestion de l'url du service par defaut\n if (!this.options.serverUrl) {\n // INFO\n // gestion de l'url du service par defaut pour les services qui ne possèdent qu'une seul url par defaut\n // les cas particuliers des services avec plusieurs urls (ex. Alti) devront être traité dans la classe du composant\n // donc si l'url n'est pas renseignée, il faut utiliser les urls par defaut\n DefaultUrlService.ssl = this.options.ssl;\n var urlByDefault = DefaultUrlService[this.CLASSNAME].url(this.options.apiKey);\n if (typeof urlByDefault === \"string\") {\n this.options.serverUrl = urlByDefault;\n } else {\n this.logger.trace(\"URL par defaut à determiner au niveau du composant...\");\n }\n }\n\n // FIXME nettoyage des KVP dans l'url du service\n // if (this.options.serverUrl) {\n // // INFO\n // // si l'url est renseignée, il faut la nettoyer de tous ses KVP\n // // ex. on ne veut pas de params. 'callback' ou 'output' car ceci declencherait\n // // des opérations d'encapsulations des reponses légèrement farfelues ...\n // var urlsource = this.options.serverUrl;\n // var urlparts = urlsource.split(\"?\");\n // this.options.serverUrl = urlparts[0];\n // }\n\n // gestion de la methode HTTP\n this.options.httpMethod = (typeof options.httpMethod === \"string\") ? options.httpMethod.toUpperCase() : \"GET\";\n\n switch (this.options.httpMethod) {\n case \"POST\":\n case \"GET\":\n break;\n case \"PUT\":\n case \"DELETE\":\n case \"HEAD\":\n case \"OPTIONS\":\n throw new Error(_.getMessage(\"PARAM_NOT_SUPPORT\", \"httpMethod\"));\n default:\n throw new Error(_.getMessage(\"PARAM_UNKNOWN\", \"httpMethod\"));\n }\n\n // gestion du protocole\n // this.options.protocol = (typeof options.protocol === \"string\" ) ? options.protocol.toUpperCase() : \"JSONP\";\n this.options.protocol = (typeof options.protocol === \"string\") ? options.protocol.toUpperCase() : \"XHR\";\n\n switch (this.options.protocol) {\n case \"JSONP\":\n case \"XHR\":\n break;\n default:\n throw new Error(_.getMessage(\"PARAM_UNKNOWN\", \"protocol\"));\n }\n\n // on determine l'environnement d'execution : browser ou non ?\n // et on lance une exception sur l'utilisation du protocole JSONP pour nodeJS...\n if (typeof window === \"undefined\" && this.options.protocol === \"JSONP\") {\n throw new Error(_.getMessage(\"PARAM_NOT_SUPPORT_NODEJS\", \"protocol=JSONP (instead use XHR)\"));\n }\n\n // le protocole JSONP ne fonctionne qu'en GET.\n if (this.options.protocol === \"JSONP\") {\n this.options.httpMethod = \"GET\";\n }\n\n // gestion du cache\n this.options.nocache = options.nocache || false;\n\n // #####################\n // attributs d'instances\n // #####################\n\n /**\n * Format de réponse du service\n */\n this.options.outputFormat = null;\n /**\n * Requête envoyée au service\n */\n this.request = null;\n /**\n * Reponse du service\n */\n this.response = null;\n}\n\n/**\n * @lends module:CommonService\n */\nCommonService.prototype = {\n\n /*\n * Constructeur (alias)\n */\n constructor : CommonService,\n\n /**\n * Appel du service Géoportail\n */\n call : function () {\n /* jshint validthis : true */\n this.logger.trace(\"CommonService::call ()\");\n\n var context = this;\n /** fonction d'execution */\n function run () {\n this.logger.trace(\"CommonService::run ()\");\n this.buildRequest.call(context, onError, onBuildRequest);\n }\n\n run.call(context);\n\n // callback de fin de construction de la requête\n function onBuildRequest (result) {\n this.logger.trace(\"CommonService::onBuildRequest : \", result);\n this.callService.call(context, onError, onCallService);\n }\n\n // callback de fin d'appel au service\n function onCallService (result) {\n this.logger.trace(\"CommonService::onCallService : \", result);\n this.analyzeResponse.call(context, onError, onAnalyzeResponse);\n }\n\n // callback de fin de lecture de la reponse\n function onAnalyzeResponse (result) {\n this.logger.trace(\"CommonService::onAnalyzeResponse : \", result);\n if (result) {\n this.options.onSuccess.call(this, result);\n } else {\n return onError.call(this, new ErrorService(\"Analyse de la reponse en échec !?\"));\n }\n }\n\n // callback de gestion des erreurs : renvoit un objet de type ErrorService\n function onError (error) {\n this.logger.trace(\"CommonService::onError()\");\n // error : l'objet est du type ErrorService ou Error\n var e = error;\n if (!(e instanceof ErrorService)) {\n e = new ErrorService(error.message);\n }\n this.options.onFailure.call(this, e);\n }\n },\n\n /**\n * Création de la requête\n * @param {Function} error - callback\n * @param {Function} success - callback\n */\n buildRequest : function (error, success) {\n // INFO\n this.logger.error(\"overwritten method !\");\n // retourne l'objet 'this.request'\n if (error) {\n error.call(this, \"This method must be overwritten !\");\n }\n success.call(this, \"This method must be overwritten !\");\n },\n\n /**\n * Appel du service\n * @param {Function} error - callback\n * @param {Function} success - callback\n */\n callService : function (error, success) {\n // INFO\n // retourne l'objet 'this.response'\n\n // NOTES\n // Pour le mode XHR, on recupère une reponse sous forme d'un json ou xml (#document).\n // Pour le mode JSONP, on a toujours un objet JSON mais sous 2 formes :\n // - natif\n // - XML encapsulé :\n // {http : {status:200, error:null},xml :'réponse du service'}\n // {http : {status:400, error:'reponse du service'},xml :null}\n // En XHR, la reponse est directement sauvegardée dans 'this.response'.\n // Par contre, en JSONP, on doit analyser la reponse (status ou non vide),\n // et ne renvoyer que le contenu (xml ou l'objet)\n\n // gestion de la proxification du service\n var strUrlProxified = null;\n var strData = this.request;\n\n // a t on mis en place un proxy ?\n // la proxyfication est valable uniquement en mode XHR !\n var bUrlProxified = !!((this.options.proxyURL && this.options.protocol === \"XHR\"));\n\n // rajout de l'option gpbibaccess\n // INFO : acces au numero de version de package.conf aprés compilation !\n this.options.serverUrl = Helper.normalyzeUrl(this.options.serverUrl, {\n \"gp-access-lib\" : \"__GPVERSION__\"\n }, false);\n\n // si le proxy est renseigné, on proxifie l'url du service\n if (bUrlProxified) {\n if (this.options.httpMethod === \"GET\") {\n strUrlProxified = this.options.proxyURL + Helper.normalyzeUrl(this.options.serverUrl, this.request, true);\n strData = null;\n }\n\n if (this.options.httpMethod === \"POST\") {\n strUrlProxified = this.options.proxyURL + Helper.normalyzeUrl(this.options.serverUrl, null, true);\n strData = this.request;\n }\n }\n\n // contexte du composant spécifique !\n var self = this;\n\n var options = {\n url : strUrlProxified || this.options.serverUrl,\n method : this.options.httpMethod,\n protocol : this.options.protocol,\n timeOut : this.options.timeOut || 0,\n format : this.options.outputFormat, // ceci declenche le parsing de la reponse du service, mais on souhaite toujours une reponse brute (string) !\n nocache : this.options.nocache || false, // ceci permet d'ajouter un timestamp dans la requête\n wrap : this.options.protocol !== \"XHR\", // ceci declenche l'encapsulation de la reponse XML du service dans du JSON, mais pas en mode XHR !\n callbackSuffix : this.options.callbackSuffix,\n // callbackName : this.options.callbackName || null,\n data : strData,\n headers : null, // TODO...\n content : this.options.contentType || \"application/xml\",\n scope : this.options.scope || this,\n // callback de reponse\n onResponse : function (response) {\n self.logger.trace(\"callService::onResponse()\");\n\n // le contenu de la reponse à renvoyer !\n var content = null;\n\n // XHR : on renvoie toujours la reponse brute du service (json ou xml)\n // au parser du composant...\n if (self.options.protocol === \"XHR\") {\n self.logger.trace(\"Response XHR\", response);\n content = response; // par defaut, la reponse du service !\n }\n\n // JSONP : on pre-analyse la reponse brute du service (encapsuler ou pas)\n // avant de l'envoyer au parser du composant...\n if (self.options.protocol === \"JSONP\") {\n self.logger.trace(\"Response JSON\", response);\n if (response) {\n if (response.http) {\n // reponse encapsulée :\n // ex. reponse du service en xml\n // > {http : {status:200, error:null},xml :'réponse du service'}\n if (response.http.status !== 200) {\n error.call(self, new ErrorService({\n status : response.http.status,\n message : response.http.error,\n type : ErrorService.TYPE_SRVERR\n }));\n return;\n } else {\n content = response.xml; // par defaut !\n if (self.options.rawResponse) {\n content = response;\n }\n }\n } else {\n // reponse non encapsulée :\n // ex. reponse du service en json ou xml\n content = response;\n }\n } else {\n error.call(self, new ErrorService(\"Le contenu de la reponse est vide !?\"));\n return;\n }\n }\n\n // si on souhaite parser la reponse du service\n if (typeof self.options.onBeforeParse === \"function\") {\n var newResponse = self.options.onBeforeParse(content);\n if (typeof newResponse === \"string\") {\n // la reponse parsée par l'utilisateur est retournée sous\n // forme de string !\n content = newResponse;\n }\n }\n // sauvegarde de la reponse dans l'objet parent (CommonService)\n self.response = content;\n // on renvoie la reponse...\n success.call(self, content);\n },\n // callback des erreurs\n onFailure : function (e) {\n self.logger.trace(\"callService::onFailure()\");\n // on est forcement sur une erreur levée par un service !\n e.type = ErrorService.TYPE_SRVERR;\n error.call(self, new ErrorService(e));\n },\n // callback de timeOut\n onTimeOut : function () {\n self.logger.trace(\"callService::onTimeOut()\");\n error.call(self, new ErrorService(\"TimeOut!\"));\n }\n };\n\n Protocol.send(options);\n },\n\n /**\n * Analyse de la réponse\n * @param {Function} error - callback\n * @param {Function} success - callback\n */\n analyzeResponse : function (error, success) {\n // INFO\n this.logger.error(\"overwritten method !\");\n // retourne l'objet spécifique au type de composant (json)\n if (error) {\n error.call(this, \"This method must be overwritten !\");\n }\n success.call(this, \"This method must be overwritten !\");\n }\n\n};\n\nexport default CommonService;\n" - }, - { - "id": 4, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Utils/Helper.js", - "name": "./src/Utils/Helper.js", - "index": 9, - "index2": 4, - "size": 2834, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 55, - "building": 278 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 3, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/CommonService.js", - "module": "./src/Services/CommonService.js", - "moduleName": "./src/Services/CommonService.js", - "type": "harmony import", - "userRequest": "../Utils/Helper", - "loc": "2:0-37" - }, - { - "moduleId": 19, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Protocols/XHR.js", - "module": "./src/Protocols/XHR.js", - "moduleName": "./src/Protocols/XHR.js", - "type": "harmony import", - "userRequest": "../Utils/Helper", - "loc": "4:0-37" - }, - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Utils/Helper", - "loc": "30:0-36" - }, - { - "moduleId": 48, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Protocols/Protocol.js", - "module": "./src/Protocols/Protocol.js", - "moduleName": "./src/Protocols/Protocol.js", - "type": "harmony import", - "userRequest": "../Utils/Helper", - "loc": "8:0-37" - }, - { - "moduleId": 60, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/AutoConf.js", - "module": "./src/Services/AutoConf/AutoConf.js", - "moduleName": "./src/Services/AutoConf/AutoConf.js", - "type": "harmony import", - "userRequest": "../../Utils/Helper", - "loc": "4:0-40" - }, - { - "moduleId": 82, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoComplete/AutoComplete.js", - "module": "./src/Services/AutoComplete/AutoComplete.js", - "moduleName": "./src/Services/AutoComplete/AutoComplete.js", - "type": "harmony import", - "userRequest": "../../Utils/Helper", - "loc": "5:0-40" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "/**\n * Classe utilitaire\n *\n * @module Helper\n * @private\n * @alias Gp.Utils.Helper\n */\nvar Helper = {\n\n /**\n * concatenation des parametres key/value dans les urls\n *\n * @method normalyzeParameters\n * @static\n * @param {Object} params - tableau de clef/valeur\n *\n * @example\n * Gp.Utils.Helper.normalyzeParameters ({\n * key1:value1,\n * key2:value2,\n * key3:value3\n * });\n * // out : \"key1=value1&key2=value2&key3=value3\"\n *\n * @returns {String} retourne les paramètres concaténés\n */\n normalyzeParameters : function (params) {\n var myParams = null;\n\n if (params) {\n var tabParams = [];\n for (var key in params) {\n if (params.hasOwnProperty(key)) {\n var value = params[key];\n if (!value) {\n value = \"\";\n }\n tabParams.push(key + \"=\" + value);\n }\n }\n\n myParams = tabParams.join(\"&\");\n }\n\n return myParams;\n },\n\n /**\n * Concaténation et encodage des urls.\n *\n * @method normalyzeUrl\n * @static\n * @param {String} url - url\n * @param {Object|String} params - tableau de clef/valeur ou string\n * @param {Boolean} encode - true|false, false par defaut\n *\n * @example\n * Gp.Utils.Helper.normalyzeUrl (url, {\n * key1:value1,\n * key2=:value2,\n * key3:value3\n * });\n * // out : \"url?key1=value1&key2=value2&key3=value3\"\n *\n * @returns {String} retourne une url normalisée\n */\n normalyzeUrl : function (url, params, encode) {\n var myUrl = url;\n\n if (url) {\n var k = url.indexOf(\"?\");\n if (k === -1) { // pas de ? et KVP\n myUrl += \"?\";\n }\n\n if (k !== -1 && k !== url.length - 1) { // KVP\n myUrl += \"&\";\n }\n }\n\n if (params) {\n if (typeof params === \"string\") {\n myUrl += params;\n } else {\n myUrl += this.normalyzeParameters(params);\n }\n }\n\n if (encode) {\n // FIXME bonne idée ?\n myUrl = encodeURIComponent(myUrl);\n }\n\n return myUrl;\n },\n\n /**\n * Indentation d'une chaine\n *\n * @param {Number} n - nombre de tabulation\n * @param {String} msg - chaine\n *\n * @example\n * Gp.Utils.Helper.indent (2, \"message à indenter\")\n * // out\n * // ........message à indenter\n *\n * @returns {String} retourne une chaine indentée\n */\n indent : function (n, msg) {\n var num = n || 0;\n return new Array(num + 1).join(\"\\t\") + msg;\n }\n};\n\nexport default Helper;\n" - }, - { - "id": 5, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/DefaultUrlService.js", - "name": "./src/Services/DefaultUrlService.js", - "index": 18, - "index2": 13, - "size": 8577, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 53, - "building": 62 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 3, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/CommonService.js", - "module": "./src/Services/CommonService.js", - "moduleName": "./src/Services/CommonService.js", - "type": "harmony import", - "userRequest": "./DefaultUrlService", - "loc": "6:0-52" - }, - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/DefaultUrlService", - "loc": "2:0-54" - }, - { - "moduleId": 46, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Alti.js", - "module": "./src/Services/Alti/Alti.js", - "moduleName": "./src/Services/Alti/Alti.js", - "type": "harmony import", - "userRequest": "../DefaultUrlService", - "loc": "6:0-53" - }, - { - "moduleId": 60, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/AutoConf.js", - "module": "./src/Services/AutoConf/AutoConf.js", - "moduleName": "./src/Services/AutoConf/AutoConf.js", - "type": "harmony import", - "userRequest": "../DefaultUrlService", - "loc": "6:0-53" - }, - { - "moduleId": 84, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Route.js", - "module": "./src/Services/Route/Route.js", - "moduleName": "./src/Services/Route/Route.js", - "type": "harmony import", - "userRequest": "../DefaultUrlService", - "loc": "6:0-53" - }, - { - "moduleId": 96, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "module": "./src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "moduleName": "./src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "type": "harmony import", - "userRequest": "../DefaultUrlService", - "loc": "6:0-53" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "// cette classe contient les URLs par defaut des services.\n// DefaultUrlService.Alti.url(key)[elevation-json]\n// DefaultUrlService.Alti.url(key)[elevation-xml]\n// DefaultUrlService.Alti.url(key)[profil-json]\n// DefaultUrlService.Alti.url(key)[profil-xml]\n// DefaultUrlService.Alti.url(key)[wps]\n// DefaultUrlService.ProcessIsoCurve.url(key)\n// DefaultUrlService.AutoComplete.url(key)\n// DefaultUrlService.ReverseGeocode.url(key)\n// DefaultUrlService.AutoConf.url(key)[apiKey]\n// DefaultUrlService.AutoConf.url(key)[apiKeys]\n// DefaultUrlService.AutoConf.url(key)[aggregate]\n// DefaultUrlService.Geocode.url(key)\n// DefaultUrlService.Route.url(key)\n\n// Example :\n//\n// DefaultUrlService.Alti.url('efe4r54tj4uy5i78o7545eaz7e87a')[elevation-json]\n// output {String} -> http://wxs.ign.fr/efe4r54tj4uy5i78o7545eaz7e87a/alti/rest/elevation.json\n//\n// DefaultUrlService.Alti.url('efe4r54tj4uy5i78o7545eaz7e87a')\n// output {Object|String}\n// -> http://wxs.ign.fr/efe4r54tj4uy5i78o7545eaz7e87a/alti/rest/elevation.json\n// -> http://wxs.ign.fr/efe4r54tj4uy5i78o7545eaz7e87a/alti/rest/elevation.xml\n// -> http://wxs.ign.fr/efe4r54tj4uy5i78o7545eaz7e87a/alti/rest/elevationLine.json\n// -> http://wxs.ign.fr/efe4r54tj4uy5i78o7545eaz7e87a/alti/rest/elevationLine.xml\n// -> http://wxs.ign.fr/efe4r54tj4uy5i78o7545eaz7e87a/alti/wps\n//\n// Force ssl :\n//\n// DefaultUrlService.ssl = true;\n// DefaultUrlService.AutoComplete.url('efe4r54tj4uy5i78o7545eaz7e87a')\n// output {Object|String}\n// -> https://wxs.ign.fr/efe4r54tj4uy5i78o7545eaz7e87a/ols/apis/completion\n\n// constantes internes\nvar ISBROWSER = typeof window !== \"undefined\" ? 1 : 0;\nvar HOSTNAME = \"wxs.ign.fr\";\n\n/**\n * Default Geoportal web services URLs access.\n *\n * @namespace\n * @alias Gp.Services.DefaultUrl\n */\nvar DefaultUrlService = {\n\n /** if set true, require the use of https protocol (except browser) */\n ssl : false,\n\n /**\n * base url of services (ssl protocol management)\n * @param {String} key - key\n * @param {String} path - path\n * @returns {String} url\n */\n url : function (key, path) {\n // en mode browser, c'est le protocole du navigateur,\n // sinon, il est fixé par l'option 'ssl' (par défaut à false, cad en http)\n var _protocol = (ISBROWSER) ? (location && location.protocol && location.protocol.indexOf(\"https:\") === 0 ? \"https://\" : \"http://\") : (DefaultUrlService.ssl ? \"https://\" : \"http://\");\n return _protocol + HOSTNAME.concat(\"/\", key, path);\n },\n\n /**\n * Elevation web service access\n *\n * @member {Object}\n * @property {Function} url (key) - Returns elevation service default urls with or without geoportal access key given as a parameter. The result is a javascript object with different urls given used protocols (\"elevation-json\", \"elevation-xml\", \"profil-json\" or \"profil-xml\").\n */\n Alti : {\n _key : {\n // rest\n \"elevation-json\" : \"/alti/rest/elevation.json\",\n \"elevation-xml\" : \"/alti/rest/elevation.xml\",\n \"profil-json\" : \"/alti/rest/elevationLine.json\",\n \"profil-xml\" : \"/alti/rest/elevationLine.xml\",\n // other\n wps : \"/alti/wps\"\n },\n /**\n * url\n * @param {String} key - key\n * @returns {String} url\n */\n url : function (key) {\n return {\n // rest\n \"elevation-json\" : DefaultUrlService.url(key, this._key[\"elevation-json\"]),\n \"elevation-xml\" : DefaultUrlService.url(key, this._key[\"elevation-xml\"]),\n \"profil-json\" : DefaultUrlService.url(key, this._key[\"profil-json\"]),\n \"profil-xml\" : DefaultUrlService.url(key, this._key[\"profil-xml\"]),\n // other\n wps : DefaultUrlService.url(key, this._key[\"wps\"])\n };\n }\n },\n /**\n * IsoCurve web service access\n *\n * @member {Object}\n * @property {Function} url (key) - Returns isocurve service default urls with or without geoportal access key given as a parameter. The result is a javascript object with different urls given used protocols (\"iso-json\" or \"iso-xml\").\n */\n ProcessIsoCurve : {\n _key : {\n \"iso-json\" : \"/isochrone/isochrone.json\", // rest (geoconcept)\n \"iso-xml\" : \"/isochrone/isochrone.xml\" // rest (geoconcept)\n },\n /**\n * url\n * @param {String} key - key\n * @returns {String} url\n */\n url : function (key) {\n return {\n \"iso-json\" : DefaultUrlService.url(key, this._key[\"iso-json\"]),\n \"iso-xml\" : DefaultUrlService.url(key, this._key[\"iso-xml\"])\n };\n }\n },\n /**\n * Autocompletion web service access\n *\n * @member {Object}\n * @property {Function} url (key) - Returns autocomplete service default urls with or without geoportal access key given as a parameter. The result is a String.\n */\n AutoComplete : {\n _key : \"/ols/apis/completion\",\n /**\n * url\n * @param {String} key - key\n * @returns {String} url\n */\n url : function (key) {\n return DefaultUrlService.url(key, this._key);\n }\n },\n /**\n * Reverse geocoding web service access\n *\n * @member {Object}\n * @property {Function} url (key) - Returns reverse geocoding service default urls with or without geoportal access key given as a parameter. The result is a String.\n */\n ReverseGeocode : {\n _key : \"/geoportail/ols\",\n /**\n * url\n * @param {String} key - key\n * @returns {String} url\n */\n url : function (key) {\n return DefaultUrlService.url(key, this._key);\n }\n },\n /**\n * Autoconfiguration web service access\n *\n * @member {Object}\n * @property {Function} url ([key1,...]) - Returns autoconfiguration service default urls with geoportal access key (s) given as a String array parameter. The result is a javascript object with different urls given the access mode (\"apiKey\", \"apiKeys\" or \"aggregate\").\n */\n AutoConf : {\n _key : {\n apiKey : \"/autoconf\",\n apiKeys : \"/autoconf?keys=%KEYS%\",\n aggregate : \"/autoconf/id/\"\n },\n /**\n * url\n * @param {String} key - key\n * @returns {String} url\n */\n url : function (key) {\n var keys = \"\";\n if (Array.isArray(key) && key.length > 0) {\n keys = key[0];\n for (var i = 1; i < key.length; i++) {\n keys += \",\" + key[i];\n }\n }\n return {\n apiKey : DefaultUrlService.url(key, this._key[\"apiKey\"]), // une seule clé\n apiKeys : DefaultUrlService.url(key[0], this._key[\"apiKeys\"]).replace(\"%KEYS%\", keys), // autoconf de plusieurs clés\n aggregate : DefaultUrlService.url(key, this._key[\"aggregate\"])\n };\n }\n },\n /**\n * Geocoding web service access\n *\n * @member {Object}\n * @property {Function} url (key) - Returns geocoding service default urls with or without geoportal access key given as a parameter. The result is a String.\n */\n Geocode : {\n _key : \"/geoportail/ols\",\n /**\n * url\n * @param {String} key - key\n * @returns {String} url\n */\n url : function (key) {\n return DefaultUrlService.url(key, this._key);\n }\n },\n /**\n * Routing web service access\n *\n * @member {Object}\n * @property {Function} url (key) - Returns routing service default urls with or without geoportal access key given as a parameter. The result is a javascript object with different urls given used protocols (\"route-json\" or \"route-xml\").\n */\n Route : {\n _key : {\n ols : \"/itineraire/ols\", // openLS\n \"route-json\" : \"/itineraire/rest/route.json\", // rest (geoconcept)\n \"route-xml\" : \"/itineraire/rest/route.xml\" // rest (geoconcept)\n },\n /**\n * url\n * @param {String} key - key\n * @returns {String} url\n */\n url : function (key) {\n return {\n ols : DefaultUrlService.url(key, this._key[\"ols\"]),\n \"route-json\" : DefaultUrlService.url(key, this._key[\"route-json\"]),\n \"route-xml\" : DefaultUrlService.url(key, this._key[\"route-xml\"])\n };\n }\n }\n};\n\nexport default DefaultUrlService;\n" - }, - { - "id": 6, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XML.js", - "name": "./src/Formats/XML.js", - "index": 27, - "index2": 22, - "size": 12411, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Response/AltiResponseFactory.js", - "issuerId": 58, - "issuerName": "./src/Services/Alti/Response/AltiResponseFactory.js", - "profile": { - "factory": 409, - "building": 91, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 1, - "reasons": [ - { - "moduleId": 58, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Response/AltiResponseFactory.js", - "module": "./src/Services/Alti/Response/AltiResponseFactory.js", - "moduleName": "./src/Services/Alti/Response/AltiResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Formats/XML", - "loc": "12:0-39" - }, - { - "moduleId": 61, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Response/AutoConfResponseFactory.js", - "module": "./src/Services/AutoConf/Response/AutoConfResponseFactory.js", - "moduleName": "./src/Services/AutoConf/Response/AutoConfResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Formats/XML", - "loc": "12:0-39" - }, - { - "moduleId": 76, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Response/DirectGeocodeResponseFactory.js", - "module": "./src/Services/Geocode/Response/DirectGeocodeResponseFactory.js", - "moduleName": "./src/Services/Geocode/Response/DirectGeocodeResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Formats/XML", - "loc": "14:0-39" - }, - { - "moduleId": 80, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Response/ReverseGeocodeResponseFactory.js", - "module": "./src/Services/Geocode/Response/ReverseGeocodeResponseFactory.js", - "moduleName": "./src/Services/Geocode/Response/ReverseGeocodeResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Formats/XML", - "loc": "14:0-39" - }, - { - "moduleId": 93, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Response/RouteResponseFactory.js", - "module": "./src/Services/Route/Response/RouteResponseFactory.js", - "moduleName": "./src/Services/Route/Response/RouteResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Formats/XML", - "loc": "12:0-39" - }, - { - "moduleId": 99, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "module": "./src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "moduleName": "./src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Formats/XML", - "loc": "12:0-39" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "/* global require */\n\nimport Logger from \"../Utils/LoggerByDefault\";\n// import __xmldom from \"xmldom\";\n\n/**\n * @classdesc\n *\n * Classe permettant d'écrire ou de lire du XML, sous forme de document DOM,\n * éventuellement selon des clés de lecture (readers) ou d'écriture (writers) spécifiques.\n *\n * @constructor\n * @alias Gp.Formats.XML\n *\n * @param {Object} [options] - options du format XML\n *\n * @param {Object} [options.reader] - Instance d'un Reader de service (AltiResponseReader, GeocodeRequestReader, etc.)\n * utile pour interpréter le XML lorsque sa structure est connue.\n * Ce reader doit comporter au moins une fonction statique read (root) permettant d'initialiser la lecture.\n *\n * @param {Object} [options.writers] - writers\n *\n * @param {String} [options.xmlString] - chaîne de caractère contenant du XML à interpréter.\n *\n * @private\n */\nfunction XML (options) {\n if (!(this instanceof XML)) {\n throw new TypeError(\"XML constructor cannot be called as a function.\");\n }\n\n // FIXME : notion de singleton\n\n this.logger = Logger.getLogger();\n this.logger.trace(\"[Constructeur XML ()]\");\n\n /**\n * Chaîne de caractères contenant le texte XML\n * @type {String}\n */\n this.xmlString = null;\n\n /**\n * DOM Element correspondant à la structure du XML.\n * @type {DOMElement}\n */\n this.xmlDoc = null;\n\n /**\n * Objet contenant des fonctions de lecture des différentes balises XML.\n * @type {Object}\n */\n this.reader = null;\n\n // traitement des paramètres d'options s'il y en a\n if (options) {\n if (options.xmlString && typeof options.xmlString === \"string\") {\n this.xmlString = options.xmlString;\n // Si une chaine de caractère a été passée en entrée : on la transforme aussi en XML document\n this.xmlDoc = __getXMLDOC(options.xmlString);\n }\n if (options.reader) {\n this.setReader(options.reader);\n }\n }\n}\n\nXML.prototype = {\n\n /**\n * @lends module:XML\n */\n\n /*\n * Constructeur (alias)\n */\n constructor : XML,\n\n /**\n * Méthode permettant de récupérer la chaîne de caractères associée au format XML\n *\n * @returns {String} xmlString - la chaîne de caractères correspondant au format XML\n */\n getXMLString : function () {\n return this.xmlString;\n },\n\n /**\n * Méthode permettant d'attribuer une chaîne de caractères au format XML (attribut xmlString).\n * La méthode va aussi transformer cette chaîne de caractères en document XML,\n * afin de remplir l'attribut xmlDoc.\n *\n * @param {String} xmlString - la chaîne de caractères correspondant au format XML\n */\n setXMLString : function (xmlString) {\n if (xmlString && typeof xmlString === \"string\") {\n this.xmlString = xmlString;\n this.xmlDoc = __getXMLDOC(xmlString);\n }\n },\n\n /**\n * Méthode permettant de récupérer les readers associés au format XML, s'ils ont été définis\n *\n * @return {Object} readers - les readers associés au format XML, s'ils existent,\n * sous forme d'une collection de fonctions\n */\n getReader : function () {\n return this.reader;\n },\n\n /**\n * Méthode permettant d'attribuer des readers, sous la forme d'un objet de fonctions (node, data),\n * lorsqu'ils n'ont pas été définis lors de l'instanciation par exemple (new XML (options)).\n *\n * @param {Object} reader - Instance d'un Reader de service (AltiResponseReader, GeocodeRequestReader, etc.)\n * utile pour interpréter le XML lorsque sa structure est connue.\n * Ce reader doit comporter au moins une fonction statique read (root) permettant d'initialiser la lecture.\n */\n setReader : function (reader) {\n if (reader && reader.read && typeof reader.read === \"function\") {\n this.reader = reader;\n }\n },\n\n /**\n * Méthode permettant de récupérer le document XML associé au format, s'il existe.\n *\n * @return {DOMElement} xmlDoc - le document XML (DOM document node) s'il existe\n */\n getXMLDoc : function () {\n return this.xmlDoc;\n },\n\n /**\n * Setter\n */\n setXMLDoc : function (doc) {\n this.xmlDoc = doc;\n },\n /**\n * Méthode initialisant la lecture du XML, à partir d'un XML Document :\n * création d'un objet JavaScript contenant les informations du XML,\n * sauf dans le cas où il n'existe pas de XML Document à interpréter (retourne un objet vide).\n *\n * @return {Object} [parserOutput] - un objet JavaScript contenant les informations du XML :\n * - soit toutes les informations si aucun reader n'a été spécifié à la création du format\n * - soit les informations spécifiées dans le reader.\n */\n parse : function () {\n // build xml document from xmlString\n if (!this.xmlDoc && this.xmlString) {\n this.xmlDoc = __getXMLDOC(this.xmlString);\n }\n if (this.xmlDoc) {\n var root = __getRootNode(this.xmlDoc);\n if (root) {\n var parserOutput;\n // call reader if exists\n if (this.reader && this.reader.read) {\n parserOutput = this.reader.read(root);\n } else {\n parserOutput = {};\n parserOutput[root.nodeName] = __readDefault(root);\n }\n return parserOutput;\n } else {\n return {};\n }\n }\n }\n\n};\n\n/**\n * Méthode de la classe (privée) permettant de créer un XML Document à partir d'une chaîne de caractères XML,\n * en utilisant DOMParser () lorsque c'est possible.\n * For more information, see: https://dvcs.w3.org/hg/innerhtml/raw-file/tip/index.html#the-domparser-interface\n *\n * @private\n * @memberof XML\n * @method __getXMLDOC\n * @param {String} xmlString - xml string to be converted into DOM element\n * @return {DOMElement} - the corresponding XML Document\n */\nfunction __getXMLDOC (xmlString) {\n if (typeof window === \"undefined\") {\n // env. nodejs\n var DOMParser = require(\"xmldom\").DOMParser; // __xmldom.DOMParser;\n return new DOMParser().parseFromString(xmlString, \"text/xml\");\n } else {\n // env. browser\n\n var parser;\n var xmlDoc;\n var errorMsg = \"Erreur lors du parsing de la réponse du service : XML non conforme\";\n\n if (window.ActiveXObject) {\n // Internet Explorer < 9\n xmlDoc = new window.ActiveXObject(\"Microsoft.XMLDOM\");\n xmlDoc.async = false;\n xmlDoc.loadXML(xmlString);\n var parseError = xmlDoc.parseError;\n if (parseError.errorCode) {\n if (parseError.line && parseError.linepos) {\n errorMsg += \"( ligne \" + parseError.line + \", colonne \" + parseError.linepos;\n }\n if (parseError.reason) {\n errorMsg += \": \" + parseError.reason + \")\";\n }\n throw new Error(errorMsg);\n }\n return xmlDoc;\n } else if (window.DOMParser) {\n // les autres (Chrome, Mozilla, IE >= 9)\n parser = new window.DOMParser();\n try {\n xmlDoc = parser.parseFromString(xmlString, \"text/xml\");\n } catch (e) {\n // Internet Explorer browser raises exception if xmlString is not valid XML\n if (e.message === \"SyntaxError\") {\n throw new Error(errorMsg);\n } else {\n throw new Error(\"Erreur lors du parsing de la réponse du service : \" + e.message);\n }\n }\n // look for parsing error in case no exception was raised\n if (xmlDoc.getElementsByTagName(\"parsererror\").length > 0) {\n var parsererror = xmlDoc.getElementsByTagName(\"parsererror\");\n for (var i = 0; i < parsererror.length; i++) {\n var content = parsererror[i].innerHTML;\n // except in case parsererror is just because of huge xml, but parsing is done.\n if (content.indexOf(\"Huge input lookup\") === -1) {\n errorMsg += \"(\" + content + \")\";\n throw new Error(errorMsg);\n }\n }\n } else if (!xmlDoc.documentElement) { // may happen in chrome browser\n throw new Error(errorMsg);\n }\n return xmlDoc;\n } else {\n // FIXME\n throw new Error(\"Incompatible DOM Parser pour ce navigateur !\");\n }\n }\n}\n\n/**\n * Méthode de la classe (privée) permettant de récupérer le noeud racine du document,\n * à partir d'un document node (nodeType=9), puis lecture de ce noeud (readNode)\n *\n * @private\n * @memberof XML\n * @method __getRootNode\n * @param {DOMElement} [xmlDoc] - a Document Node\n * @return {DOMElement} root - the document root node\n */\nfunction __getRootNode (xmlDoc) {\n var root;\n if (xmlDoc.nodeType === 9) {\n // INFO : nodeType 9 represents the entire document (the root-node of the DOM tree)\n root = xmlDoc.documentElement;\n } else if (xmlDoc.nodeType === 1) {\n root = xmlDoc;\n }\n return root;\n}\n\n/**\n * Méthode de la classe (privée) permettant de lire automatiquement un noeud XML,\n * lorsqu'aucun reader spécifique n'a été spécifié (parser brut)\n *\n * @private\n * @memberof XML\n * @method readDefault\n * @param {DOMElement} node - a DOM element node\n * @example final data object looks like :\n * data = {\n * attributeName: attributeValue,\n * childName: {\n * attributeName: attributeValue,\n * attributeName: attributeValue,\n * childName: {\n * \"textContent\": textContent\n * },\n * childName: {\n * childName: {\n * attributeName:attributeValue\n * }\n * }\n * }\n * }\n */\nfunction __readDefault (node) {\n var data = {};\n\n // if element node has attributes, set their values to data\n if (node.attributes.length > 0) {\n var dataAttributes = __getAttributes(node);\n data[\"attributes\"] = dataAttributes;\n }\n\n // if element node has childNodes, read them and set them to data\n if (node.hasChildNodes()) {\n var childData = {};\n var child;\n var children = node.childNodes;\n\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n\n if (child.nodeType === 3) { // TEXT_NODE\n data[\"textContent\"] = child.nodeValue;\n } else if (child.nodeType === 1) {\n childData = __readDefault(child);\n\n if (!data[child.nodeName]) {\n // store childData in an object\n data[child.nodeName] = childData;\n } else {\n // in case several childNodes has the same name : store them in an array.\n // if data[nodeName] already exists but is not an array\n if (!Array.isArray(data[child.nodeName])) {\n var old = data[child.nodeName];\n data[child.nodeName] = [];\n data[child.nodeName].push(old);\n }\n data[child.nodeName].push(childData);\n }\n }\n // TODO : manage other node types (4=CDATA, etc)\n }\n }\n\n return data;\n}\n\n/**\n * Méthode de la classe (privée) permettant de récupérer les attributs d'un noeud élément\n *\n * @private\n * @memberof XML\n * @method __getAttributes\n * @param {DOMElement} node - noeud contenant l'attribut recherché\n * @return {Object} nodeAttributes - objet contenant les noms et valeurs des différents attributs\n */\nfunction __getAttributes (node) {\n if (node.attributes.length > 0) {\n var nodeAttributes = {};\n var attributes = node.attributes;\n for (var i = 0; i < attributes.length; i++) {\n var attribute = attributes[i];\n nodeAttributes[attribute.nodeName] = attribute.nodeValue;\n }\n return nodeAttributes;\n }\n}\n\nexport default XML;\n" - }, - { - "id": 7, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/GeocodeLocation.js", - "name": "./src/Services/Geocode/Request/GeocodeLocation.js", - "index": 62, - "index2": 56, - "size": 1193, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/model/StreetAddress.js", - "issuerId": 72, - "issuerName": "./src/Services/Geocode/Request/model/StreetAddress.js", - "profile": { - "factory": 69, - "building": 240 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 72, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/model/StreetAddress.js", - "module": "./src/Services/Geocode/Request/model/StreetAddress.js", - "moduleName": "./src/Services/Geocode/Request/model/StreetAddress.js", - "type": "harmony import", - "userRequest": "../GeocodeLocation", - "loc": "2:0-49" - }, - { - "moduleId": 73, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/model/PositionOfInterest.js", - "module": "./src/Services/Geocode/Request/model/PositionOfInterest.js", - "moduleName": "./src/Services/Geocode/Request/model/PositionOfInterest.js", - "type": "harmony import", - "userRequest": "../GeocodeLocation", - "loc": "2:0-49" - }, - { - "moduleId": 74, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/model/CadastralParcel.js", - "module": "./src/Services/Geocode/Request/model/CadastralParcel.js", - "moduleName": "./src/Services/Geocode/Request/model/CadastralParcel.js", - "type": "harmony import", - "userRequest": "../GeocodeLocation", - "loc": "2:0-49" - }, - { - "moduleId": 75, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/model/Administratif.js", - "module": "./src/Services/Geocode/Request/model/Administratif.js", - "moduleName": "./src/Services/Geocode/Request/model/Administratif.js", - "type": "harmony import", - "userRequest": "../GeocodeLocation", - "loc": "2:0-49" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 6, - "source": "\n/**\n * @classdesc\n *\n * Liste des attributs des tables de geocodage\n * @constructor\n * @alias Gp.Services.Geocode.Request.GeocodeLocation\n * @private\n */\nfunction GeocodeLocation () {\n if (!(this instanceof GeocodeLocation)) {\n throw new TypeError(\"GeocodeLocation constructor cannot be called as a function.\");\n }\n\n /**\n * Objet qui peut prendre comme propriétés les valeurs du tableau serviceAttributes\n * @type {Object}\n */\n this.placeAttributes = {};\n\n /**\n * Tableau qui liste les attributs spécifiques selon le type de la GeocodeLocation.\n * Ces attributs correspondent à ceux saisis par l'utilisateur (légèrement différents de ceux du service)\n * @type {String[]}\n */\n this.attributesList = [];\n\n /**\n * Tableau qui liste les attributs spécifiques selon le type de la GeocodeLocation\n * Ces attributs correspondent à ceux interprétés par le service (balises Place).\n * @type {String[]}\n */\n this.serviceAttributes = [];\n}\n\n/**\n * @lends module:GeocodeLocation\n */\nGeocodeLocation.prototype = {\n\n /**\n * Constructeur (alias)\n */\n constructor : GeocodeLocation\n\n};\n\nexport default GeocodeLocation;\n" - }, - { - "id": 8, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/WKT.js", - "name": "./src/Formats/WKT.js", - "index": 90, - "index2": 85, - "size": 3934, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Response/RouteResponseFactory.js", - "issuerId": 93, - "issuerName": "./src/Services/Route/Response/RouteResponseFactory.js", - "profile": { - "factory": 215, - "building": 118, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 1, - "reasons": [ - { - "moduleId": 93, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Response/RouteResponseFactory.js", - "module": "./src/Services/Route/Response/RouteResponseFactory.js", - "moduleName": "./src/Services/Route/Response/RouteResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Formats/WKT", - "loc": "13:0-39" - }, - { - "moduleId": 94, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Formats/RouteResponseRESTReader.js", - "module": "./src/Services/Route/Formats/RouteResponseRESTReader.js", - "moduleName": "./src/Services/Route/Formats/RouteResponseRESTReader.js", - "type": "harmony import", - "userRequest": "../../../Formats/WKT", - "loc": "12:0-39" - }, - { - "moduleId": 99, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "module": "./src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "moduleName": "./src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Formats/WKT", - "loc": "13:0-39" - }, - { - "moduleId": 100, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Formats/ProcessIsoCurveResponseReader.js", - "module": "./src/Services/ProcessIsoCurve/Formats/ProcessIsoCurveResponseReader.js", - "moduleName": "./src/Services/ProcessIsoCurve/Formats/ProcessIsoCurveResponseReader.js", - "type": "harmony import", - "userRequest": "../../../Formats/WKT", - "loc": "11:0-39" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "import Logger from \"../Utils/LoggerByDefault\";\n\n/**\n * Lecture / Ecriture du format WKT\n *\n * Les besoins sont assez simples :\n * 1. lecture des types suivants :\n * - LINESTRING\n * - POLYGON\n * - (TODO)\n * 2. convertir aux formats suivants :\n * - json\n * - (TODO)\n *\n *\n * @example\n * var strWKT = \"LINESTRING (2.416907 48.846577, 2.416916 48.846613)\";\n * WKT.toJson (strWKT,\n * function onSuccess (json) {\n * // {\n * // type : 'LINESTRING',\n * // coordinates : [\n * // [2.416907, 48.846577],\n * // [2.416916, 48.846613]\n * // ]\n * // }\n * },\n * function onError (error) {\n * console.log(error);\n * }\n * );\n *\n * @module WKT\n * @alias Gp.Formats.WKT\n * @private\n */\n\nvar WKT = {\n\n /**\n * Parsing d'une chaine WKT\n *\n * @method toJson\n * @param {String} strWkt - chaine de type WKT\n * @param {Function} success - fonction callback\n * @param {Function} error - fonction callback\n */\n toJson : function (strWkt, success, error) {\n var logger = Logger.getLogger();\n\n var json = null;\n\n try {\n if (!strWkt) {\n throw new Error(\"La chaine WKT n'est pas renseignée !\");\n }\n\n if (!success) {\n // callback success par defaut\n success = function (json) {\n console.log(json);\n };\n }\n\n if (!error) {\n // callback error par defaut\n error = function (e) {\n console.log(e);\n };\n }\n\n var regex;\n var subst;\n\n // regex coordinates\n regex = /(-?\\d+\\.?[0-9]*)\\s(-?\\d+\\.?[0-9]+)/g;\n subst = \"[$1,$2]\";\n strWkt = strWkt.replace(regex, subst);\n\n // regex type\n regex = /^(\\w+)/;\n regex.exec(strWkt);\n if (RegExp.$1 === \"POLYGON\") {\n subst = \"{\\\"type\\\" : \\\"Polygon\\\",\";\n strWkt = strWkt.replace(RegExp.$1, subst);\n // clean\n // (( --> coordinates : [[\n regex = /(\\({2}?)/;\n subst = \"\\\"coordinates\\\" : [[\";\n strWkt = strWkt.replace(regex, subst);\n // )) --> ]]}\n regex = /(\\){2}?)/;\n subst = \"]]}\";\n strWkt = strWkt.replace(regex, subst);\n // all ( --> [\n regex = /(\\()/g;\n subst = \"[\";\n strWkt = strWkt.replace(regex, subst);\n // all ) --> ]\n regex = /(\\))/g;\n subst = \"]\";\n strWkt = strWkt.replace(regex, subst);\n } else if (RegExp.$1 === \"LINESTRING\") {\n subst = \"{\\\"type\\\" : \\\"LineString\\\",\";\n strWkt = strWkt.replace(RegExp.$1, subst);\n // clean\n regex = /(\\(\\(?)/;\n subst = \"\\\"coordinates\\\" : [\";\n strWkt = strWkt.replace(regex, subst);\n regex = /(\\)\\)?)/;\n subst = \"]}\";\n strWkt = strWkt.replace(regex, subst);\n }\n\n logger.trace(strWkt);\n\n json = JSON.parse(strWkt);\n\n if (!json) {\n throw new Error(\"Le JSON est vide !\");\n }\n\n if (!json.type) {\n throw new Error(\"Le type de geometrie n'est pas connu !\");\n }\n\n if (!json.coordinates) {\n throw new Error(\"La liste des points est vide !\");\n }\n\n success.call(this, json);\n } catch (e) {\n if (e.name === \"SyntaxError\") {\n error.call(this, \"Erreur de parsing JSON !\");\n return;\n }\n error.call(this, e);\n }\n }\n};\n\nexport default WKT;\n" - }, - { - "id": 9, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Response/model/AltiResponse.js", - "name": "./src/Services/Alti/Response/model/AltiResponse.js", - "index": 29, - "index2": 23, - "size": 603, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 56, - "building": 299 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/Alti/Response/model/AltiResponse", - "loc": "3:0-71" - }, - { - "moduleId": 58, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Response/AltiResponseFactory.js", - "module": "./src/Services/Alti/Response/AltiResponseFactory.js", - "moduleName": "./src/Services/Alti/Response/AltiResponseFactory.js", - "type": "harmony import", - "userRequest": "./model/AltiResponse", - "loc": "14:0-48" - }, - { - "moduleId": 59, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Formats/AltiResponseReader.js", - "module": "./src/Services/Alti/Formats/AltiResponseReader.js", - "moduleName": "./src/Services/Alti/Formats/AltiResponseReader.js", - "type": "harmony import", - "userRequest": "../Response/model/AltiResponse", - "loc": "15:0-58" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "/**\n * Response object for {@link module:Services~getAltitude Gp.Services.getAltitude ()} invocation when successful. Received as the argument of onSuccess callback function.\n *\n * @property {Array.} elevations - Elevations array.\n *\n * @namespace\n * @alias Gp.Services.AltiResponse\n */\nfunction AltiResponse () {\n if (!(this instanceof AltiResponse)) {\n throw new TypeError(\"AltiResponse constructor cannot be called as a function.\");\n }\n\n this.elevations = [];\n}\n\nAltiResponse.prototype = {\n\n constructor : AltiResponse\n\n};\n\nexport default AltiResponse;\n" - }, - { - "id": 10, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Response/model/Elevation.js", - "name": "./src/Services/Alti/Response/model/Elevation.js", - "index": 30, - "index2": 24, - "size": 789, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 56, - "building": 376 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/Alti/Response/model/Elevation", - "loc": "4:0-65" - }, - { - "moduleId": 58, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Response/AltiResponseFactory.js", - "module": "./src/Services/Alti/Response/AltiResponseFactory.js", - "moduleName": "./src/Services/Alti/Response/AltiResponseFactory.js", - "type": "harmony import", - "userRequest": "./model/Elevation", - "loc": "15:0-42" - }, - { - "moduleId": 59, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Formats/AltiResponseReader.js", - "module": "./src/Services/Alti/Formats/AltiResponseReader.js", - "moduleName": "./src/Services/Alti/Formats/AltiResponseReader.js", - "type": "harmony import", - "userRequest": "../Response/model/Elevation", - "loc": "16:0-52" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\n/**\n * Single elevation object returned by underlying web service. Contains at least, one elevation (z). May also contain point coordinates and elevation accuracy if \"zonly\" parameter wasn't set to true.\n *\n * @property {Float} lat - Point latitude. (only if zonly=false)\n * @property {Float} lon - Point longitude. (only if zonly=false)\n * @property {Float} z - Point elevation.\n * @property {Float} acc - Accuracy of elevation for this point. (only if zonly=false)\n *\n * @namespace\n * @alias Gp.Services.Alti.Elevation\n */\nfunction Elevation () {\n if (!(this instanceof Elevation)) {\n throw new TypeError(\"Elevation constructor cannot be called as a function.\");\n }\n\n this.z = null;\n}\n\nElevation.prototype = {\n\n constructor : Elevation\n\n};\n\nexport default Elevation;\n" - }, - { - "id": 11, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS.js", - "name": "./src/Formats/XLS.js", - "index": 50, - "index2": 48, - "size": 15219, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/ReverseGeocodeRequestFactory.js", - "issuerId": 79, - "issuerName": "./src/Services/Geocode/Request/ReverseGeocodeRequestFactory.js", - "profile": { - "factory": 96, - "building": 254, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 64, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "module": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "moduleName": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "type": "harmony import", - "userRequest": "../../../Formats/XLS", - "loc": "10:0-39" - }, - { - "moduleId": 79, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/ReverseGeocodeRequestFactory.js", - "module": "./src/Services/Geocode/Request/ReverseGeocodeRequestFactory.js", - "moduleName": "./src/Services/Geocode/Request/ReverseGeocodeRequestFactory.js", - "type": "harmony import", - "userRequest": "../../../Formats/XLS", - "loc": "10:0-39" - }, - { - "moduleId": 86, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Request/RouteRequestOLS.js", - "module": "./src/Services/Route/Request/RouteRequestOLS.js", - "moduleName": "./src/Services/Route/Request/RouteRequestOLS.js", - "type": "harmony import", - "userRequest": "../../../Formats/XLS", - "loc": "10:0-39" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "import Logger from \"../Utils/LoggerByDefault\";\nimport RequestHeader from \"./XLS/RequestHeader\";\nimport Request from \"./XLS/Request\";\nimport AbstractService from \"./XLS/AbstractService\";\n\n/**\n * @classdesc\n *\n * standard OpenLS\n * standard XLS\n * (version 1.2)\n *\n * Réfs :\n * - {@link http://schemas.opengis.net/ols/1.2/}\n * - {@link http://www.opengeospatial.org/standards/ols}\n * - {@link http://wxs.ign.fr/schemas/}\n *\n *\n * Création du template XLS (avec gestion des namespaces)\n * ------------------------\n * ```\n * balise xsd : element name=\"XLS\" attribute name=\"version\" [(attribute ref=\"lang\")]\n * ```\n *\n * Exemple :\n * ```\n * \n * < (ref. OLS) />\n * \n * ```\n * ```\n * \n * \n * \n * ```\n *\n * Création des templates OLS pour LocationUtilityService\n * ------------------------------------------------------\n *\n * Exemple :\n *\n * ```\n * \n * \n * \n *
\n * saint mandé\n *
\n *
\n *
\n * ```\n * ```\n * \n * \n * \n * \n * \n * 50.347775 3.205098\n * \n * \n * StreetAddress\n * \n * \n * ```\n * ```\n * Geocodage direct (balise xsd) :\n * element ref=\"RequestHeader\" [ (attribute name=\"clientName\" attribute name=\"clientPassword\" attribute name=\"sessionID\" attribute name=\"srsName\" attribute name=\"MSID\") ]\n * element name=\"Request\" attribute name=\"methodName\" attribute name=\"version\" attribute name=\"requestID\" [ attribute name=\"maximumResponses\" ]\n * element name=\"GeocodeRequest\" attribute name=\"returnFreeForm\"\n * element ref=\"xls:Address\"\n * ```\n * ```\n * Geocodage inverse (balise xsd) :\n * element ref=\"RequestHeader\" [ (attribute name=\"clientName\" attribute name=\"clientPassword\" attribute name=\"sessionID\" attribute name=\"srsName\" attribute name=\"MSID\") ]\n * element name=\"Request\" attribute name=\"methodName\" attribute name=\"version\" attribute name=\"requestID\" [ attribute name=\"maximumResponses\" ]\n * element name=\"ReverseGeocodeRequest\"\n * element ref=\"xls:Position\"\n * element name=\"ReverseGeocodePreference\" (enumeration)\n * ```\n *\n * Il existe 3 sous ensembles d'objets :\n * - RequestHeader\n * - Request\n * - ReverseGeocodeRequest, GeocodeRequest\n *\n * GeocodeRequest est composé d'un objet {@link Gp.Services.Geocode.Response.GeocodeLocation}.\n * ReverseGeocodeRequest est composé d'un objet {@link Gp.Services.ReverseGeocode.Response.ReverseGeocodeLocation}.\n *\n * Les locations font appels aux objets suivants qui possèdent des attributs spécifiques\n * en fonction du type de table de geocodage interrogé :\n * - StreetAddress\n * - CadastralParcel\n * - PositionOfInterest\n * - Administratif\n *\n *\n * et des élements sous jacents tels que :\n * - ReverseGeocodePreference -> tables de geocodages :\n * - StreetAddress\n * - CadastralParcel\n * - PositionOfInterest\n * - Administratif (une balise par table)\n * - Position -> standard GML 3.2.1\n * - Address -> cf. ci-dessous\n *\n * ```\n * Position (balise xsd) :\n * ex. 50.347775 3.205098\n * ex. 48.85978570614691 2.29135727611288781000\n * (au choix)\n * element ref=\"gml:Point\"\n * element ref=\"gml:CircleByCenterPoint\"\n * element ref=\"gml:Polygon\"\n * element ref=\"gml:MultiPolygon\"\n * les autres elemennts ne sont pas implémentés (QoP, Speed, Direction, Time, ...)\n *\n * Address (balise xsd) :\n * ex.
1 r de paris saint denis
\n * attribute name=\"countryCode\"\n * element name=\"freeFormAddress\"\n * element ref=\"xls:Place\"\n * element ref=\"gml:Envelope\"\n * ou\n * ex.
1 rue MarconiMetz57000
\n * attribute name=\"countryCode\"\n * element ref=\"xls:StreetAddress\"\n * element ref=\"xls:PostalCode\"\n * element ref=\"xls:Place\"\n * element ref=\"gml:Envelope\"\n *\n * Place (balise xsd) :\n * ex. Metz\n * attribute name=\"type\"\n * enumeration value=\"CountrySubdivision\"\n * enumeration value=\"CountrySecondarySubdivision\"\n * enumeration value=\"Municipality\"\n * enumeration value=\"MunicipalitySubdivision\"\n * enumeration value=\"choume-banchi-go\"\n * enumeration value=\"Qualite\"\n * enumeration value=\"Departement\"\n * enumeration value=\"Bbox\"\n * enumeration value=\"Commune\"\n * enumeration value=\"Territoire\"\n * enumeration value=\"Importance\"\n * enumeration value=\"Nature\"\n * (la liste n'est pas exhaustives...)\n *\n * StreetAddress (balise xsd) :\n * ex. 1 rue Marconi\n * attribute name=\"locator\"\n * element name=\"xls:Building\"\n * element ref=\"xls:Street\"\n *\n * Street (balise xsd) :\n * ex. 1 rue Marconi\n * attribute name=\"officialName\" (...)\n *\n * Building (balise xsd) :\n * ex. \n * attribute name=\"number\" attribute name=\"subdivision\" attribute name=\"buildingName\"\n *\n * PostalCode (balise xsd) :\n * ex. 77182\n *\n * ```\n *\n * Requête\n * -------\n *\n * 2 modes de requête sur les services : GET ou POST.\n *\n * Le mode GET n'est que l'encodage du XML en param (qxml) de la requête (donc pas d'implementation particulière ?)\n *\n * Modèle de classes\n * -----------------\n *\n * ```\n * ________ XLS ____________\n * / | \\\n * RequestHeader AbstractService Request\n * ^\n * ______|________________________\n * (extends) / \\ (extends)\n * LocationUtilityService RouteService\n * | |\n * ___________|___________ (...)\n * / \\\n * GeocodeRequest ReverseGeocodeRequest\n * | |\n * | _____|______\n * | / \\\n * Address Preference Position\n * |\n * / \\\n * Place StreetAddress\n * |\n * / \\\n * Street Building\n * ```\n *\n * @example\n * // encapsule un objet 'LocationUtilityService'\n * // dans une coquille XSL (avec/sans namespace)\n * xsl = new XSL ();\n * xsl.namespace = false;\n * xsl.srsName = \"epsg:4326\";\n * xsl.maximumResponses = 26;\n * // methodName fournit par l'objet 'lus'\n * // requestID est calculé\n * xsl.setService (lus);\n * xsl.build ();\n * // out ->\n * // \n * // \n * // \n * // < (ref. LocationUtilityService ou vide) />\n * // \n * // \n *\n *\n * @constructor\n * @alias Gp.Formats.XLS\n * @param {Object} options - options du constructeur\n * @param {Object} options.srsName - identifiant du Systeme de Coordonnees\n * @param {String} options.maximumResponses - nombre de reponses max d'une requete\n * @param {Function} options.onsuccess - function callback success (TODO)\n * @param {Function} options.onerror - function callback error (TODO)\n *\n * @private\n */\nfunction XLS (options) {\n this.logger = Logger.getLogger();\n this.logger.trace(\"[Constructeur XLS()]\");\n\n if (!(this instanceof XLS)) {\n throw new TypeError(\"XLS constructor cannot be called as a function.\");\n }\n\n // options par defaut\n this.options = {\n srsName : \"EPSG:4326\",\n maximumResponses : 25\n };\n\n // et on ajoute les options en paramètre aux options par défaut\n for (var opt in options) {\n if (options.hasOwnProperty(opt)) {\n if (options[opt]) {\n this.options[opt] = options[opt];\n }\n }\n }\n}\n\n/**\n * Version\n */\nXLS.VERSION = \"1.2\";\n\nXLS.prototype = {\n\n /**\n * @lends module:XLS#\n */\n\n /**\n * request (out)\n * @type {String}\n */\n requestString : null,\n\n /**\n * namespace\n * Surcharge les balises XLS d'un prefixe.\n * Par defaut, false\n * @type {Boolean}\n */\n namespace : false,\n\n /**\n * Objet Service\n * LocationUtilityService ou RouteService\n * @type {AbstractService}\n */\n oService : null,\n\n /**\n * Constructeur (alias)\n */\n constructor : XLS,\n\n /**\n * Template de la requête.\n * substitution des valeurs suivantes :\n * __VERSION__, __NAMESPACE__, __SCHEMALOCATION__\n * __REQUESTHEADER__, __REQUEST__\n */\n template : \"\\n\" +\n \"\\n\" +\n \"__REQUESTHEADER__\\n\" +\n \"__REQUEST__\\n\" +\n \"\\n\",\n\n /**\n * Namespace par defaut.\n *\n * @returns {String} namespace\n */\n namespaceByDefault : function () {\n var ns = [\n \"xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\"\",\n \"xmlns:xls=\\\"http://www.opengis.net/xls\\\"\",\n \"xmlns:gml=\\\"http://www.opengis.net/gml\\\"\"\n ];\n\n return ns.join(\" \");\n },\n\n /**\n * Schemalocation par defaut\n *\n * @returns {String} schemaLocation\n */\n schemaLocationByDefault : function () {\n return \"xsi:schemaLocation=\\\"http://www.opengis.net/xls http://schemas.opengis.net/ols/1.2/olsAll.xsd\\\"\";\n },\n\n /**\n * Setter Service\n * Ajout d'un objet de type LocationUtilityService (LUS) ou RouteService\n *\n * @param {Object} oService - GeoceodeRequest / ReverseGeocodeRequest ou RouteRequest\n */\n setService : function (oService) {\n if (!oService) {\n this.logger.trace(\"L'objet de type Service XSL n'est pas encore defini !?\");\n return;\n }\n\n if (oService instanceof AbstractService) {\n this.oService = oService;\n } else {\n this.logger.error(\"L'objet n'est pas du type 'LocationUtilityService' ou 'RouteService' !?\");\n }\n },\n\n /**\n * Getter Service\n * Retourne un objet de type LocationUtilityService (LUS) ou RouteService\n * ex. GeoceodeRequest / ReverseGeocodeRequest ou RouteRequest\n *\n * @returns {Object} service (LocationUtilityService|RouteService)\n */\n getService : function () {\n return this.oService;\n }\n};\n\n/**\n * Ajout d'un prefixe de namespace\n *\n * @todo impl. l'ajout de namespace\n * @param {Object} ns - ex. {key:xls, url:http://www.opengis.net/xls}\n * @param {String} request - requête\n * @returns {String} requête\n */\nXLS.prototype.addNamespace = function (ns, request) {\n // INFO\n // on recherche la clef dans les namespaces par defaut.\n // si la clef n'existe pas dans les namespaceByDefault (), on l'ajoute.\n // on surcharge toutes les balises, ex. XLS -> xls:XLS\n // sauf celles qui sont déjà prefixées !\n\n var keyNS = ns.key;\n // var urlNS = ns.url; // TODO not yet implemented !\n\n // recherche la clef dans les namespaces par defaut\n var bFound = false;\n var allNS = this.namespaceByDefault().split(\" \");\n for (var index = 0; index < allNS.length; index++) {\n var element = allNS[index];\n var map = element.split(\"=\");\n var key = map[0];\n // var url = map[1]; // TODO not yet implemented !\n\n if (key === \"xmlns:\" + keyNS) {\n bFound = true;\n break;\n }\n }\n\n // TODO\n // si on a une nouvelle clef, on l'ajoute...\n if (!bFound) {\n this.logger.warn(\"L'ajout d'un nouvel namespace n'est pas encore implémenté !\");\n return request;\n }\n\n // surcharge toutes les balises\n var regex;\n var subst;\n\n // regex balise ouvrante\n regex = /<(\\w+[\\s>])/g;\n subst = \"<\" + keyNS + \":$1\";\n request = request.replace(regex, subst);\n\n // regex balise fermante\n regex = /<\\/(\\w+[\\s>])/g;\n subst = \"\n // \n // \n // \n // < (ref. LocationUtilityService ou vide) />\n // \n // \n\n // as t on un objet de type Service XLS à disposition ?\n var bService = !!this.getService();\n\n var template = \"\";\n template = this.template;\n template = template.replace(/__VERSION__/g, XLS.VERSION);\n template = template.replace(/__NAMESPACE__/g, this.namespaceByDefault);\n template = template.replace(/__SCHEMALOCATION__/g, this.schemaLocationByDefault);\n\n // header\n var oHeader = new RequestHeader({\n srsName : this.options.srsName\n });\n template = template.replace(/__REQUESTHEADER__/g, oHeader.toString());\n\n // request\n var oRequest = new Request({\n maximumResponses : this.options.maximumResponses,\n version : XLS.VERSION, // FIXME même version ?\n methodName : bService ? this.getService().CLASSTYPE : null\n });\n template = template.replace(/__REQUEST__/g, oRequest.toString());\n\n // objet lus ou route\n if (bService) { // INFO : clef __REQUESTSERVICE__ dispo dans l'objet 'Request'\n template = template.replace(//g, this.getService().toString());\n }\n\n if (!template) {\n this.logger.warn(\"traduction tmpl : empty request !?\");\n return;\n }\n\n // ajout d'un namespace\n if (this.namespace) {\n // ajout de xls par defaut\n template = this.addNamespace({\n key : \"xls\",\n url : \"http://www.opengis.net/xls\"\n }, template);\n }\n\n this.requestString = template;\n this.logger.trace(\"traduction tmpl\", template);\n\n // on retourne qqchose !\n return this.requestString;\n};\n\nexport default XLS;\n" - }, - { - "id": 12, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/AbstractService.js", - "name": "./src/Formats/XLS/AbstractService.js", - "index": 53, - "index2": 47, - "size": 1893, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS.js", - "issuerId": 11, - "issuerName": "./src/Formats/XLS.js", - "profile": { - "factory": 743, - "building": 94, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 11, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS.js", - "module": "./src/Formats/XLS.js", - "moduleName": "./src/Formats/XLS.js", - "type": "harmony import", - "userRequest": "./XLS/AbstractService", - "loc": "4:0-52" - }, - { - "moduleId": 38, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService.js", - "module": "./src/Formats/XLS/LocationUtilityService.js", - "moduleName": "./src/Formats/XLS/LocationUtilityService.js", - "type": "harmony import", - "userRequest": "./AbstractService", - "loc": "2:0-48" - }, - { - "moduleId": 87, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/RouteService.js", - "module": "./src/Formats/XLS/RouteService.js", - "moduleName": "./src/Formats/XLS/RouteService.js", - "type": "harmony import", - "userRequest": "./AbstractService", - "loc": "2:0-48" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 6, - "source": "import Logger from \"../../Utils/LoggerByDefault\";\n\n/**\n * @classdesc\n * @private\n *\n * @constructor\n * @alias Gp.Formats.XLS.AbstractService\n *\n * @param {Object} [options] - options\n */\nfunction AbstractService (options) {\n this.logger = Logger.getLogger();\n this.logger.trace(\"[Constructeur AbstractService ()]\");\n\n if (!(this instanceof AbstractService)) {\n throw new TypeError(\"AbstractService constructor cannot be called as a function.\");\n }\n\n // options par defaut\n this.options = options || {};\n\n // et on ajoute les options en paramètre aux options par défaut\n for (var opt in options) {\n if (options.hasOwnProperty(opt)) {\n this.options[opt] = options[opt];\n }\n }\n}\n\n/**\n * @lends module:AbstractService#\n */\nAbstractService.prototype = {\n\n /**\n * request (out)\n * @type {String}\n */\n strRequest : null,\n\n /**\n * objet Request\n * @type {Request}\n */\n oRequest : null,\n\n /**\n * Filter\n * @type {FilterExtension}\n */\n oFilter : null,\n\n /**\n * Constructeur (alias)\n */\n constructor : AbstractService,\n\n /**\n * Ajout d'un objet de type Request : GeocodeRequest / ReverseGeocodeRequest / RouteRequest\n *\n * @param {Object} oRequest - GeocodeRequest / ReverseGeocodeRequest / RouteRequest\n */\n addRequest : function (oRequest) {\n this.logger.error(\"overwritten method !\");\n },\n\n /**\n * Ajout d'un objet de type FilterExtension : GeocodeFilterExtension ou RouteRequestExtension\n *\n * @param {Object} oFilter - GeocodeFilterExtension ou RouteRequestExtension\n */\n addFilter : function (oFilter) {\n this.logger.error(\"overwritten method !\");\n },\n\n /**\n * toString\n */\n toString : function () {\n this.logger.error(\"overwritten method !\");\n }\n};\n\nexport default AbstractService;\n" - }, - { - "id": 13, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService/GeocodeFilterExtension.js", - "name": "./src/Formats/XLS/LocationUtilityService/GeocodeFilterExtension.js", - "index": 57, - "index2": 50, - "size": 5425, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "issuerId": 64, - "issuerName": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "profile": { - "factory": 58, - "building": 790, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 38, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService.js", - "module": "./src/Formats/XLS/LocationUtilityService.js", - "moduleName": "./src/Formats/XLS/LocationUtilityService.js", - "type": "harmony import", - "userRequest": "./LocationUtilityService/GeocodeFilterExtension", - "loc": "5:0-85" - }, - { - "moduleId": 64, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "module": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "moduleName": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "type": "harmony import", - "userRequest": "../../../Formats/XLS/LocationUtilityService/GeocodeFilterExtension", - "loc": "12:0-104" - }, - { - "moduleId": 67, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService/GeocodeRequest.js", - "module": "./src/Formats/XLS/LocationUtilityService/GeocodeRequest.js", - "moduleName": "./src/Formats/XLS/LocationUtilityService/GeocodeRequest.js", - "type": "harmony import", - "userRequest": "./GeocodeFilterExtension", - "loc": "3:0-62" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "\nimport Logger from \"../../../Utils/LoggerByDefault\";\n\n/**\n * @classdesc\n *\n * Ajouter des extensions de filtres spécifiques au service de geocodage de l'IGN.\n * Ceci permet de contrôler les options spécifiques de la table de geocodage intérrogées.\n *\n * @example\n * var ext = new GeocodeFiltersExtension ();\n * ext.add (new Administratif ());\n * ext.add (new StreetAddress ());\n * ext.add (new PositionOfInterest ());\n * ext.add (new CadastralParcel ());\n *\n * ext.getNames ()\n * // --> out\n * // [Administratif, StreetAddress, PositionOfInterest, CadastralParcel]\n *\n * ext.getFilters ()\n * // --> out\n * // [Object, Object, Object, Object] = tableau d'objet GeocodeLocation\n *\n * ext.getFilter ('StreetAddress')\n * // --> out\n * // {Object} = objet GeocodeLocation\n *\n * ext.getAttributs ('StreetAddress')\n * // --> out\n * // [\"bbox\", \"number\", \"ID\", \"IDTR\", \"postalCode\", \"quality\", \"street\", \"territoire\", \"commune\", \"department\", \"insee\", \"municipality\"]\n *\n * ext.setPlaceAttributs ('StreetAddress', {number:'', territoire:'', quality:'', fake:''})\n * // --> out\n * // (fake est écarté car il n'appartient pas à la liste !)\n *\n * ext.getPlaceAttributs ('StreetAddress')\n * // --> out\n * // {number : '', territoire : '', quality : ''}\n *\n * // Comment ajouter des filtres spécifiques au service de geocodage ?\n * var req = new GeocodeRequest ({\n * location : \"saint mandé\",\n * returnFreeForm : true,\n * filterOptions : {\n * type : ['PositionOfInterest'], <-- ajouter une extension afin de gerer les attributs de cette table de geocodage !\n * (...)\n * }\n * })\n * req.addFilter (new PositionOfInterest ());\n * @constructor\n * @alias Gp.Formats.XLS.LocationUtilityService.GeocodeFilterExtension\n *\n * @private\n */\nfunction GeocodeFilterExtension () {\n this.logger = Logger.getLogger(\"GeocodeFilterExtension\");\n this.logger.trace(\"[Constructeur GeocodeFilterExtension ()]\");\n\n if (!(this instanceof GeocodeFilterExtension)) {\n throw new TypeError(\"GeocodeFilterExtension constructor cannot be called as a function.\");\n }\n\n /**\n * Tableau de filtres (table de geocodage)\n */\n this.filters = [];\n}\n\n/**\n * @lends module:GeocodeFilterExtension#\n */\nGeocodeFilterExtension.prototype = {\n\n /**\n * Constructeur (alias)\n */\n constructor : GeocodeFilterExtension,\n\n /**\n * Ajout d'un filtre\n *\n * @param {Object} oGeocodeLocation - objet de type 'GeocodeLocation'\n */\n addFilterExtensions : function (oGeocodeLocation) {\n // FIXME test sur le type d'objet !\n if (oGeocodeLocation) {\n // FIXME ou test sur ses propriétés !\n this.filters.push(oGeocodeLocation);\n }\n },\n\n // getter\n\n /**\n * Tableau de noms (tables de geocodage)\n *\n * @returns {Array.} liste des noms de filtres\n */\n getNames : function () {\n var names = [];\n for (var idx in this.filters) {\n names.push(this.filters[idx].CLASSNAME);\n }\n this.logger.trace(names);\n return names;\n },\n\n /**\n * Retourne une table de geocodage\n *\n * @param {String} name - nom de la table de geocodage\n * @returns {Object} filtre\n */\n getFilter : function (name) {\n var filter = null;\n for (var idx in this.filters) {\n if (this.filters[idx].CLASSNAME === name) {\n filter = this.filters[idx];\n }\n }\n this.logger.trace(filter);\n return filter;\n },\n\n /**\n * Tableau d'objects (tables de geocodage)\n *\n * @returns {Array.} liste des filtres\n */\n getFilters : function () {\n this.logger.trace(this.filters);\n return this.filters;\n },\n\n /**\n * Récupère la liste des attributs (filtres) sur une table de geocodage\n *\n * @param {String} name - nom de la table de geocodage\n * @returns {Array} liste des attributs d'un filtre\n */\n getAttributs : function (name) {\n var attributs = [];\n for (var idx in this.filters) {\n if (this.filters[idx].CLASSNAME === name) {\n attributs = this.filters[idx].attributesList;\n }\n }\n this.logger.trace(attributs);\n return attributs;\n },\n\n /**\n * Ajout des attributs (filtres) sur une table de geocodage\n *\n * @param {String} name - nom de la table de geocodage\n * @param {Object} options - options de la table de geocodage\n */\n setPlaceAttributs : function (name, options) {\n var filter = this.getFilter(name);\n var attributs = this.getAttributs(name);\n for (var idx in attributs) {\n var value = attributs[idx];\n if (options[value]) {\n filter.placeAttributes[value] = options[value];\n }\n }\n },\n\n /**\n * Retourne les attributs (filtres) sur une table de geocodage\n *\n * @param {String} name - nom de la table de geocodage\n * @returns {Array} liste des attributs d'un filtre\n */\n getPlaceAttributs : function (name) {\n var places = {};\n for (var idx in this.filters) {\n if (this.filters[idx].CLASSNAME === name) {\n places = this.filters[idx].placeAttributes;\n }\n }\n this.logger.trace(places);\n return places;\n }\n};\n\nexport default GeocodeFilterExtension;\n" - }, - { - "id": 14, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Response/model/GeocodeResponse.js", - "name": "./src/Services/Geocode/Response/model/GeocodeResponse.js", - "index": 68, - "index2": 62, - "size": 746, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 60, - "building": 546 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/Geocode/Response/model/GeocodeResponse", - "loc": "21:0-80" - }, - { - "moduleId": 77, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Formats/DirectGeocodeResponseReader.js", - "module": "./src/Services/Geocode/Formats/DirectGeocodeResponseReader.js", - "moduleName": "./src/Services/Geocode/Formats/DirectGeocodeResponseReader.js", - "type": "harmony import", - "userRequest": "../Response/model/GeocodeResponse", - "loc": "14:0-64" - }, - { - "moduleId": 81, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Formats/ReverseGeocodeResponseReader.js", - "module": "./src/Services/Geocode/Formats/ReverseGeocodeResponseReader.js", - "moduleName": "./src/Services/Geocode/Formats/ReverseGeocodeResponseReader.js", - "type": "harmony import", - "userRequest": "../Response/model/GeocodeResponse", - "loc": "14:0-71" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\n/**\n * Response object for {@link module:Services~geocode Gp.Services.geocode ()} or {@link module:Services~reverseGeocode Gp.Services.reverseGeocode ()} invocation when successful. Received as the argument of onSuccess callback function.\n *\n * @property {Array.} locations - locations array.\n *\n * @namespace\n * @alias Gp.Services.GeocodeResponse\n */\nfunction GeocodeResponse () {\n if (!(this instanceof GeocodeResponse)) {\n throw new TypeError(\"GeocodeResponse constructor cannot be called as a function.\");\n }\n\n this.locations = [];\n}\n\nGeocodeResponse.prototype = {\n\n constructor : GeocodeResponse\n\n};\n\nexport default GeocodeResponse;\n" - }, - { - "id": 15, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Response/model/GeocodedLocation.js", - "name": "./src/Services/Geocode/Response/model/GeocodedLocation.js", - "index": 70, - "index2": 63, - "size": 3024, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 60, - "building": 556 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 39, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Response/model/DirectGeocodedLocation.js", - "module": "./src/Services/Geocode/Response/model/DirectGeocodedLocation.js", - "moduleName": "./src/Services/Geocode/Response/model/DirectGeocodedLocation.js", - "type": "harmony import", - "userRequest": "./GeocodedLocation", - "loc": "2:0-50" - }, - { - "moduleId": 40, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Response/model/ReverseGeocodedLocation.js", - "module": "./src/Services/Geocode/Response/model/ReverseGeocodedLocation.js", - "moduleName": "./src/Services/Geocode/Response/model/ReverseGeocodedLocation.js", - "type": "harmony import", - "userRequest": "./GeocodedLocation", - "loc": "2:0-50" - }, - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/Geocode/Response/model/GeocodedLocation", - "loc": "22:0-82" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\n/**\n * Location object holding common properties returned by the underlying geocoding and reverse geocoding web service.\n *\n * @property {Gp.Point} position - Position of the location given in the requested coordinates system.\n * @property {String} type - location type \"StreetAddress\" (for an address), \"PositionOfInterest\" (for a place name) or \"CadastralParcel\" (for cadastral parcel).\n * @property {String} matchType - how geocoding is performed : \"street number\" (exact address), \"street enhanced\" (street number calculated by interpolation), \"street\" (only the street), \"city\" (only the city).\n * @property {Object} placeAttributes - Associative array matching the following attributes with their values given by the underlying web service :\n *\n * *Common attributes : *\n *\n * - **freeform** - freeform complete Address.\n * - **bbox** - Bounding Box *{@link Gp.BBox}*.\n * - **municipality** - Municipality\n *\n * *if type === \"StreetAddress\" : *\n *\n * - **number** - Street number.\n * - **ID** - Identifier of the address in the [BD ADRESSE Database]{@link http://professionnels.ign.fr/bdadresse}.\n * - **IDTR** - Identifier of the lineString in the [BD ADRESSE Database]{@link http://professionnels.ign.fr/bdadresse}.\n * - **postalCode** - PostCode\n * - **quality** - Geocoding quality ([see]{@link http://api.ign.fr/tech-docs-js/developpeur/search.html})\n * - **street** - Street name\n * - **territory** - French Territory code\n * - **commune** - City\n * - **department** - Department\n * - **insee** - INSEE Code\n *\n *\n * *if type === \"PositionOfInterest\" :*\n *\n * - **importance** - Place name importance\n * - **nature** - Place name nature\n * - **postalCode** - PostCode\n * - **territory** - French Territory code\n * - **commune** - City\n * - **department** - Department\n * - **insee** - INSEE Code\n *\n *\n * *si type = \"CadastralParcel\" :*\n *\n * - **absorbedCity** - when a parcel comes from a city that was absorbed by another, code of that old city. \"000\" otherwise.\n * - **arrondissement** - arrondissement\n * - **cadastralParcel** - cadastral parcel code\n * - **district** - district\n * - **sheet** - Parcel Sheet (eg. \"1\").\n * - **number** - Parcel Number (eg. \"0041\")\n * - **section** - Parcel Section (eg. \"0D\").\n * - **commune** - Parcel municipality.\n * - **department** - Parcel Department.\n * - **insee** - INSEE Code.\n * - **origin** - Parcel origin (see \"type\" attribute in the [underlying web service response]{@link http://api.ign.fr/tech-docs-js/developpeur/search.html#Cadastral_parcels_search})\n *\n * @namespace\n * @alias Gp.Services.Geocode.GeocodedLocation\n */\nfunction GeocodedLocation () {\n if (!(this instanceof GeocodedLocation)) {\n throw new TypeError(\"GeocodedLocation constructor cannot be called as a function.\");\n }\n\n this.position = {\n x : null,\n y : null\n };\n\n this.matchType = null;\n\n this.placeAttributes = {};\n\n this.type = null;\n}\n\nGeocodedLocation.prototype = {\n\n constructor : GeocodedLocation\n\n};\n\nexport default GeocodedLocation;\n" - }, - { - "id": 16, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Response/model/RouteResponse.js", - "name": "./src/Services/Route/Response/model/RouteResponse.js", - "index": 92, - "index2": 86, - "size": 1557, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 61, - "building": 602 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/Route/Response/model/RouteResponse", - "loc": "26:0-74" - }, - { - "moduleId": 93, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Response/RouteResponseFactory.js", - "module": "./src/Services/Route/Response/RouteResponseFactory.js", - "moduleName": "./src/Services/Route/Response/RouteResponseFactory.js", - "type": "harmony import", - "userRequest": "./model/RouteResponse", - "loc": "16:0-50" - }, - { - "moduleId": 94, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Formats/RouteResponseRESTReader.js", - "module": "./src/Services/Route/Formats/RouteResponseRESTReader.js", - "moduleName": "./src/Services/Route/Formats/RouteResponseRESTReader.js", - "type": "harmony import", - "userRequest": "../Response/model/RouteResponse", - "loc": "14:0-60" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "/**\n * Response object for {@link module:Services~route Gp.Services.route ()} invocation when successful. Received as the argument of onSuccess callback function.\n *\n * @property {Gp.BBox} bbox - Bounding Box of the route. Given when provideBBox parameter is used in function call.\n * @property {Object} routeGeometry - Geometry (expressed in [GeoJSON]{@link http://geojson.org/}) of the route.\n * @property {Array.} routeInstructions - Instructions of the route.\n * @property {String} totalDistance - Length of the route. If distanceUnit parameter was set to \"km\" (default), totalDistance is a string containing the total distance expressed in kilometers, followed by \" Km\" (e.g. : \"19.6 Km\"). If distanceUnit parameter was set to \"m\", totalDistance is a string containing the total distance expressed in meters (e.g. : \"19599.14\").\n * @property {Float} totalTime - Route duration in seconds.\n *\n * @namespace\n * @alias Gp.Services.RouteResponse\n */\nfunction RouteResponse () {\n if (!(this instanceof RouteResponse)) {\n throw new TypeError(\"RouteResponse constructor cannot be called as a function.\");\n }\n\n this.totalTime = null;\n\n this.totalDistance = null;\n\n this.bbox = {\n left : null,\n right : null,\n top : null,\n bottom : null\n };\n\n this.routeGeometry = null; // FIXME can be null if option 'geometryInInstructions' is true !\n\n this.routeInstructions = [];\n}\n\nRouteResponse.prototype = {\n\n constructor : RouteResponse\n\n};\n\nexport default RouteResponse;\n" - }, - { - "id": 17, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Response/model/RouteInstruction.js", - "name": "./src/Services/Route/Response/model/RouteInstruction.js", - "index": 93, - "index2": 87, - "size": 1342, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 62, - "building": 615 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/Route/Response/model/RouteInstruction", - "loc": "27:0-80" - }, - { - "moduleId": 93, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Response/RouteResponseFactory.js", - "module": "./src/Services/Route/Response/RouteResponseFactory.js", - "moduleName": "./src/Services/Route/Response/RouteResponseFactory.js", - "type": "harmony import", - "userRequest": "./model/RouteInstruction", - "loc": "17:0-56" - }, - { - "moduleId": 94, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Formats/RouteResponseRESTReader.js", - "module": "./src/Services/Route/Formats/RouteResponseRESTReader.js", - "moduleName": "./src/Services/Route/Formats/RouteResponseRESTReader.js", - "type": "harmony import", - "userRequest": "../Response/model/RouteInstruction", - "loc": "15:0-66" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\n/**\n * Single Route Instruction object.\n *\n * @property {String} code - Instruction code :\n *\n * - \"F\" : Straight forward\n * - \"B\" : U-turn\n * - \"L\" : turn left\n * - \"R\" : turn right\n * - \"BL\" : turn left strongly\n * - \"BR\" : turn right strongly\n * - \"FL\" : turn lightly to the left\n * - \"FR\" : turn lightly to the right\n * - \"round_about_entry\" : round about entry\n * - \"round_about_exit\" : round about exit\n *\n * @property {String} instruction - Instruction text : translated code + street name\n * @property {Object} geometry - Geometry (expressed in [GeoJSON]{@link http://geojson.org/}) of the street.\n * @property {Float} distance - Length of the instruction. Expressed in km or m, depending on distanceUnit parameter.\n * @property {Float} duration - Instruction duration in seconds.\n *\n * @namespace\n * @alias Gp.Services.Route.RouteInstruction\n */\nfunction RouteInstruction () {\n if (!(this instanceof RouteInstruction)) {\n throw new TypeError(\"RouteInstruction constructor cannot be called as a function.\");\n }\n\n this.duration = null;\n\n this.distance = null;\n\n this.code = null;\n\n this.instruction = null;\n\n this.geometry = null; // FIXME can be null if option 'geometryInInstructions' is false !\n}\n\nRouteInstruction.prototype = {\n\n constructor : RouteInstruction\n\n};\n\nexport default RouteInstruction;\n" - }, - { - "id": 18, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Response/model/ProcessIsoCurveResponse.js", - "name": "./src/Services/ProcessIsoCurve/Response/model/ProcessIsoCurveResponse.js", - "index": 100, - "index2": 94, - "size": 1395, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 61, - "building": 591 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/ProcessIsoCurve/Response/model/ProcessIsoCurveResponse", - "loc": "25:0-97" - }, - { - "moduleId": 99, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "module": "./src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "moduleName": "./src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "type": "harmony import", - "userRequest": "./model/ProcessIsoCurveResponse", - "loc": "15:0-70" - }, - { - "moduleId": 100, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Formats/ProcessIsoCurveResponseReader.js", - "module": "./src/Services/ProcessIsoCurve/Formats/ProcessIsoCurveResponseReader.js", - "moduleName": "./src/Services/ProcessIsoCurve/Formats/ProcessIsoCurveResponseReader.js", - "type": "harmony import", - "userRequest": "../Response/model/ProcessIsoCurveResponse", - "loc": "13:0-80" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\n/**\n * Response object for {@link module:Services~isoCurve Gp.Services.isoCurve ()} invocation when successful. Received as the argument of onSuccess callback function.\n *\n * @property {Float} distance - distance (expressed in meters) used for the request.\n * @property {Float} time - time (expressed in seconds) used for the request.\n * @property {Object} geometry - Geometry (expressed in [GeoJSON]{@link http://geojson.org/}) of the isocurve.\n * @property {String} id - request id (used by underlying webservice).\n * @property {Gp.Point} location - Position of the start or end point used for the request (expressed in \"srs\" coordinates system).\n * @property {String} message - message\n * @property {String} srs - Identifier of the coordinates system used for the isocurve.\n *\n * @namespace\n * @alias Gp.Services.IsoCurveResponse\n *\n */\nfunction ProcessIsoCurveResponse () {\n if (!(this instanceof ProcessIsoCurveResponse)) {\n throw new TypeError(\"ProcessIsoCurveResponse constructor cannot be called as a function.\");\n }\n\n this.message = null;\n\n this.id = null;\n\n this.location = {};\n this.location.x = null;\n this.location.y = null;\n\n this.srs = null;\n\n this.geometry = null;\n\n this.time = null;\n\n this.distance = null;\n}\n\nProcessIsoCurveResponse.prototype = {\n\n constructor : ProcessIsoCurveResponse\n\n};\n\nexport default ProcessIsoCurveResponse;\n" - }, - { - "id": 19, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Protocols/XHR.js", - "name": "./src/Protocols/XHR.js", - "index": 11, - "index2": 10, - "size": 16159, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 55, - "building": 232, - "dependencies": 2 - }, - "failed": false, - "errors": 0, - "warnings": 1, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Protocols/XHR", - "loc": "28:0-34" - }, - { - "moduleId": 48, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Protocols/Protocol.js", - "module": "./src/Protocols/Protocol.js", - "moduleName": "./src/Protocols/Protocol.js", - "type": "harmony import", - "userRequest": "./XHR", - "loc": "9:0-24" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "/* global Promise, require */\n\nimport Logger from \"../Utils/LoggerByDefault\";\nimport Helper from \"../Utils/Helper\";\nimport ES6Promise from \"es6-promise\";\n// import __request from \"request\";\n// import __xmldom from \"xmldom\";\n\n/**\n * Requêtes Ajax (utilisation des Promises)\n * cf. https://xhr.spec.whatwg.org/\n * cf. https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest\n *\n * @module XHR\n * @private\n * @alias Gp.Protocols.XHR\n * @see dependance 'promise'\n */\n\nvar XHR = {\n\n /**\n * Interface unique d'envoi d'une requête.\n *\n * @method call\n * @static\n * @param {Object} settings - options generales\n * @param {String} settings.url - url du service\n * @param {String} settings.method - GET, POST, PUT, DELETE\n * @param {String} settings.format - format de la reponse du service : json, xml ou null (brute)\n * @param {String} settings.data - content (post) ou param (get)\n * @param {String} settings.proxy - proxy url\n * @param {Object|String} settings.headers - (post) ex. referer\n * @param {Object|String} settings.content - (post) ex. 'application/json'\n * @param {String} settings.timeOut - timeout = 0 par defaut\n * @param {String} settings.scope - this\n * @param {Function} settings.onResponse - callback\n * @param {Function} settings.onFailure - callback\n */\n call : function (settings) {\n // logger\n var logger = Logger.getLogger(\"XHR\");\n logger.trace(\"[XHR::call()]\");\n\n // FIXME\n // To polyfill the global environment\n ES6Promise.polyfill();\n\n // test sur les settings obligatoires\n if (!settings.url) {\n throw new Error(\"missing parameter : url is not defined !\");\n }\n\n if (!settings.method) {\n throw new Error(\"missing parameter : method is not defined !\");\n }\n\n if (!settings.format) {\n settings.format = \"text\"; // reponse brute !\n }\n\n var options = {};\n options.url = settings.url;\n options.data = settings.data ? settings.data : null;\n options.method = settings.method;\n options.timeOut = settings.timeOut || 0;\n options.scope = settings.scope || this;\n options.proxy = settings.proxy || null;\n options.content = settings.content || null;\n options.headers = settings.headers || {\n referer : \"http://localhost\"\n };\n\n // test sur les valeurs de 'settings.method'\n switch (settings.method) {\n case \"DELETE\":\n case \"GET\":\n break;\n case \"PUT\":\n case \"POST\":\n // on force sur ces params spécifiques au mode POST\n options.content = settings.content ? settings.content : \"application/x-www-form-urlencoded\"; // FIXME en attente des services : bascule en \"application/xml\" ou \"application/json\"\n options.headers = settings.headers ? settings.headers : {\n referer : \"http://localhost\" // todo ...\n };\n break;\n case \"HEAD\":\n case \"OPTIONS\":\n throw new Error(\"HTTP method not yet supported !\");\n default:\n throw new Error(\"HTTP method unknown !\");\n }\n\n // test sur les valeurs de 'settings.format'\n switch (settings.format) {\n case \"text\":\n this.__call(options)\n .then(function (response) {\n logger.trace(response);\n settings.onResponse.call(this, response);\n })\n .catch(function (error) {\n settings.onFailure.call(this, error);\n });\n break;\n case \"json\":\n this.__callJSON(options)\n .then(function (response) {\n logger.trace(response);\n settings.onResponse.call(this, response);\n })\n .catch(function (error) {\n settings.onFailure.call(this, error);\n });\n break;\n case \"xml\":\n this.__callXML(options)\n .then(function (response) {\n logger.trace(response);\n settings.onResponse.call(this, response);\n })\n .catch(function (error) {\n settings.onFailure.call(this, error);\n });\n break;\n default:\n throw new Error(\"This output Format is not yet supported !\");\n }\n },\n\n /**\n * Requete\n *\n * @method __call\n * @private\n * @param {Object} options - options\n * @return {Object} promise\n */\n __call : function (options) {\n var logger = Logger.getLogger(\"XHR\");\n logger.trace(\"[XHR::__call()]\");\n\n var promise = new Promise(\n function (resolve, reject) {\n // traitement du corps de la requête\n var corps = (options.method === \"POST\" || options.method === \"PUT\") ? 1 : 0;\n\n // seulement si options.data n'est pas vide (peut être un objet ou une chaine de caractères)\n if (options.data && ((typeof options.data === \"object\" && Object.keys(options.data).length) || (typeof options.data === \"string\" && options.data.length)) && !corps) {\n options.url = Helper.normalyzeUrl(options.url, options.data);\n }\n\n logger.trace(\"URL = \", options.url);\n\n var hXHR = null;\n\n // test on env. nodejs or browser\n if (typeof window === \"undefined\") {\n // Utilisation du module :\n // cf. http://blog.modulus.io/node.js-tutorial-how-to-use-request-module\n\n var req = require(\"request\");// __request\n\n // mapping data avec body param. pour le mode POST ou PUT (?)\n if (options.data && typeof options.data === \"string\" && corps) {\n options.body = options.data;\n }\n\n // FIXME ERROR : self signed certificate in certificate chain\n options.rejectUnauthorized = false;\n\n req(options, function (error, response, body) {\n if (!error && response.statusCode === 200 && body) {\n resolve(body);\n } else {\n reject(\"Errors Occured on Http Request (nodejs) : \" + error);\n }\n });\n } else {\n if (window.XMLHttpRequest) {\n logger.trace(\"XMLHttpRequest\");\n\n hXHR = new XMLHttpRequest();\n hXHR.open(options.method, options.url, true); // async\n hXHR.overrideMimeType = options.content;\n\n // gestion du timeout\n var onTimeOutTrigger = null;\n if (options.timeOut > 0) {\n // FIXME le timeout interne ne me permet pas de declencher le bon message...\n // hXHR.timeout = options.timeOut;\n logger.trace(\"XHR - TimeOut actif !\");\n /**\n * Description\n *\n * @method onTimeOutTrigger\n * @private\n */\n onTimeOutTrigger = window.setTimeout(\n function () {\n var message = \"TimeOut Occured on Http Request with XMLHttpRequest !\";\n reject({\n message : message,\n status : -1\n });\n }, options.timeOut);\n }\n\n if (corps) {\n // headers, data, content of data\n // cf. https://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#dom-xmlhttprequest-setrequestheader\n logger.trace(\"data = \", options.data);\n hXHR.setRequestHeader(\"Content-type\", options.content);\n // FIXME refused to set unsafe header content-length javascript\n // hXHR.setRequestHeader (\"Content-length\", options.data.length);\n // hXHR.setRequestHeader (\"Referer\", options.headers.referer);\n }\n\n /**\n * On Error\n * FIXME ne se declenche pas !?\n *\n * @param {Object} e - Event\n * @method onerror\n * @private\n */\n hXHR.onerror = function (e) {\n console.log(e);\n reject(new Error(\"Errors Occured on Http Request with XMLHttpRequest !\"));\n };\n\n /**\n * On Timeout\n * FIXME ne se declenche pas !?\n *\n * @param {Object} e - Event\n * @method ontimeout\n * @private\n */\n hXHR.ontimeout = function () {\n reject(new Error(\"TimeOut Occured on Http Request with XMLHttpRequest !\"));\n };\n\n /**\n * Description\n *\n * @method onreadystatechange\n * @private\n */\n hXHR.onreadystatechange = function () {\n if (hXHR.readyState === 4) { // DONE\n if (hXHR.status === 200) {\n window.clearTimeout(onTimeOutTrigger);\n resolve(hXHR.response);\n } else {\n var message = \"Errors Occured on Http Request (status : '\" + hXHR.status + \"' | response : '\" + hXHR.response + \"')\";\n var status = hXHR.status;\n reject({\n message : message,\n status : status\n });\n }\n }\n };\n\n // gestion du content data\n var data4xhr = (options.data && corps) ? options.data : null;\n\n hXHR.send(data4xhr);\n } else if (window.XDomainRequest) {\n // worked in Internet Explorer 8–10 only !\n logger.trace(\"XDomainRequest\");\n\n hXHR = new XDomainRequest();\n hXHR.open(options.method, options.url);\n\n hXHR.overrideMimeType = options.content;\n\n if (options.timeOut > 0) {\n hXHR.timeout = options.timeout;\n logger.trace(\"XHR - TimeOut actif !\");\n }\n\n if (corps) {\n // headers, data, content of data\n // cf. https://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#dom-xmlhttprequest-setrequestheader\n hXHR.setRequestHeader(\"Content-type\", options.content);\n // FIXME refused to set unsafe header content-length javascript\n // hXHR.setRequestHeader (\"Content-length\", options.data.length);\n // hXHR.setRequestHeader (\"Referer\", options.headers.referer);\n }\n\n /**\n * Description\n *\n * @method onerror\n * @private\n */\n hXHR.onerror = function () {\n reject(new Error(\"Errors Occured on Http Request with XMLHttpRequest !\"));\n };\n\n /**\n * Description\n *\n * @method ontimeout\n * @private\n */\n hXHR.ontimeout = function () {\n reject(new Error(\"TimeOut Occured on Http Request with XMLHttpRequest !\"));\n };\n\n /**\n * On Load\n *\n * @method onload\n * @private\n */\n hXHR.onload = function () {\n if (hXHR.status === 200) {\n resolve(hXHR.responseText);\n } else {\n var message = \"Errors Occured on Http Request (status : '\" + hXHR.status + \"' | response : '\" + hXHR.responseText + \"')\";\n var status = hXHR.status;\n reject({\n message : message,\n status : status\n });\n }\n };\n\n var data4xdr = (options.data && corps) ? options.data : null;\n\n hXHR.send(data4xdr);\n } else {\n throw new Error(\"CORS not supported\");\n }\n }\n }\n );\n\n return promise;\n },\n\n /**\n * Requete avec parser JSON\n *\n * @method __callJSON\n * @private\n * @param {Object} options - options\n * @return {Object} promise\n */\n __callJSON : function (options) {\n return this.__call(options)\n .then(JSON.parse)\n .catch(function (error) {\n console.log(\"_callJSON failed on : \", options.url, error);\n // FIXME pas d'exception, laissons le fil se derouler...\n // throw error;\n });\n },\n\n /**\n * Requete avec parser XML\n *\n * @method __callXML\n * @private\n * @param {Object} options - options\n * @return {Object} promise\n */\n __callXML : function (options) {\n return this.__call(options)\n .then(function (response) {\n var xmlDoc;\n\n // test on env. nodejs or browser\n if (typeof window === \"undefined\") {\n var DOMParser = require(\"xmldom\").DOMParser; // __xmldom.DOMParser\n xmlDoc = new DOMParser().parseFromString(response, \"text/xml\");\n } else {\n if (window.DOMParser) {\n var parser = new window.DOMParser();\n xmlDoc = parser.parseFromString(response, \"text/xml\");\n } else { // IE\n xmlDoc = new window.ActiveXObject(\"Microsoft.XMLDOM\");\n xmlDoc.async = false;\n xmlDoc.loadXML(response);\n }\n }\n\n return xmlDoc;\n })\n .catch(function (error) {\n console.log(\"__callXML failed on : \", options.url, error);\n // FIXME pas d'exception, laissons le fil se derouler...\n // throw error;\n });\n }\n\n};\n\nexport default XHR;\n" - }, - { - "id": 20, - "identifier": "external {\"commonjs2\":\"xmldom\",\"commonjs\":\"xmldom\",\"amd\":\"require\"}", - "name": "external {\"commonjs2\":\"xmldom\",\"commonjs\":\"xmldom\",\"amd\":\"require\"}", - "index": 16, - "index2": 9, - "size": 42, - "cacheable": false, - "built": false, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Protocols/XHR.js", - "issuerId": 19, - "issuerName": "./src/Protocols/XHR.js", - "profile": { - "factory": 1, - "building": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 6, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XML.js", - "module": "./src/Formats/XML.js", - "moduleName": "./src/Formats/XML.js", - "type": "cjs require", - "userRequest": "xmldom", - "loc": "189:24-41" - }, - { - "moduleId": 19, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Protocols/XHR.js", - "module": "./src/Protocols/XHR.js", - "moduleName": "./src/Protocols/XHR.js", - "type": "cjs require", - "userRequest": "xmldom", - "loc": "378:36-53" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [], - "depth": 3 - }, - { - "id": 21, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/model/AltiElevationRequest.js", - "name": "./src/Services/Alti/Request/model/AltiElevationRequest.js", - "index": 21, - "index2": 16, - "size": 2236, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestREST.js", - "issuerId": 55, - "issuerName": "./src/Services/Alti/Request/AltiRequestREST.js", - "profile": { - "factory": 801, - "building": 229, - "dependencies": 42 - }, - "failed": false, - "errors": 0, - "warnings": 1, - "reasons": [ - { - "moduleId": 55, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestREST.js", - "module": "./src/Services/Alti/Request/AltiRequestREST.js", - "moduleName": "./src/Services/Alti/Request/AltiRequestREST.js", - "type": "harmony import", - "userRequest": "./model/AltiElevationRequest", - "loc": "5:0-64" - }, - { - "moduleId": 56, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestWPS.js", - "module": "./src/Services/Alti/Request/AltiRequestWPS.js", - "moduleName": "./src/Services/Alti/Request/AltiRequestWPS.js", - "type": "harmony import", - "userRequest": "./model/AltiElevationRequest", - "loc": "12:0-64" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 6, - "source": "\nimport Logger from \"../../../../Utils/LoggerByDefault\";\nimport AltiRequest from \"./AltiRequest\";\n\n/**\n * @classdesc\n *\n * Classe de gestion des param. des requêtes de type POINT du service altimetrique.\n *\n * @constructor\n * @alias Gp.Services.Alti.Request.AltiElevationRequest\n * @param {Object} options - options\n * @param {Boolean} options.zonly - false|true\n *\n * @private\n */\nfunction AltiElevationRequest (options) {\n if (!(this instanceof AltiElevationRequest)) {\n throw new TypeError(\"AltiElevationRequest constructor cannot be called as a function.\");\n }\n\n /**\n * Nom de la classe (heritage)\n */\n this.CLASSNAME = \"AltiElevationRequest\";\n\n // appel du constructeur par heritage\n AltiRequest.apply(this, arguments);\n\n this.logger = Logger.getLogger();\n this.logger.trace(\"[Constructeur AltiElevationRequest ()]\");\n\n /**\n * Z uniquement.\n * true|false\n */\n this.zonly = this.options.zonly || false; // test des options héritées !\n}\n\n/**\n * @lends module:AltiElevationRequest#\n */\n\nAltiElevationRequest.prototype = Object.create(AltiRequest.prototype, {\n\n /**\n * Setter/getter pour \"zonly\"\n */\n zonly : {\n /** getter */\n get : function () {\n return this._zonly;\n },\n /** setter */\n set : function (z) {\n this._zonly = z;\n }\n }\n\n});\n\n/**\n * Constructeur (alias)\n */\nAltiElevationRequest.prototype.constructor = AltiElevationRequest;\n\n/**\n * Tableau de clefs/valeurs pour param.\n *\n * @returns {Array}\n */\nAltiElevationRequest.prototype.getData = function () {\n // par glop..., appel de AltiRequest::getData () !\n var map = [];\n map.push({\n k : \"lon\",\n v : this.getLon()\n });\n map.push({\n k : \"lat\",\n v : this.getLat()\n });\n // map.push({k : \"delimiter\", v : this.delimiter}); // FIXME on retire le param \"delimiter\"\n map.push({\n k : \"indent\",\n v : this.indent\n });\n map.push({\n k : \"crs\",\n v : this.crs\n });\n map.push({\n k : \"zonly\",\n v : this.zonly\n });\n map.push({\n k : \"format\",\n v : this.format\n });\n\n return map;\n};\n\nexport default AltiElevationRequest;\n" - }, - { - "id": 22, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/model/AltiRequest.js", - "name": "./src/Services/Alti/Request/model/AltiRequest.js", - "index": 22, - "index2": 15, - "size": 4903, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/model/AltiProfilRequest.js", - "issuerId": 23, - "issuerName": "./src/Services/Alti/Request/model/AltiProfilRequest.js", - "profile": { - "factory": 55, - "building": 96, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 1, - "reasons": [ - { - "moduleId": 21, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/model/AltiElevationRequest.js", - "module": "./src/Services/Alti/Request/model/AltiElevationRequest.js", - "moduleName": "./src/Services/Alti/Request/model/AltiElevationRequest.js", - "type": "harmony import", - "userRequest": "./AltiRequest", - "loc": "3:0-40" - }, - { - "moduleId": 23, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/model/AltiProfilRequest.js", - "module": "./src/Services/Alti/Request/model/AltiProfilRequest.js", - "moduleName": "./src/Services/Alti/Request/model/AltiProfilRequest.js", - "type": "harmony import", - "userRequest": "./AltiRequest", - "loc": "3:0-40" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 7, - "source": "\nimport Logger from \"../../../../Utils/LoggerByDefault\";\n\n/**\n * @classdesc\n * Classe de gestion des param. des requêtes du service altimetrique.\n *\n * @constructor\n * @alias Gp.Services.Alti.Request.AltiRequest\n * @param {Object} options - options\n * @param {Object} options.positions - tableau de coordonnées lon/lat\n * @param {String} options.delimiter - \"|\"\n * @param {Boolean} options.indent - false|true\n * @param {String} options.crs - \"CRS:84\"\n * @param {String} options.format - \"JSON|XML\"\n *\n * @private\n */\nfunction AltiRequest (options) {\n if (!(this instanceof AltiRequest)) {\n throw new TypeError(\"AltiRequest constructor cannot be called as a function.\");\n }\n\n this.logger = Logger.getLogger();\n this.logger.trace(\"[Constructeur AltiRequest ()]\");\n\n /**\n * Options en paramêtres du constructeur.\n */\n this.options = options || {};\n\n /**\n * Liste des coordonnées.\n * @example\n * var c = [{lon : \"\", lat : \"\"}, {lon : \"\", lat : \"\"}];\n */\n this.positions = this.options.positions || [];\n\n /**\n * Caractère de séparation.\n * Par defaut, \"|\".\n */\n this.delimiter = this.options.delimiter || \"|\";\n\n /**\n * Indentation.\n * true|false\n */\n this.indent = this.options.indent || false;\n\n /**\n * Projection.\n * Par defaut, CRS:84.\n */\n this.crs = this.options.crs || \"CRS:84\";\n\n /**\n * format de sortie.\n * Par defaut, \"json\".\n */\n this.format = this.options.format || \"json\";\n}\n\n/**\n * CLASSNAME\n */\nAltiRequest.CLASSNAME = \"AltiRequest\";\n\nAltiRequest.prototype = {\n\n /**\n * @lends module:AltiRequest#\n */\n\n /**\n * Constructeur (alias)\n */\n constructor : AltiRequest,\n\n /**\n * Ajout d\"une liste de coordonnées.\n *\n * @param {Object[]} lstPosition - liste de positions\n * @example\n * obj.setPositions ([{lon : \"0.15\", lat : \"0.15\"}, {lon : \"1.15\", lat : \"1.15\"}]);\n */\n setPositions : function (lstPosition) {\n var positions = [];\n for (var i = 0; i < lstPosition.length; i++) {\n var o = lstPosition[i];\n if (o.lon && o.lat) {\n positions.push(o);\n }\n }\n\n this.positions = positions;\n },\n\n /**\n * Liste des coordonnées.\n *\n * @param {Int} pos - position\n * @returns {positions}\n * @example\n * obj.getPositions (); // [{lon : \"\", lat : \"\"}, {lon : \"\", lat : \"\"}]\n * obj.getPositions (0); // [{lon : \"\", lat : \"\"}]\n */\n getPositions : function (pos) {\n // FIXME test if not a number !?\n if (!pos) {\n return this.positions;\n }\n\n var index = this.positions.length - 1;\n if (pos > index || pos < index) {\n this.logger.warn(\"index out of range !\");\n return this.positions;\n }\n\n return this.positions[pos];\n },\n\n /**\n * Ajout d\"une liste de coordonnées.\n *\n * @param {Object[]} lstPosition - liste de positions\n * @example\n * obj.addPositions ([{lon : \"0.15\", lat : \"0.15\"}, {lon : \"1.15\", lat : \"1.15\"}]);\n */\n addPositions : function (lstPosition) {\n for (var i = 0; i < lstPosition.length; i++) {\n var o = lstPosition[i];\n if (o.lon && o.lat) {\n this.positions.push(lstPosition[i]);\n }\n }\n },\n\n /**\n * Retourne la liste des longitudes avec un caractère de séparation.\n *\n * @returns {String} - une liste de longitudes\n * @example\n * // out : 0.2367|2.1570|43.789|...\n */\n getLon : function () {\n var lstLon = [];\n for (var i = 0; i < this.positions.length; i++) {\n lstLon.push(this.positions[i].lon);\n }\n this.logger.trace(lstLon);\n return lstLon.join(this.delimiter);\n },\n\n /**\n * Retourne la liste des lattitudes avec un caractère de séparation.\n *\n * @returns {String} - une liste de lattitudes\n * @example\n * // out : 0.2367|2.1570|43.789|...\n */\n getLat : function () {\n var lstLat = [];\n for (var i = 0; i < this.positions.length; i++) {\n lstLat.push(this.positions[i].lat);\n }\n this.logger.trace(lstLat);\n return lstLat.join(this.delimiter);\n }\n\n};\n\n/**\n * Tableau de clefs/valeurs pour param.\n *\n * @returns {Object[]}\n */\nAltiRequest.prototype.getData = function () {\n var map = [];\n\n map.push({\n k : \"lon\",\n v : this.getLon()\n });\n map.push({\n k : \"lat\",\n v : this.getLat()\n });\n map.push({\n k : \"delimiter\",\n v : this.delimiter\n });\n map.push({\n k : \"indent\",\n v : this.indent\n });\n map.push({\n k : \"crs\",\n v : this.crs\n });\n map.push({\n k : \"format\",\n v : this.format\n });\n\n return map;\n};\n\nexport default AltiRequest;\n" - }, - { - "id": 23, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/model/AltiProfilRequest.js", - "name": "./src/Services/Alti/Request/model/AltiProfilRequest.js", - "index": 23, - "index2": 17, - "size": 2222, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestREST.js", - "issuerId": 55, - "issuerName": "./src/Services/Alti/Request/AltiRequestREST.js", - "profile": { - "factory": 801, - "building": 216, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 1, - "reasons": [ - { - "moduleId": 55, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestREST.js", - "module": "./src/Services/Alti/Request/AltiRequestREST.js", - "moduleName": "./src/Services/Alti/Request/AltiRequestREST.js", - "type": "harmony import", - "userRequest": "./model/AltiProfilRequest", - "loc": "6:0-58" - }, - { - "moduleId": 56, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestWPS.js", - "module": "./src/Services/Alti/Request/AltiRequestWPS.js", - "moduleName": "./src/Services/Alti/Request/AltiRequestWPS.js", - "type": "harmony import", - "userRequest": "./model/AltiProfilRequest", - "loc": "13:0-58" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 6, - "source": "\nimport Logger from \"../../../../Utils/LoggerByDefault\";\nimport AltiRequest from \"./AltiRequest\";\n\n/**\n * @classdesc\n * Classe de gestion des param. des requêtes de type PROFIL du service altimetrique.\n *\n * @constructor\n * @alias Gp.Services.Alti.Request.AltiProfilRequest\n * @param {Object} options - options\n * @param {String} options.sampling - 3\n *\n * @private\n */\nfunction AltiProfilRequest (options) {\n if (!(this instanceof AltiProfilRequest)) {\n throw new TypeError(\"AltiProfilRequest constructor cannot be called as a function.\");\n }\n\n /**\n * Nom de la classe (heritage)\n */\n this.CLASSNAME = \"AltiProfilRequest\";\n\n // appel du constructeur par heritage\n AltiRequest.apply(this, arguments);\n\n this.logger = Logger.getLogger();\n this.logger.trace(\"[Constructeur AltiProfilRequest ()]\");\n\n /**\n * Sampling\n * Par defaut, 3\n */\n this.sampling = this.options.sampling || 3; // test des options héritées !\n}\n\n/**\n * @lends module:AltiProfilRequest#\n */\n\nAltiProfilRequest.prototype = Object.create(AltiRequest.prototype, {\n\n /**\n * Setter/getter pour \"sampling\"\n */\n sampling : {\n /** getter */\n get : function () {\n return this._sampling;\n },\n /** setter */\n set : function (value) {\n this._sampling = value;\n }\n }\n});\n\n/**\n * Constructeur (alias)\n */\nAltiProfilRequest.prototype.constructor = AltiProfilRequest;\n\n/**\n * Tableau de clefs/valeurs pour param.\n *\n * @returns {Object[]}\n */\nAltiProfilRequest.prototype.getData = function () {\n // par glop..., appel de AltiRequest::getData () !\n var map = [];\n map.push({\n k : \"lon\",\n v : this.getLon()\n });\n map.push({\n k : \"lat\",\n v : this.getLat()\n });\n // map.push({k : \"delimiter\", v : this.delimiter}); // FIXME on retire le param \"delimiter\"\n map.push({\n k : \"indent\",\n v : this.indent\n });\n map.push({\n k : \"crs\",\n v : this.crs\n });\n map.push({\n k : \"sampling\",\n v : this.sampling\n });\n map.push({\n k : \"format\",\n v : this.format\n });\n\n return map;\n};\n\nexport default AltiProfilRequest;\n" - }, - { - "id": 24, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Response/model/AutoConfResponse.js", - "name": "./src/Services/AutoConf/Response/model/AutoConfResponse.js", - "index": 34, - "index2": 28, - "size": 6706, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 57, - "building": 343 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/AutoConf/Response/model/AutoConfResponse", - "loc": "7:0-84" - }, - { - "moduleId": 62, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "module": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "moduleName": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "type": "harmony import", - "userRequest": "../Response/model/AutoConfResponse", - "loc": "12:0-66" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\n/**\n * Response object for {@link module:Services~getConfig Gp.Services.getConfig ()} invocation when successful. Received as the argument of onSuccess callback function.\n *\n * @property {Object} generalOptions - General properties for default map configuration resources.\n * @property {Object} generalOptions.apiKeys - Object that associates apiKey (s) with an array of resources IDs availables with that key.\n * @property {String} generalOptions.title - Underlying web service Title.\n * @property {String} generalOptions.defaultGMLGFIStyle - XSL URL used by default to translate an XML GetFeatureInfo response into an HTML array.\n * @property {String} generalOptions.theme - default theme (FIXME : for what ?)\n * @property {Array.} generalOptions.wgs84Resolutions - geographical resolutions Array for each [zoom level of the Geoportal platform]{@link http://api.ign.fr/tech-docs-js/webmaster/layers.html#Geoportal_resolutions} from 0 to 21. Expressed in degrees/pixel.\n * @property {Object} layers - Associative array mapping resources availables IDs (keys) with their properties (values given as {@link Gp.Services.Config.Layer}).\n * @property {Object} territories - Associative array mapping french territories IDs (keys) with their properties (values given as {@link Gp.Services.Config.Territory}).\n * @property {Object} tileMatrixSets - Associative Array mapping TileMatrixSets IDs (keys) availables with their properties (values given as {@link Gp.Services.Config.TileMatrixSet}).\n * @property {Object} services - Associative Array mapping Geoportal web services IDs (keys) availables with their properties (values given as {@link Gp.Services.Config.Service}).\n *\n * @namespace\n * @alias Gp.Services.GetConfigResponse\n */\nfunction AutoConfResponse () {\n if (!(this instanceof AutoConfResponse)) {\n throw new TypeError(\"AutoConfResponse constructor cannot be called as a function.\");\n }\n\n this.generalOptions = {\n apiKeys : {},\n title : null,\n defaultGMLGFIStyle : null,\n theme : null,\n wgs84Resolutions : []\n };\n\n this.layers = {};\n\n this.territories = {};\n\n this.tileMatrixSets = {};\n\n this.services = {};\n}\n\nAutoConfResponse.prototype = {\n\n /*\n * Constructor (alias)\n */\n constructor : AutoConfResponse,\n\n /**\n * Check if config is loaded for a given key\n *\n * @param {String} apiKey - Access key to Geoportal platform\n * @returns {Boolean} isConfLoaded - true if config is already loaded, false otherwise\n */\n isConfLoaded : function (apiKey) {\n if (!apiKey) {\n return;\n }\n if (this.generalOptions.apiKeys[apiKey]) {\n return true;\n }\n return false;\n },\n\n /**\n * Returns an array of Geoportal layers identifiers, corresponding to an API contract key.\n *\n * @param {String} apiKey - Access key to Geoportal platform\n * @returns {Array} apiKeys - Array of geoportal layers identifiers\n */\n getLayersId : function (apiKey) {\n return this.generalOptions.apiKeys[apiKey];\n },\n\n /**\n * Returns an associative array of Geoportal layers configurations, corresponding to an API contract key.\n * If no key is specified, all layers from configuration are returned.\n *\n * @param {String} apiKey - Access key to Geoportal platform\n * @returns {Object} layers - Object which properties are layers identifiers, and corresponding\n * values are instances of .\n */\n getLayersConf : function (apiKey) {\n var layers = {};\n var layersIdArray = this.getLayersId(apiKey);\n if (layersIdArray) {\n for (var i = 0; i < layersIdArray.length; i++) {\n var lyrId = layersIdArray[i];\n layers[lyrId] = this.layers[lyrId];\n }\n }\n return layers;\n },\n\n /**\n * Returns a geoportal layer configuration, given its identifier\n *\n * @param {String} layerId - Geoportal layer identifier (e.g. \"GEOGRAPHICALGRIDSYSTEMS.MAPS$GEOPORTAIL:OGC:WMTS\")\n * @return {Object} layer - Layer configuration : instance of {@link Gp.Services.Config.Layer}\n */\n getLayerConf : function (layerId) {\n if (!this.layers) {\n return;\n }\n return this.layers[layerId];\n },\n\n /**\n * Returns an associative array of Tile Matrix Sets configurations.\n *\n * @return {Object} tileMatrixSets - Object which properties are TMS identifiers,\n * and corresponding values are instances of {@link Gp.Services.Config.TileMatrixSet}.\n */\n getTileMatrixSets : function () {\n return this.tileMatrixSets;\n },\n\n /**\n * Returns a Tile Matrix Sets configuration, given its identifier.\n *\n * @param {String} tmsID - Tile Matrix Set identifier (e.g. : \"PM\")\n * @return {Object} tileMatrixSet - Tile Matrix Set configuration, instance of {@link Gp.Services.Config.TileMatrixSet}\n */\n getTMSConf : function (tmsID) {\n if (!this.tileMatrixSets) {\n return;\n }\n return this.tileMatrixSets[tmsID];\n },\n\n /**\n * Returns an associative array of territories configurations.\n *\n * @return {Object} territories - Object which properties are territory identifiers,\n * and corresponding values are instances of {@link Gp.Services.Config.Territory}.\n */\n getTerritories : function () {\n return this.territories;\n },\n\n /**\n * Returns a territory configuration, given its identifier.\n *\n * @param {String} territoryID - territory identifier (e.g. \"FXX\")\n * @return {Object} territory - Territory configuration, instance of {@link Gp.Services.Config.Territory}\n */\n getTerritoryConf : function (territoryID) {\n if (!this.territories) {\n return;\n }\n return this.territories[territoryID];\n },\n\n /**\n * Returns an associative array of services configurations.\n *\n * @return {Object} services - Object which properties are services identifiers,\n * and corresponding values are instances of {@link Gp.Services.Config.Service}.\n */\n getServices : function () {\n return this.services;\n },\n\n /**\n * Returns a service configuration, given its identifier.\n *\n * @param {String} serviceID - service identifier (e.g. \"OGC:WMTS\")\n * @return {Object} service - service configuration, instance of {@link Gp.Services.Config.Service}\n */\n getServiceConf : function (serviceID) {\n if (!this.services) {\n return;\n }\n return this.services[serviceID];\n }\n\n};\n\nexport default AutoConfResponse;\n" - }, - { - "id": 25, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Response/model/Constraint.js", - "name": "./src/Services/AutoConf/Response/model/Constraint.js", - "index": 35, - "index2": 29, - "size": 1192, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 57, - "building": 310 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/AutoConf/Response/model/Constraint", - "loc": "8:0-71" - }, - { - "moduleId": 62, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "module": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "moduleName": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "type": "harmony import", - "userRequest": "../Response/model/Constraint", - "loc": "13:0-54" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\n/**\n *\n * Object used to express a geographical (BBOX, scale) and temporal constraint.\n *\n * @property {String} crs - Coordinates System ID used to express coordinates contraints.\n * @property {Gp.BBox} bbox - Constraint Bounding Box.\n * @property {Number} minScaleDenominator - Minimum scale denominator where constraint applies.\n * @property {Number} maxScaleDenominator - Maximum scale denominator where constraint applies.\n * @property {Array.} temporalExtent - Array expressing the time interval of the constraint [minT, maxT]. Dates are expressed in the [ISO-8601]{@link https://en.wikipedia.org/wiki/ISO_8601} way.\n *\n * @namespace\n * @alias Gp.Services.Config.Constraint\n */\n\nfunction Constraint () {\n if (!(this instanceof Constraint)) {\n throw new TypeError(\"Constraint constructor cannot be called as a function.\");\n }\n\n this.crs = null;\n\n this.bbox = {\n left : null,\n right : null,\n top : null,\n bottom : null\n };\n\n this.minScaleDenominator = null;\n\n this.maxScaleDenominator = null;\n\n this.temporalExtent = [null, null];\n}\n\nConstraint.prototype = {\n\n constructor : Constraint\n\n};\n\nexport default Constraint;\n" - }, - { - "id": 26, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Response/model/Format.js", - "name": "./src/Services/AutoConf/Response/model/Format.js", - "index": 36, - "index2": 30, - "size": 535, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 57, - "building": 353 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/AutoConf/Response/model/Format", - "loc": "9:0-63" - }, - { - "moduleId": 62, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "module": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "moduleName": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "type": "harmony import", - "userRequest": "../Response/model/Format", - "loc": "14:0-46" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\n/**\n * Object used to describe a format to use with Geoportal resources.\n *\n * @property {Boolean} current - If true, then this format is used by default.\n * @property {String} name - Format mime-type.\n *\n * @namespace\n * @alias Gp.Services.Config.Format\n */\n\nfunction Format () {\n if (!(this instanceof Format)) {\n throw new TypeError(\"Format constructor cannot be called as a function.\");\n }\n\n this.current = null;\n\n this.name = null;\n}\n\nFormat.prototype = {\n\n constructor : Format\n\n};\n\nexport default Format;\n" - }, - { - "id": 27, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Response/model/Layer.js", - "name": "./src/Services/AutoConf/Response/model/Layer.js", - "index": 37, - "index2": 31, - "size": 11392, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 57, - "building": 423 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/AutoConf/Response/model/Layer", - "loc": "10:0-61" - }, - { - "moduleId": 62, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "module": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "moduleName": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "type": "harmony import", - "userRequest": "../Response/model/Layer", - "loc": "15:0-44" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\n/**\n * Object used to describe geoportal resource (WMTS, WMS, WFS layers, geocoding resources or elevation service) parameters. Properties may be used or not depending on the resource type.\n *\n * @property {String} name - name of the resource to use with the webservice that serves it (eg : \"GEOGRAPHICALGRIDSYSTEMS.MAPS\").\n * @property {String} title - Human readable name for the resource.\n * @property {String} description - Resource description.\n * @property {String} layerId - Unique resource Identifier (eg : \"GEOGRAPHICALGRIDSYSTEMS.MAPS$GEOPORTAIL:OGC:WMTS\")\n * @property {String} quicklookUrl - Image URL for the resource.\n * @property {Object} serviceParams - Informations about the webservice that serves the resource (OpenLS, WFS, WMTS)\n * @property {String} serviceParams.id - Web Service identifier (\"OGC:WMTS\", \"OGC:OPENLS;ReverseGeocode\", etc...)\n * @property {Object} serviceParams.serverUrl - Associative array mapping geoportal access key (keys) with their properties (URLs of the web service, with the geoportal access key).\n * @property {String} serviceParams.version - webservice version.\n * @property {String} defaultProjection - coordinates system ID used by default for the resource (WMS or WFS layer) or of the TileMatrixSet used by the WMTS layer.\n * @property {Array.} additionalProjections - additional coordinates systems IDs availables for the resource, others than the default one (see defaultProjection) (WMS and WFS layers only).\n * @property {Array.} formats - Formats availables for the resource.\n * @property {Array.} legends - Informations about legends associated to the resource.\n * @property {Array.} metadata - Informations about metadata associated to the resource.\n * @property {Array.} styles - Informations about styles availables for the resources (WMS, WFS and WMTS only).\n * @property {Array.} thematics - Informations about thematics associated to the resource.\n * @property {Gp.Services.Config.Constraint} globalConstraint - geographical constraint for the resource.\n * @property {Array.} constraints - additionnal geographical constraints for the resource.\n * @property {Array.} originators - Informations about originator of the resource.\n * @property {Object} wmtsOptions - Informations associated to WMTS resources.\n * @property {String} wmtsOptions.tileMatrixSetLink - TileMatrixSet identifier used by the resource (see {@link Gp.Services.Config.TileMatrixSet})\n * @property {Gp.Services.Config.TileMatrixLimit} wmtsOptions.tileMatrixSetLimits - limits of the resource for that TileMAtrixSet.\n * @property {Boolean} queryable - true if a getFeatureInfo request may be done for the resource (WMS or WMTS only).\n * @property {Boolean} hidden - true if the resource is not visible.\n * @property {Boolean} isAggregate - true if the resource is an aggregate of other resources (@see aggregatedLayers).\n * @property {Array.} aggregatedLayers - Layers IDs composing the being described aggregated layer.\n * @property {Array.} apiKeys - Array of access keys that grant access to that resource.\n * @property {Object} dimensions - Dimensions informations associated with the resource.\n * @property {String} dimensions.type\n * @property {String} dimensions.visibilityRange\n * @property {String} dimensions.visibilityMode\n * @property {String} dimensions.noDataValue\n * @property {String} dimensions.geometricType\n *\n * @namespace\n * @alias Gp.Services.Config.Layer\n */\nfunction Layer () {\n if (!(this instanceof Layer)) {\n throw new TypeError(\"Layer constructor cannot be called as a function.\");\n }\n\n // info : une instance de la classe Layer n'a aucune propriété au départ,.\n // les attributs possibles sont documentés ci-dessus,\n // et seront implémentés au fur et à mesure de la lecture de la réponse de l'autoconf, lorsque l'information est rencontrée.\n}\n\nLayer.prototype = {\n\n constructor : Layer,\n\n /**\n * Returns the layer name\n *\n * @returns {String} name - name of the resource to use with the webservice that serves it (eg : \"GEOGRAPHICALGRIDSYSTEMS.MAPS\").\n */\n getName : function () {\n return this.name;\n },\n\n /**\n * Returns the layer title\n *\n * @returns {String} title - Human readable name for the resource.\n */\n getTitle : function () {\n return this.title;\n },\n\n /**\n * Returns the layer description\n *\n * @returns {String} description - Resource description.\n */\n getDescription : function () {\n return this.description;\n },\n\n /**\n * Returns the layer identifier\n *\n * @returns {String} layerId - Unique resource Identifier (eg : \"GEOGRAPHICALGRIDSYSTEMS.MAPS$GEOPORTAIL:OGC:WMTS\")\n */\n getLayerId : function () {\n return this.layerId;\n },\n\n /**\n * Returns the layer quicklookUrl\n *\n * @returns {String} quicklookUrl - Image URL for the resource.\n */\n getQuicklookUrl : function () {\n return this.quicklookUrl;\n },\n\n /**\n * Returns the layer default projection\n *\n * @returns {String} defaultProjection - coordinates system ID used by default for the resource (WMS or WFS layer) or of the TileMatrixSet used by the WMTS layer.\n */\n getDefaultProjection : function () {\n return this.defaultProjection;\n },\n\n /**\n * Returns the layer projections\n *\n * @returns {Array.} projections - coordinates systems IDs availables for the resource, including the default one.\n */\n getProjections : function () {\n var projections = [];\n projections.push(this.defaultProjection);\n var proj = projections.concat(this.additionalProjections);\n return proj;\n },\n\n /**\n * Returns the global BBOX\n *\n * @returns {Gp.BBox} bbox - the layer global bounding box, expressed in CRS system.\n */\n getBBOX : function () {\n if (!this.globalConstraint) {\n return;\n }\n return this.globalConstraint.bbox;\n },\n\n /**\n * Returns the layer minimum scale denominator\n *\n * @returns {Number} minScaleDenominator - minimum scale denominator for this layer\n */\n getMinScaleDenominator : function () {\n if (!this.globalConstraint) {\n return;\n }\n return this.globalConstraint.minScaleDenominator;\n },\n\n /**\n * Returns the layer maximum scale denominator\n *\n * @returns {Number} maxScaleDenominator - maximum scale denominator for this layer\n */\n getMaxScaleDenominator : function () {\n if (!this.globalConstraint) {\n return;\n }\n return this.globalConstraint.maxScaleDenominator;\n },\n\n /**\n * Returns layer Tile Matrix Set identifier if exists\n *\n * @returns {String} tileMatrixSetLink - Tile Matrix Set identifier (for instance : \"PM\")\n */\n getTMSID : function () {\n if (this.wmtsOptions) {\n return this.wmtsOptions.tileMatrixSetLink;\n }\n },\n\n /**\n * Returns information about the webservice that serves the resource\n *\n * @returns {Object} serviceParams - Information about the webservice that serves the resource (OpenLS, WFS, WMTS)\n */\n getServiceParams : function () {\n return this.serviceParams;\n },\n\n /**\n * Returns Geoportal server url for a given key\n *\n * @param {String} apiKey - Access key to Geoportal platform\n * @returns {String} serverUrl - general URL of the web service (with the geoportal access key)\n */\n getServerUrl : function (apiKey) {\n if (!apiKey || !this.serviceParams || !this.serviceParams.serverUrl) {\n return;\n }\n return this.serviceParams.serverUrl[apiKey];\n },\n\n /**\n * Returns information about legends associated to the resource.\n *\n * @returns {Array.} legends - Informations about legends associated to the resource.\n */\n getLegends : function () {\n return this.legends;\n },\n\n /**\n * Returns information about metadata associated to the resource.\n *\n * @returns {Array.} metadata - Informations about metadata associated to the resource.\n */\n getMetadata : function () {\n return this.metadata;\n },\n\n /**\n * Returns information about styles availables for the resources (WMS, WFS and WMTS only).\n *\n * @returns {Array.} styles - Informations about styles availables for the resources (WMS, WFS and WMTS only).\n */\n getStyles : function () {\n return this.styles;\n },\n\n /**\n * Returns layer default style\n *\n * @returns {String} styleName - style identifier (eg : \"normal\", \"bdparcellaire\", ...)\n */\n getDefaultStyle : function () {\n if (!this.styles) {\n return;\n }\n var style;\n var s = this.styles;\n for (var i = 0; i < s.length; i++) {\n if (s[i].current === true) {\n style = s[i].name;\n break;\n }\n }\n return style;\n },\n\n /**\n * Returns information about thematics associated to the resource.\n *\n * @returns {Array.} thematics - Informations about thematics associated to the resource.\n */\n getThematics : function () {\n return this.thematics;\n },\n\n /**\n * Returns layer default format\n *\n * @returns {String} formatName - Format mime-type. (eg. \"image/jpeg\")\n */\n getDefaultFormat : function () {\n if (!this.formats) {\n return;\n }\n var format;\n var f = this.formats;\n for (var i = 0; i < f.length; i++) {\n if (f[i].current === true) {\n format = f[i].name;\n break;\n }\n }\n return format;\n },\n\n /**\n * Returns information about geographical or temporal constraints for the resource\n *\n * @returns {Array.} constraints - Informations about geographical or temporal constraints for the resource\n */\n getConstraints : function () {\n return this.constraints;\n },\n\n /**\n * Returns information about originators of this resource\n *\n * @returns {Array.} originators - Informations about originators of this resource\n */\n getOriginators : function () {\n return this.originators;\n },\n\n /**\n * Returns information about dimensions associated with this resource\n *\n * @returns {Object} dimensions - Dimensions informations associated with the resource.\n */\n getDimensions : function () {\n return this.dimensions;\n },\n\n /**\n * Returns information about aggregated layers composing the being described layer, in case the resource is an aggregate of other resources.\n *\n * @returns {Object} aggregatedLayers - Layers IDs composing the being described aggregated layer.\n */\n getAggregatedLayers : function () {\n if (this.isAggregate) {\n return this.aggregatedLayers;\n } else {\n\n }\n }\n\n};\n\nexport default Layer;\n" - }, - { - "id": 28, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Response/model/Legend.js", - "name": "./src/Services/AutoConf/Response/model/Legend.js", - "index": 38, - "index2": 32, - "size": 681, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 58, - "building": 437 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/AutoConf/Response/model/Legend", - "loc": "11:0-63" - }, - { - "moduleId": 62, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "module": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "moduleName": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "type": "harmony import", - "userRequest": "../Response/model/Legend", - "loc": "16:0-46" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\n/**\n * Object used to describe a legend file associated with a geoportal resource (WMTS, WMS, WFS layers).\n *\n * @property {String} format - mime-type of the legend file.\n * @property {String} url - legend file URL\n * @property {Number} minScaleDenominator - minimum scale denominator where this legend applies.\n *\n * @namespace\n * @alias Gp.Services.Config.Legend\n */\n\nfunction Legend () {\n if (!(this instanceof Legend)) {\n throw new TypeError(\"Legend constructor cannot be called as a function.\");\n }\n\n this.format = null;\n\n this.url = null;\n\n this.minScaleDenominator = null;\n}\n\nLegend.prototype = {\n\n constructor : Legend\n\n};\n\nexport default Legend;\n" - }, - { - "id": 29, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Response/model/Metadata.js", - "name": "./src/Services/AutoConf/Response/model/Metadata.js", - "index": 39, - "index2": 33, - "size": 542, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 57, - "building": 432 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/AutoConf/Response/model/Metadata", - "loc": "12:0-67" - }, - { - "moduleId": 62, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "module": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "moduleName": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "type": "harmony import", - "userRequest": "../Response/model/Metadata", - "loc": "17:0-50" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\n/**\n * Object used to describe a metadata file associated with a geoportal resource.\n *\n * @property {String} format - mime-type of the metadata file.\n * @property {String} url - metadata file URL\n *\n * @namespace\n * @alias Gp.Services.Config.Metadata\n */\n\nfunction Metadata () {\n if (!(this instanceof Metadata)) {\n throw new TypeError(\"Metadata constructor cannot be called as a function.\");\n }\n\n this.format = null;\n\n this.url = null;\n}\n\nMetadata.prototype = {\n\n constructor : Metadata\n\n};\n\nexport default Metadata;\n" - }, - { - "id": 30, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Response/model/Originator.js", - "name": "./src/Services/AutoConf/Response/model/Originator.js", - "index": 40, - "index2": 34, - "size": 841, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 58, - "building": 446 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/AutoConf/Response/model/Originator", - "loc": "13:0-71" - }, - { - "moduleId": 62, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "module": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "moduleName": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "type": "harmony import", - "userRequest": "../Response/model/Originator", - "loc": "18:0-54" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\n/**\n * Object used to describe an Originator of geoportal resource.\n *\n * @property {String} name - originator name\n * @property {String} attribution - originator full name\n * @property {String} logo - originator logo file URL\n * @property {String} url - originator web site URL\n * @property {Array.} constraints - where and when the originator applies for the ressource.\n *\n * @namespace\n * @alias Gp.Services.Config.Originator\n */\n\nfunction Originator () {\n if (!(this instanceof Originator)) {\n throw new TypeError(\"Originator constructor cannot be called as a function.\");\n }\n\n this.name = null;\n\n this.attribution = null;\n\n this.logo = null;\n\n this.url = null;\n\n this.constraints = [];\n}\n\nOriginator.prototype = {\n\n constructor : Originator\n\n};\n\nexport default Originator;\n" - }, - { - "id": 31, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Response/model/Service.js", - "name": "./src/Services/AutoConf/Response/model/Service.js", - "index": 41, - "index2": 35, - "size": 711, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 58, - "building": 456 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/AutoConf/Response/model/Service", - "loc": "14:0-65" - }, - { - "moduleId": 62, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "module": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "moduleName": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "type": "harmony import", - "userRequest": "../Response/model/Service", - "loc": "19:0-48" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\n/**\n * Object used to describe a web service of the geoportal platform.\n *\n * @property {String} title - Web service name\n * @property {Object} serverUrl - Associative array mapping geoportal access key (keys) with their properties (URLs of the web service, with the geoportal access key).\n * @property {String} version - web service version.\n *\n * @namespace\n * @alias Gp.Services.Config.Service\n */\nfunction Service () {\n if (!(this instanceof Service)) {\n throw new TypeError(\"Service constructor cannot be called as a function.\");\n }\n\n this.title = null;\n\n this.serverUrl = null;\n\n this.version = null;\n}\n\nService.prototype = {\n\n constructor : Service\n\n};\n\nexport default Service;\n" - }, - { - "id": 32, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Response/model/Style.js", - "name": "./src/Services/AutoConf/Response/model/Style.js", - "index": 42, - "index2": 36, - "size": 651, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 58, - "building": 471 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/AutoConf/Response/model/Style", - "loc": "15:0-61" - }, - { - "moduleId": 62, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "module": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "moduleName": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "type": "harmony import", - "userRequest": "../Response/model/Style", - "loc": "20:0-44" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\n/**\n * Object used to describe a style that may be used for a geoportal resource.\n *\n * @property {String} name - Style identifier (eg : \"normal\", \"bdparcellaire\", ...)\n * @property {String} title - human readable name of the style.\n * @property {Boolean} current - true if this is the default style.\n *\n * @namespace\n * @alias Gp.Services.Config.Style\n */\n\nfunction Style () {\n if (!(this instanceof Style)) {\n throw new TypeError(\"Style constructor cannot be called as a function.\");\n }\n\n this.name = null;\n\n this.title = null;\n\n this.current = null;\n}\n\nStyle.prototype = {\n\n constructor : Style\n\n};\n\nexport default Style;\n" - }, - { - "id": 33, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Response/model/Territory.js", - "name": "./src/Services/AutoConf/Response/model/Territory.js", - "index": 43, - "index2": 37, - "size": 1996, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 59, - "building": 495 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/AutoConf/Response/model/Territory", - "loc": "16:0-69" - }, - { - "moduleId": 62, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "module": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "moduleName": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "type": "harmony import", - "userRequest": "../Response/model/Territory", - "loc": "21:0-52" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\n/**\n * Object used to describe properties of a french territory covered by geoportal resources.\n *\n * @property {Boolean} isDefault - if this territory is to use by default.\n * @property {String} defaultCRS - Identifier of the coordinates system to use by default for that territory.\n * @property {Array.} additionalCRS - Identifiers of additional coordinates systems availables for that territory.\n * @property {Array.} defaultLayers - Identifiers of layers to load by default for that territory.\n * @property {Object} defaultOptions - options to use by default for that territory.\n * @property {Number} defaultOptions.resolution - resolution to use by default for that territory (in meter per pixel).\n * @property {Number} defaultOptions.minScaleDenominator - minimum scaleDenominator accessible for that territory.\n * @property {Number} defaultOptions.maxScaleDenominator - maximum scaleDenominator accessible for that territory.\n * @property {Gp.BBox} geoBBox - Bounding Box of the territory (expressed in geographical coordinates)\n * @property {Object} geoCenter - center of the territory (expressed in geographical coordinates)\n * @property {Float} geoCenter.lon - center longitude\n * @property {Float} geoCenter.lat - center latitude\n *\n * @namespace\n * @alias Gp.Services.Config.Territory\n */\nfunction Territory () {\n if (!(this instanceof Territory)) {\n throw new TypeError(\"Territory constructor cannot be called as a function.\");\n }\n\n this.isDefault = null;\n\n this.defaultCRS = null;\n\n this.additionalCRS = [];\n\n this.geoBBOX = {\n left : null,\n right : null,\n top : null,\n bottom : null\n };\n\n this.geoCenter = {\n lon : null,\n lat : null\n };\n\n this.defaultOptions = {\n resolution : null,\n minScaleDenominator : null,\n maxScaleDenominator : null\n };\n\n this.defaultLayers = [];\n}\n\nTerritory.prototype = {\n\n constructor : Territory\n\n};\n\nexport default Territory;\n" - }, - { - "id": 34, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Response/model/Thematic.js", - "name": "./src/Services/AutoConf/Response/model/Thematic.js", - "index": 44, - "index2": 38, - "size": 576, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 59, - "building": 480 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/AutoConf/Response/model/Thematic", - "loc": "17:0-67" - }, - { - "moduleId": 62, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "module": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "moduleName": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "type": "harmony import", - "userRequest": "../Response/model/Thematic", - "loc": "22:0-50" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\n/**\n * Object used to describe a thematic\n *\n * @property {String} name - Thematic name\n * @property {Boolean} inspire - true if the thematic name is an [INSPIRE one]{@link http://inspire.ec.europa.eu/index.cfm/pageid/2/list/7}.\n *\n * @namespace\n * @alias Gp.Services.Config.Thematic\n */\n\nfunction Thematic () {\n if (!(this instanceof Thematic)) {\n throw new TypeError(\"Thematic constructor cannot be called as a function.\");\n }\n\n this.inspire = null;\n\n this.name = null;\n}\n\nThematic.prototype = {\n\n constructor : Thematic\n\n};\n\nexport default Thematic;\n" - }, - { - "id": 35, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Response/model/TileMatrixSet.js", - "name": "./src/Services/AutoConf/Response/model/TileMatrixSet.js", - "index": 45, - "index2": 39, - "size": 2525, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 60, - "building": 534 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/AutoConf/Response/model/TileMatrixSet", - "loc": "20:0-67" - }, - { - "moduleId": 62, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "module": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "moduleName": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "type": "harmony import", - "userRequest": "../Response/model/TileMatrixSet", - "loc": "23:0-60" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\n/**\n *\n * Object used to describe a TileMatrix set (for WMTS use).\n *\n * @property {Array.} matrixIds - Array of IDs for each TileMatrix of the set.\n * @property {Array.} tileMatrices - Array of TileMatrix descriptions.\n * @property {Array.} nativeResolutions - Array of resolutions (in meter per pixel) applying for each TileMatrix of the set.\n * @property {String} projection - Identifier of the Cordinates System used for the tileMatrixSet.\n *\n * @namespace\n * @alias Gp.Services.Config.TileMatrixSet\n */\nfunction TileMatrixSet () {\n if (!(this instanceof TileMatrixSet)) {\n throw new TypeError(\"TileMatrixSet constructor cannot be called as a function.\");\n }\n\n this.projection = null;\n\n this.nativeResolutions = [];\n\n this.matrixIds = [];\n\n this.tileMatrices = {};\n}\n\nTileMatrixSet.prototype = {\n\n constructor : TileMatrixSet,\n\n /**\n * Returns Tile Matrix Set resolutions\n *\n * @returns {Array} nativeResolutions - Array of resolutions (in meter per pixel) applying for each TileMatrix of the set.\n */\n getResolutions : function () {\n return this.nativeResolutions;\n },\n\n /**\n * Returns Tile Matrix Set identifiers\n *\n * @returns {Array} matrixIds - Array of IDs for each TileMatrix of the set.\n */\n getMatrixIds : function () {\n return this.matrixIds;\n },\n\n /**\n * Returns Tile Matrix Set projection\n *\n * @returns {String} projection - Identifier of the Cordinates System used for the tileMatrixSet.\n */\n getProjection : function () {\n return this.projection;\n },\n\n /**\n * Returns Tile Matrices descriptions.\n *\n * @returns {Array.} tileMatrices - Array of TileMatrix descriptions.\n */\n getTileMatrices : function () {\n return this.tileMatrices;\n },\n\n /**\n * Returns top left corner point of matrices\n *\n * @returns {Gp.Point} topLeftCorner - Top Left Corner Point of TMS matrices, expressed in the tileMatrixSet coordinates system.\n */\n getTopLeftCorner : function () {\n var topLeftCorner;\n var matrices = this.getTileMatrices();\n if (matrices) {\n for (var id in matrices) {\n if (matrices.hasOwnProperty(id)) {\n topLeftCorner = matrices[id].topLeftCorner;\n break;\n }\n }\n }\n return topLeftCorner;\n }\n\n};\n\nexport default TileMatrixSet;\n" - }, - { - "id": 36, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Response/model/TileMatrix.js", - "name": "./src/Services/AutoConf/Response/model/TileMatrix.js", - "index": 46, - "index2": 40, - "size": 2590, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 59, - "building": 511 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/AutoConf/Response/model/TileMatrix", - "loc": "18:0-63" - }, - { - "moduleId": 62, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "module": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "moduleName": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "type": "harmony import", - "userRequest": "../Response/model/TileMatrix", - "loc": "24:0-54" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\n/**\n * Object used to describe a TileMatrix.\n *\n * @property {String} matrixId - matrix Identifier\n * @property {Number} matrixHeight - Number of tiles from the top to the bottom of the matrix.\n * @property {Number} matrixWidth - Number of tiles from the left to the right of the matrix.\n * @property {Number} scaleDenominator - Scale denominator associated to that matrix.\n * @property {Number} tileHeight - tile height in number of pixels\n * @property {Number} tileWidth - tile width in number of pixels\n * @property {Gp.Point} topLeftCorner - Top Left Corner Point of the matrix expressed in the tileMatrixSet coordinates system.\n *\n * @namespace\n * @alias Gp.Services.Config.TileMatrix\n */\n\nfunction TileMatrix () {\n if (!(this instanceof TileMatrix)) {\n throw new TypeError(\"TileMatrix constructor cannot be called as a function.\");\n }\n\n this.matrixId = null;\n\n this.matrixHeight = null;\n\n this.matrixWidth = null;\n\n this.scaleDenominator = null;\n\n this.tileHeight = null;\n\n this.tileWidth = null;\n\n this.topLeftCorner = null;\n}\n\nTileMatrix.prototype = {\n\n constructor : TileMatrix,\n\n /**\n * Returns top left corner point of the matrix\n *\n * @returns {Gp.Point} topLeftCorner - Top Left Corner Point of the matrix expressed in the tileMatrixSet coordinates system.\n */\n getTopLeftCorner : function () {\n return this.topLeftCorner;\n },\n\n /**\n * Returns Scale denominator associated to that matrix.\n *\n * @returns {Number} scaleDenominator - Scale denominator associated to that matrix.\n */\n getScaleDenominator : function () {\n return this.scaleDenominator;\n },\n\n /**\n * Returns tile height of matrix\n *\n * @returns {Number} tileHeight - tile height in number of pixels\n */\n getTileHeight : function () {\n return this.tileHeight;\n },\n\n /**\n * Returns tile width of matrix\n *\n * @returns {Number} tileWidth - tile width in number of pixels\n */\n getTileWidth : function () {\n return this.tileWidth;\n },\n\n /**\n * Returns matrix height (number of tiles)\n *\n * @returns {Number} matrixHeight - Number of tiles from the top to the bottom of the matrix.\n */\n getMatrixHeight : function () {\n return this.matrixHeight;\n },\n\n /**\n * Returns matrix width (number of tiles)\n *\n * @returns {Number} matrixWidth - Number of tiles from the left to the right of the matrix.\n */\n getMatrixWidth : function () {\n return this.matrixWidth;\n }\n\n};\n\nexport default TileMatrix;\n" - }, - { - "id": 37, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Response/model/TileMatrixLimit.js", - "name": "./src/Services/AutoConf/Response/model/TileMatrixLimit.js", - "index": 47, - "index2": 41, - "size": 982, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 59, - "building": 521 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/AutoConf/Response/model/TileMatrixLimit", - "loc": "19:0-73" - }, - { - "moduleId": 62, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "module": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "moduleName": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "type": "harmony import", - "userRequest": "../Response/model/TileMatrixLimit", - "loc": "25:0-64" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\n/**\n * Object used to describe a layer extent on a Tile Matrix.\n *\n * @property {Number} minTileCol - minimum column index where tile can be found on the Tile matrix.\n * @property {Number} maxTileCol - maximum column index where tile can be found on the Tile matrix.\n * @property {Number} minTileRow - minimum row index where tile can be found on the Tile matrix.\n * @property {Number} maxTileCol - maximum row index where tile can be found on the Tile matrix.\n *\n * @namespace\n * @alias Gp.Services.Config.TileMatrixLimit\n */\n\nfunction TileMatrixLimit () {\n if (!(this instanceof TileMatrixLimit)) {\n throw new TypeError(\"TileMatrixLimit constructor cannot be called as a function.\");\n }\n\n this.minTileRow = null;\n\n this.maxTileRow = null;\n\n this.minTileCol = null;\n\n this.maxTileCol = null;\n}\n\n/**\n * @lends module:Autoconf/Response/TileMatrixLimit\n */\nTileMatrixLimit.prototype = {\n\n constructor : TileMatrixLimit\n};\n\nexport default TileMatrixLimit;\n" - }, - { - "id": 38, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService.js", - "name": "./src/Formats/XLS/LocationUtilityService.js", - "index": 54, - "index2": 55, - "size": 6296, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/ReverseGeocodeRequestFactory.js", - "issuerId": 79, - "issuerName": "./src/Services/Geocode/Request/ReverseGeocodeRequestFactory.js", - "profile": { - "factory": 96, - "building": 284, - "dependencies": 713 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 64, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "module": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "moduleName": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "type": "harmony import", - "userRequest": "../../../Formats/XLS/LocationUtilityService", - "loc": "11:0-81" - }, - { - "moduleId": 79, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/ReverseGeocodeRequestFactory.js", - "module": "./src/Services/Geocode/Request/ReverseGeocodeRequestFactory.js", - "moduleName": "./src/Services/Geocode/Request/ReverseGeocodeRequestFactory.js", - "type": "harmony import", - "userRequest": "../../../Formats/XLS/LocationUtilityService", - "loc": "11:0-81" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "import Logger from \"../../Utils/LoggerByDefault\";\nimport AbstractService from \"./AbstractService\";\nimport GeocodeRequest from \"./LocationUtilityService/GeocodeRequest\";\nimport ReverseGeocodeRequest from \"./LocationUtilityService/ReverseGeocodeRequest\";\nimport GeocodeFilterExtension from \"./LocationUtilityService/GeocodeFilterExtension\";\n\n/**\n * @classdesc\n *\n * Requête de type LocationUtilityService (LUS)\n * (Factory)\n *\n * @example\n * // encapsule un objet dans une coquille XSL, Factory sur les objets Geocode/ReverseGeocode\n * lus = new LocationUtilityService ();\n * lus.addRequest (req);\n * lus.toString();\n * ou\n * lus = new LocationUtilityService ({\n * location : \"saint mandé\",\n * returnFreeForm : true,\n * filterOptions : {\n * type : ['PositionOfInterest']\n * }\n * });\n * lus.toString();\n *\n * // out ->\n * // \n * //
\n * // saint mandé\n * //
\n * //
\n *\n * // creation de l'objet Geocode\n * req = new GeocodeRequest ();\n * req.addAddress (new Address (/*todo/*));\n * req.toString();\n * // out ->\n * // \n * //
\n * // saint mandé\n * //
\n * //
\n *\n * // creation de l'objet ReverseGeocode\n * req = new ReverseGeocodeRequest ();\n * req.addPosition (new Position (position:{x: , y: }));\n * req.addPreference (['StreetAddress']);\n * req.toString();\n * // out ->\n * // \n * // \n * // \n * // 50.347775 3.205098\n * // \n * // \n * // StreetAddress\n * // \n *\n * @constructor\n * @alias Gp.Formats.XLS.LocationUtilityService\n * @param {Object} options - options\n * @param {Object} options.location - location\n * @param {String} options.position - position : {x : \"\", y : \"\"}\n * @param {String} options.returnFreeForm - true|false\n * @param {Object} options.filterOptions - filtres\n * @param {Function} options.onsuccess - function callback success (TODO)\n * @param {Function} options.onerror - function callback error (TODO)\n *\n * @private\n */\nfunction LocationUtilityService (options) {\n this.logger = Logger.getLogger();\n this.logger.trace(\"[Constructeur LocationUtilityService ()]\");\n\n if (!(this instanceof LocationUtilityService)) {\n throw new TypeError(\"LocationUtilityService constructor cannot be called as a function.\");\n }\n\n /**\n * Nom de la classe\n */\n this.CLASSNAME = \"LocationUtilityService\";\n\n /**\n * Type de classe de geocodage\n * ex. GeocodeRequest ou ReverseGeocodeRequest\n */\n this.CLASSTYPE = null;\n\n // appel du constructeur par heritage\n AbstractService.apply(this, arguments);\n\n // on determine le type de geocodage si les options sont renseignées\n if (this.options) {\n this.CLASSTYPE = (this.options.location) ? \"GeocodeRequest\" : (this.options.position) ? \"ReverseGeocodeRequest\" : null;\n }\n}\n\n/**\n * @lends module:LocationUtilityService#\n */\nLocationUtilityService.prototype = Object.create(AbstractService.prototype, {\n // todo\n // getter/setter\n});\n\n/**\n * Constructeur (alias)\n */\nLocationUtilityService.prototype.constructor = LocationUtilityService;\n\n/**\n * (overwrite) Ajout d'un objet de type LUS : GeocodeRequest ou ReverseGeocodeRequest\n *\n * @param {Object} oLUSRequest - objet de type LUS\n */\nLocationUtilityService.prototype.addRequest = function (oLUSRequest) {\n // on determine le type de geocodage\n this.CLASSTYPE = oLUSRequest.CLASSNAME;\n\n // on controle les types acceptés\n switch (this.CLASSTYPE) {\n case \"GeocodeRequest\":\n case \"ReverseGeocodeRequest\":\n this.oRequest = oLUSRequest;\n break;\n default:\n throw new Error(\"Ce n'est pas un objet de type 'LUS Request' !?\");\n }\n};\n\n/**\n * (overwrite) Ajout d'un objet de type GeocodeFilterExtension\n *\n * @param {Object} oFilter - objet de type Filtre\n */\nLocationUtilityService.prototype.addFilter = function (oFilter) {\n // FIXME gestion des filtres à partir des tables de geocodages\n if (oFilter instanceof GeocodeFilterExtension) {\n this.oFilter = oFilter;\n }\n};\n\n/**\n * (overwrite) toString\n *\n * @returns {String} requête\n */\nLocationUtilityService.prototype.toString = function () {\n // soit, on a un objet LUS Request déjà instancié\n // sinon, il faut le construire à partir des options à disposition\n if (!this.oRequest) {\n // il nous faut des options\n if (!this.options) {\n throw new Error(\"Les options ne sont pas renseignées, impossible de construire la requête !\");\n }\n\n // si les options 'location' et 'position' sont renseignées,\n // on prendra par defaut le choix du geocodage direct\n if (this.CLASSTYPE === \"GeocodeRequest\") {\n var settingsDirect = {\n location : this.options.location,\n returnFreeForm : this.options.returnFreeForm,\n filterOptions : this.options.filterOptions || {}\n };\n this.oRequest = new GeocodeRequest(settingsDirect);\n // ajout des filtres spécifiques au service du geocodage direct de l'IGN\n if (this.oFilter) {\n this.oRequest.addFilter(this.oFilter);\n }\n } else if (this.CLASSTYPE === \"ReverseGeocodeRequest\") {\n var settingsInv = {\n position : this.options.position,\n returnFreeForm : this.options.returnFreeForm,\n filterOptions : this.options.filterOptions || {}\n };\n this.oRequest = new ReverseGeocodeRequest(settingsInv);\n } else {\n this.logger.error(\"impossible de determiner le type de geocodage : Direct ou Inverse !?\");\n }\n }\n\n // objet indefini !?\n if (!this.oRequest) {\n throw new Error(\"Type de Geocodage indefini !\");\n }\n\n this.strRequest = this.oRequest.toString();\n return this.strRequest;\n};\n\nexport default LocationUtilityService;\n" - }, - { - "id": 39, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Response/model/DirectGeocodedLocation.js", - "name": "./src/Services/Geocode/Response/model/DirectGeocodedLocation.js", - "index": 69, - "index2": 64, - "size": 1091, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 61, - "building": 581, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/Geocode/Response/model/DirectGeocodedLocation", - "loc": "23:0-94" - }, - { - "moduleId": 77, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Formats/DirectGeocodeResponseReader.js", - "module": "./src/Services/Geocode/Formats/DirectGeocodeResponseReader.js", - "moduleName": "./src/Services/Geocode/Formats/DirectGeocodeResponseReader.js", - "type": "harmony import", - "userRequest": "../Response/model/DirectGeocodedLocation", - "loc": "15:0-78" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\nimport GeocodedLocation from \"./GeocodedLocation\";\n\n/**\n * Single location object returned by the underlying geocoding web service.\n *\n * @property {Float} accuracy - Accuracy of the response towards the requested location between 0 (unaccurate) and 1 (exact match).\n *\n * @namespace\n * @extends {Gp.Services.Geocode.GeocodedLocation}\n * @alias Gp.Services.Geocode.DirectGeocodedLocation\n */\nfunction DirectGeocodedLocation () {\n if (!(this instanceof DirectGeocodedLocation)) {\n throw new TypeError(\"DirectGeocodedLocation constructor cannot be called as a function.\");\n }\n\n // INFO\n // appel du constructeur de la classe mère\n // avec passage de param.\n GeocodedLocation.apply(this, arguments);\n\n /**\n * Nom de la classe (heritage) : \"DirectGeocodedLocation\"\n * @type {String}\n */\n this.CLASSNAME = \"DirectGeocodedLocation\";\n\n this.accuracy = null;\n}\n\nDirectGeocodedLocation.prototype = Object.create(GeocodedLocation.prototype);\n\nDirectGeocodedLocation.prototype.constructor = DirectGeocodedLocation;\n\nexport default DirectGeocodedLocation;\n" - }, - { - "id": 40, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Response/model/ReverseGeocodedLocation.js", - "name": "./src/Services/Geocode/Response/model/ReverseGeocodedLocation.js", - "index": 75, - "index2": 69, - "size": 1088, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 61, - "building": 569, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/Geocode/Response/model/ReverseGeocodedLocation", - "loc": "24:0-96" - }, - { - "moduleId": 81, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Formats/ReverseGeocodeResponseReader.js", - "module": "./src/Services/Geocode/Formats/ReverseGeocodeResponseReader.js", - "moduleName": "./src/Services/Geocode/Formats/ReverseGeocodeResponseReader.js", - "type": "harmony import", - "userRequest": "../Response/model/ReverseGeocodedLocation", - "loc": "15:0-80" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\nimport GeocodedLocation from \"./GeocodedLocation\";\n\n/**\n * Single location object returned by the underlying reverse geocoding web service.\n *\n * @property {Float} searchCenterDistance - Distance between the requested point and the location.\n *\n * @namespace\n * @extends {Gp.Services.Geocode.GeocodedLocation}\n * @alias Gp.Services.Geocode.ReverseGeocodedLocation\n */\nfunction ReverseGeocodedLocation () {\n if (!(this instanceof ReverseGeocodedLocation)) {\n throw new TypeError(\"ReverseGeocodedLocation constructor cannot be called as a function.\");\n }\n\n // INFO\n // appel du constructeur de la classe mère\n // avec passage de param.\n GeocodedLocation.apply(this, arguments);\n\n /**\n * Nom de la classe (heritage) : \"ReverseGeocodedLocation\"\n * @type {String}\n */\n this.CLASSNAME = \"ReverseGeocodedLocation\";\n\n this.searchCenterDistance = null;\n}\n\nReverseGeocodedLocation.prototype = Object.create(GeocodedLocation.prototype);\n\nReverseGeocodedLocation.prototype.constructor = ReverseGeocodedLocation;\n\nexport default ReverseGeocodedLocation;\n" - }, - { - "id": 41, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoComplete/Response/model/AutoCompleteResponse.js", - "name": "./src/Services/AutoComplete/Response/model/AutoCompleteResponse.js", - "index": 78, - "index2": 73, - "size": 701, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 56, - "building": 290 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/AutoComplete/Response/model/AutoCompleteResponse", - "loc": "5:0-95" - }, - { - "moduleId": 83, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoComplete/Response/AutoCompleteResponseFactory.js", - "module": "./src/Services/AutoComplete/Response/AutoCompleteResponseFactory.js", - "moduleName": "./src/Services/AutoComplete/Response/AutoCompleteResponseFactory.js", - "type": "harmony import", - "userRequest": "./model/AutoCompleteResponse", - "loc": "12:0-64" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "/**\n * Response object for {@link module:Services~autoComplete Gp.Services.autoComplete ()} invocation when successful. Received as the argument of onSuccess callback function.\n *\n * @property {Array.} suggestedLocations - SuggestedLocations array.\n *\n * @namespace\n * @alias Gp.Services.AutoCompleteResponse\n */\nfunction AutoCompleteResponse () {\n if (!(this instanceof AutoCompleteResponse)) {\n throw new TypeError(\"AutoCompleteResponse constructor cannot be called as a function.\");\n }\n\n this.suggestedLocations = [];\n}\n\nAutoCompleteResponse.prototype = {\n\n constructor : AutoCompleteResponse\n\n};\n\nexport default AutoCompleteResponse;\n" - }, - { - "id": 42, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoComplete/Response/model/SuggestedLocation.js", - "name": "./src/Services/AutoComplete/Response/model/SuggestedLocation.js", - "index": 79, - "index2": 74, - "size": 3634, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 56, - "building": 368 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/AutoComplete/Response/model/SuggestedLocation", - "loc": "6:0-89" - }, - { - "moduleId": 83, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoComplete/Response/AutoCompleteResponseFactory.js", - "module": "./src/Services/AutoComplete/Response/AutoCompleteResponseFactory.js", - "moduleName": "./src/Services/AutoComplete/Response/AutoCompleteResponseFactory.js", - "type": "harmony import", - "userRequest": "./model/SuggestedLocation", - "loc": "13:0-58" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\n/**\n * Single SuggestedLocation Object returned by underlying web service.\n * Each suggested location represents a street address (\"StreetAddress\") or a place name (\"PositionOfInterest\").\n *\n * @property {String} type - Suggested location type : \"StreetAddress\" ou \"PositionOfInterest\"\n * @property {Gp.Point} position - Position of the suggested location given in requested coordinates system.\n * @property {String} commune - Suggested municipality\n * @property {String} fullText - Full text representation of the suggested location.\n * @property {String} postalCode - Suggested location postcode\n * @property {Integer} classification - Number used to classify the importance of the place where is the suggested location from 1 (most important) to 7 (less important).\n * @property {String} street - Street name of the suggested location (\"StreetAddress\" only).\n * @property {String} kind - Nature of the suggested location : \"prefecture\", \"monument\", \"commune\", ... for instance (\"PositionOfInterest\" only).\n *\n * @namespace\n * @alias Gp.Services.AutoComplete.SuggestedLocation\n */\nfunction SuggestedLocation () {\n if (!(this instanceof SuggestedLocation)) {\n throw new TypeError(\"SuggestedLocation constructor cannot be called as a function.\");\n }\n\n /* REPONSE :\n {\n \"status\" : \"OK\",\n \"results\" : [\n {\n \"country\":\"PositionOfInterest\",\n \"x\":-1.559185,\n \"y\":47.952603,\n \"city\":\"Brie\",\n \"zipcode\":\"35150\",\n \"street\":\"corbe\",\n \"kind\":\"Lieu-dit habité\",\n \"fulltext\":\"corbe, 35150 Brie\",\n \"classification\":6\n },\n {\n \"country\":\"StreetAddress\",\n \"x\":1.538295,\n \"y\":43.19646,\n \"city\":\"Brie\",\n \"zipcode\":\"09700\",\n \"street\":\"courreste\",\n \"kind\":\"\",\n \"fulltext\":\"courreste, 09700 Brie\",\n \"classification\":7\n }\n ]\n }\n */\n\n /* REPONSE EN ERREUR\n {\n status : \"ERROR\",\n results : [ ]\n }\n */\n\n /**\n * Suggested location type : \"StreetAddress\" ou \"PositionOfInterest\"\n * @type {String}\n */\n this.type = null;\n\n /**\n * Position of the suggested location given in requested coordinates system.\n * @type {Gp.Point}\n */\n this.position = {\n x : null,\n y : null\n };\n\n /**\n * Suggested municipality\n * @type {String}\n */\n this.commune = null;\n\n /**\n * Full text representation of the suggested location.\n * @type {String}\n */\n this.fullText = null;\n\n /**\n * Suggested location postcode\n * @type {Number}\n */\n this.postalCode = null;\n\n /**\n * Number used to classify the importance of the place where is the suggested location from 1 (most important) to 7 (less important).\n * @type {Integer}\n */\n this.classification = null;\n\n /**\n * Street name of the suggested location (\"StreetAddress\" only).\n * @type {String}\n */\n this.street = null;\n\n /**\n * Place name of the suggested location (\"PositionOfInterest\" only).\n * @type {String}\n */\n this.poi = null;\n\n /**\n * Nature of the suggested location : \"prefecture\", \"monument\", \"commune\", ... for instance (\"PositionOfInterest\" only).\n * @type {String}\n */\n this.kind = null;\n}\n\nSuggestedLocation.prototype = {\n\n constructor : SuggestedLocation\n};\n\nexport default SuggestedLocation;\n" - }, - { - "id": 43, - "identifier": "multi /home/jpbazonnais/Projets/geoportal-access-lib/src/Gp", - "name": "multi ./src/Gp", - "index": 0, - "index2": 100, - "size": 28, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": null, - "issuerId": null, - "issuerName": null, - "profile": { - "factory": 0, - "building": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [], - "depth": 0 - }, - { - "id": 44, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "name": "./src/Gp.js", - "index": 1, - "index2": 99, - "size": 4895, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "multi /home/jpbazonnais/Projets/geoportal-access-lib/src/Gp", - "issuerId": 43, - "issuerName": "multi ./src/Gp", - "profile": { - "factory": 194, - "building": 616 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 43, - "moduleIdentifier": "multi /home/jpbazonnais/Projets/geoportal-access-lib/src/Gp", - "module": "multi ./src/Gp", - "moduleName": "multi ./src/Gp", - "type": "single entry", - "userRequest": "/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp", - "loc": "main:100000" - } - ], - "usedExports": true, - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 1, - "source": "import Services from \"./Services/Services\";\nimport DefaultUrl from \"./Services/DefaultUrlService\";\nimport AltiResponse from \"./Services/Alti/Response/model/AltiResponse\";\nimport Elevation from \"./Services/Alti/Response/model/Elevation\";\nimport AutoCompleteResponse from \"./Services/AutoComplete/Response/model/AutoCompleteResponse\";\nimport SuggestedLocation from \"./Services/AutoComplete/Response/model/SuggestedLocation\";\nimport GetConfigResponse from \"./Services/AutoConf/Response/model/AutoConfResponse\";\nimport Constraint from \"./Services/AutoConf/Response/model/Constraint\";\nimport Format from \"./Services/AutoConf/Response/model/Format\";\nimport Layer from \"./Services/AutoConf/Response/model/Layer\";\nimport Legend from \"./Services/AutoConf/Response/model/Legend\";\nimport Metadata from \"./Services/AutoConf/Response/model/Metadata\";\nimport Originator from \"./Services/AutoConf/Response/model/Originator\";\nimport Service from \"./Services/AutoConf/Response/model/Service\";\nimport Style from \"./Services/AutoConf/Response/model/Style\";\nimport Territory from \"./Services/AutoConf/Response/model/Territory\";\nimport Thematic from \"./Services/AutoConf/Response/model/Thematic\";\nimport TM from \"./Services/AutoConf/Response/model/TileMatrix\";\nimport TMLimit from \"./Services/AutoConf/Response/model/TileMatrixLimit\";\nimport TMS from \"./Services/AutoConf/Response/model/TileMatrixSet\";\nimport GeocodeResponse from \"./Services/Geocode/Response/model/GeocodeResponse\";\nimport GeocodedLocation from \"./Services/Geocode/Response/model/GeocodedLocation\";\nimport DirectGeocodedLocation from \"./Services/Geocode/Response/model/DirectGeocodedLocation\";\nimport ReverseGeocodedLocation from \"./Services/Geocode/Response/model/ReverseGeocodedLocation\";\nimport IsoCurveResponse from \"./Services/ProcessIsoCurve/Response/model/ProcessIsoCurveResponse\";\nimport RouteResponse from \"./Services/Route/Response/model/RouteResponse\";\nimport RouteInstruction from \"./Services/Route/Response/model/RouteInstruction\";\nimport XHR from \"./Protocols/XHR\";\nimport Error from \"./Exceptions/ErrorService\";\nimport Helper from \"./Utils/Helper\";\n\nvar Gp = {\n servicesVersion : \"__GPVERSION__\",\n servicesDate : \"__GPDATE__\",\n /**\n * Methode pour rajouter une classe / objet au namespace global.\n *\n * @method extend\n * @param {String} strNS - nom sous lequel on veut présenter la\n * classe / objet (Gp.\"strNS\").\n * @param {Object} value - la classe / objet à rajouter au NS global.\n * @returns {Object} this\n */\n extend : function (strNS, value) {\n var parts = strNS.split(\".\");\n var parent = this;\n var pl;\n\n pl = parts.length;\n\n for (var i = 0; i < pl; i++) {\n // create a property if it doesn't exist\n if (typeof parent[parts[i]] === \"undefined\") {\n parent[parts[i]] = {};\n }\n\n var n = pl - 1;\n if (i === n) {\n parent[parts[i]] = value;\n }\n\n parent = parent[parts[i]];\n }\n\n return this;\n }\n};\n\n// on declare les ns dans root global\nGp.extend(\"Protocols\", {});\nGp.extend(\"Protocols.XHR\", XHR);\nGp.extend(\"Services\", Services);\n// Export Alti\nGp.extend(\"Services.AltiResponse\", AltiResponse);\nGp.extend(\"Services.Alti.Elevation\", Elevation);\n// Export Autocomplete\nGp.extend(\"Services.AutoCompleteResponse\", AutoCompleteResponse);\nGp.extend(\"Services.AutoComplete.SuggestedLocation\", SuggestedLocation);\n// Export Autoconf\nGp.extend(\"Services.GetConfigResponse\", GetConfigResponse);\nGp.extend(\"Services.Config.Constraint\", Constraint);\nGp.extend(\"Services.Config.Format\", Format);\nGp.extend(\"Services.Config.Layer\", Layer);\nGp.extend(\"Services.Config.Legend\", Legend);\nGp.extend(\"Services.Config.Metadata\", Metadata);\nGp.extend(\"Services.Config.Originator\", Originator);\nGp.extend(\"Services.Config.Service\", Service);\nGp.extend(\"Services.Config.Style\", Style);\nGp.extend(\"Services.Config.Territory\", Territory);\nGp.extend(\"Services.Config.Thematic\", Thematic);\nGp.extend(\"Services.Config.TileMatrix\", TM);\nGp.extend(\"Services.Config.TileMatrixLimit\", TMLimit);\nGp.extend(\"Services.Config.TileMatrixSet\", TMS);\n// Export Geocode\nGp.extend(\"Services.GeocodeResponse\", GeocodeResponse);\nGp.extend(\"Services.Geocode.GeocodedLocation\", GeocodedLocation);\nGp.extend(\"Services.Geocode.DirectGeocodedLocation\", DirectGeocodedLocation);\nGp.extend(\"Services.Geocode.ReverseGeocodedLocation\", ReverseGeocodedLocation);\n// Export IsoCurve\nGp.extend(\"Services.IsoCurveResponse\", IsoCurveResponse);\n// Export Route\nGp.extend(\"Services.RouteResponse\", RouteResponse);\nGp.extend(\"Services.Route.RouteInstruction\", RouteInstruction);\n// Export Erreurs et Outils\nGp.extend(\"Error\", Error);\nGp.extend(\"Helper\", Helper);\n// Export DefaultUrls\nGp.extend(\"Services.DefaultUrl\", DefaultUrl);\n\nexport default Gp; // = export { Gp as default };\n" - }, - { - "id": 45, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Services.js", - "name": "./src/Services/Services.js", - "index": 2, - "index2": 98, - "size": 34733, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 52, - "building": 115 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/Services", - "loc": "1:0-43" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "/* eslint no-unused-vars: [\"error\", { \"varsIgnorePattern\": \"point|circle|bbox\" }] */\n\n/**\n* Geoportal web services invocation namespace.\n*\n* @module Services\n* @alias Gp.Services\n*/\nimport Alti from \"./Alti/Alti\";\nimport AutoConf from \"./AutoConf/AutoConf\";\nimport Geocode from \"./Geocode/Geocode\";\nimport ReverseGeocode from \"./Geocode/ReverseGeocode\";\nimport AutoComplete from \"./AutoComplete/AutoComplete\";\nimport Route from \"./Route/Route\";\nimport ProcessIsoCurve from \"./ProcessIsoCurve/ProcessIsoCurve\";\n\nvar Services = {\n /**\n * Access to Geoportal resources metadata availables with one ore several keys, using [Auto-configuration service]{@link https://wxs.ign.fr/APIKEY/autoconf} of the Geoportal platform.\n *\n * @method getConfig\n * @param {Object} options - Options for function call.\n * @param {String} options.apiKey - Access key to Geoportal platform, obtained [here]{@link http://professionnels.ign.fr/ign/contrats}.\n * @param {Function} options.onSuccess - Callback function for getting successful service response. Takes a {@link Gp.Services.GetConfigResponse} object as a parameter except if \"rawResponse\" parameter is set to true : a String will be returned.\n * @param {Function} [options.onFailure] - Callback function for handling unsuccessful service responses (timeOut, missing rights, ...). Takes a {@link Gp.Error} object as parameter.\n * @param {Number} [options.timeOut=0] - Number of milliseconds above which a timeOut response will be returned with onFailure callback (see above). Default value is 0 which means timeOut will not be handled.\n * @param {String} [options.serverUrl=http (s)://wxs.ign.fr/APIKEY/autoconf] - Web service URL. If used, options.apiKey parameter is ignored. Only use if you know what you're doing.\n * @param {String} [options.protocol=JSONP] - Protocol used to handle dialog with web service. Possible values are 'JSONP' ({@link https://en.wikipedia.org/wiki/JSONP}) and 'XHR' ({@link https://en.wikipedia.org/wiki/XMLHttpRequest}). Only XHR protocol is supported in a NodeJS environment. Only use if you know what you're doing.\n * @param {String} [options.proxyURL] - Proxy URL to use when requesting an underlying web service. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you're doing.\n * @param {String} [options.callbackSuffix] - Callback function name suffix to use in case of a JSONP protocol use (see above), to set your own suffix instead of auto-increment. Ignored when options.protocol is set to 'XHR' value. Only use if you know what you're doing.\n * @param {String} [options.httpMethod=GET] - HTTP method to use when requesting underlying web service in case of a XHR protocol use (see above). Possible values are 'GET' and 'POST'. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {String} [options.contentType=\"application/xml\"] - Content-Type to use when requesting underlying web service in case of a XHR protocol use (see above) and if method HTTP is POST. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {Boolean} [options.rawResponse=false] - Setting this parameter to true implies you want to handle the service response by yourself : it will be returned as an unparsed String in onSuccess callback parameter. Only use if you know what you are doing.\n * @param {Function} [options.onBeforeParse] - Callback function for handling service response before parsing (as an unparsed String). Takes a String as a parameter (the raw service response). Returns a String that will be parsed as the service response. Only use if you know what you are doing.\n */\n getConfig : function (options) {\n var autoconfService = new AutoConf(options);\n autoconfService.call();\n },\n\n /**\n * Getting elevations in or along of one or several points on french territories using the [elevation services of the Geoportal Platform]{@link https://geoservices.ign.fr/documentation/geoservices/alti.html}.
\n * Two use cases are availables :
\n * 1. getting elevations of the given points : don't use the options.sampling parameter ;
\n * 2. getting a regular set of elevations along the given points : use the options.sampling parameter.\n *\n * @method getAltitude\n * @param {Object} options - Options for function call.\n * @param {String} options.apiKey - Access key to Geoportal platform, obtained [here]{@link http://professionnels.ign.fr/ign/contrats}.\n * @param {Array.} options.positions - Array of positions ({lon:float, lat:float}) expressed in CRS:84 coordinates system, where to get elevations. 50 positions maximum may be given. 2 positions minimum are required if you use the options.sampling parameter.\n * @param {Number} [options.sampling] - Number of points to use (between 2 and 5000) in order to compute an elevation path. The points given with the options.positions parameter are used to fix the planimetric path along which the elevations will be computed.
\n * If not used, only elevations of these positions will be returned.\n * @param {Boolean} [options.zonly=false] - Set this parameter to true if you only want to have elevations returned without corresponding coordinates.\n * @param {Function} options.onSuccess - Callback function for getting successful service response. Takes a {@link Gp.Services.AltiResponse} object as a parameter, except if \"rawResponse\" is set to true.\n * @param {Function} [options.onFailure] - Callback function for handling unsuccessful service responses (timeOut, missing rights, ...). Takes a {@link Gp.Error} object as parameter.\n * @param {Number} [options.timeOut=0] - Number of milliseconds above which a timeOut response will be returned with onFailure callback (see above). Default value is 0 which means timeOut will not be handled.\n * @param {String} [options.serverUrl=http (s)://wxs.ign.fr/APIKEY/alti/rest/elevation.json] - Web service URL. If used, options.apiKey parameter is ignored. Only use if you know what you're doing.\n * @param {String} [options.protocol=XHR] - Protocol used to handle dialog with web service. Possible values are 'JSONP' ({@link https://en.wikipedia.org/wiki/JSONP}) and 'XHR' ({@link https://en.wikipedia.org/wiki/XMLHttpRequest}). Only XHR protocol is supported in a NodeJS environment. Only use if you know what you're doing.\n * @param {String} [options.proxyURL] - Proxy URL to use when requesting underlying web service. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you're doing.\n * @param {String} [options.callbackSuffix] - Callback function name suffix to use in case of a JSONP protocol use (see above), to set your own suffix instead of auto-increment. Ignored when options.protocol is set to 'XHR' value. Only use if you know what you're doing.\n * @param {String} [options.httpMethod=GET] - HTTP method to use when requesting underlying web service in case of a XHR protocol use (see above). Possible values are 'GET' and 'POST'. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {String} [options.contentType=\"application/xml\"] - Content-Type to use when requesting underlying web service in case of a XHR protocol use (see above) and if method HTTP is POST. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {Boolean} [options.rawResponse=false] - Setting this parameter to true implies you want to handle the service response by yourself : it will be returned as an unparsed String in onSuccess callback parameter. Only use if you know what you are doing.\n * @param {Function} [options.onBeforeParse] - Callback function for handling service response before parsing (as an unparsed String). Takes a String as a parameter (the raw service response). Returns a String that will be parsed as the service response. Only use if you know what you are doing.\n * @param {String} [options.api='REST'] - What API to use for interacting with underlying web service : 'REST' or 'WPS'. Only use if you know what you are doing.\n * @param {String} [options.outputFormat='xml'] - Output format for underlying web service response : 'xml' or 'json'. Only use if you know what you are doing.\n */\n getAltitude : function (options) {\n var altiService = new Alti(options);\n altiService.call();\n },\n /**\n * Getting positon of a geographic identifier (places names, address, cadastral parcel, other...) using the [geocoding web service of the Geoportal Platform]{@link https://geoservices.ign.fr/documentation/geoservices/geocodage.html}.\n *\n * @example\n * Gp.Services.geocode ({\n * apiKey : \"jhyvi0fgmnuxvfv0zjzorvdn\",\n * location : \"73 avenue de Paris, Saint-Mandé\",\n * // traitement des resultats\n * onSuccess : function (result) {\n * console.log(\"found (x:\"+result.position.x+\", y:\"+result.position.y+\")\") ;\n * }\n * }) ;\n *\n *\n * @method geocode\n * @param {Object} options - Options for function call.\n * @param {String} options.apiKey - Access key to Geoportal platform, obtained [here]{@link http://professionnels.ign.fr/ign/contrats}.\n * @param {String|Object} options.location - Geographic identifier to locate. May be provided as a single String or a structured Object for an address search. In this last case, the following properties are availaibles.\n * @param {Number} [options.location.number] - Street number.\n * @param {String} [options.location.street] - Street name.\n * @param {String} [options.location.city] - City name.\n * @param {Number} [options.location.postalCode] - Postal Code\n * @param {Object} [options.filterOptions] - Additional filters to apply to search. The following properties may be given.\n * @param {Gp.BBox} [options.filterOptions.bbox] - Bounding box where to perform the search. Properties expressed in options.srs coordinates system.\n * @param {Array.} [options.filterOptions.type] - Geographical identifier types to search. Values currently availables are : \"PositionOfInterest\" for place names, \"StreetAddress\" for address search, \"CadastralParcel\" for Cadastral parcels search. Default is \"StreetAddress\".\n *\n * @param {String} [options.filterOptions.[prop]] - Additionnal properties to filter search. Properties depends on options.filterOptions.type, and values type should be \"String\".\n *

\n * Common Properties availables for all search types :
\n * \"municipality\", \"insee\", \"department\".\n *

\n * Properties availables for address search :
\n * \"quality\", \"ID\", \"ID_TR\" and \"territory\".\n *

\n * Properties availables for place names search :
\n * \"importance\", \"nature\" and \"territory\".\n *

\n * Properties availables for cadastral parcels search :
\n * \"sheet\", \"section\", and \"absorbedcity\".\n * @param {Number} [options.maximumResponses = 25] - Maximum number of responses. Default underlying service value applies (25) if not provided.\n * @param {Boolean} [options.returnFreeForm = false] - Set this parameter to true if you wish to have an address returned in a single String (unstructured). If unset, default underlying service value (false) applies.\n * @param {String} [options.srs = EPSG:4326] - Coordinates System used to expres coordinates for parameters and responses. Default underlying service value (EPSG:4326) applies.\n * @param {Function} options.onSuccess - Callback function for getting successful service response. Takes a {@link Gp.Services.GeocodeResponse} object as a parameter except if \"rawResponse\" is set to true.\n * @param {Function} [options.onFailure] - Callback function for handling unsuccessful service responses (timeOut, missing rights, ...). Takes a {@link Gp.Error} object as parameter.\n * @param {Number} [options.timeOut=0] - Number of milliseconds above which a timeOut response will be returned with onFailure callback (see above). Default value is 0 which means timeOut will not be handled.\n * @param {String} [options.serverUrl=http (s)://wxs.ign.fr/APIKEY/geoportail/ols] - Web service URL. If used, options.apiKey parameter is ignored. Only use if you know what you're doing.\n * @param {String} [options.protocol=XHR] - Protocol used to handle dialog with web service. Possible values are 'JSONP' ({@link https://en.wikipedia.org/wiki/JSONP}) and 'XHR' ({@link https://en.wikipedia.org/wiki/XMLHttpRequest}). Only XHR protocol is supported in a NodeJS environment. Only use if you know what you're doing.\n * @param {String} [options.proxyURL] - Proxy URL to use when requesting underlying web service. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you're doing.\n * @param {String} [options.callbackSuffix] - Callback function name suffix to use in case of a JSONP protocol use (see above), to set your own suffix instead of auto-increment. Ignored when options.protocol is set to 'XHR' value. Only use if you know what you're doing.\n * @param {String} [options.httpMethod=GET] - HTTP method to use when requesting underlying web service in case of a XHR protocol use (see above). Possible values are 'GET' and 'POST'. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {String} [options.contentType=\"application/xml\"] - Content-Type to use when requesting underlying web service in case of a XHR protocol use (see above) and if method HTTP is POST. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {Boolean} [options.rawResponse=false] - Setting this parameter to true implies you want to handle the service response by yourself : it will be returned as an unparsed String in onSuccess callback parameter. Only use if you know what you are doing.\n * @param {Function} [options.onBeforeParse] - Callback function for handling service response before parsing (as an unparsed String). Takes a String as a parameter (the raw service response). Returns a String that will be parsed as the service response. Only use if you know what you are doing.\n */\n geocode : function (options) {\n var geocodeService = new Geocode(options);\n geocodeService.call();\n },\n /**\n * Retrieving geographical identifiers (place names, address, cadastral parcels, ...) near a given position, using the [reverse geocoding web service of the Geoportal Platform]{@link https://geoservices.ign.fr/documentation/geoservices/geocodage-inverse.html}.\n *\n * @method reverseGeocode\n * @param {Object} options - Options for function call.\n * @param {String} options.apiKey - Access key to Geoportal platform, obtained [here]{@link http://professionnels.ign.fr/ign/contrats}.\n * @param {Gp.Point} options.position - Reference position where to search geographical identifiers. Its coordinates are expressed in the coordinates system given with options.srs parameter. (default is CRS:84, that means position.x is the longitude and position.y the latitude)\n * @param {Object} [options.filterOptions] - Additional filters to apply to search. The following properties may be given.\n * @param {Array.} [options.filterOptions.type] - Geographical identifier types to search. Values currently availables are : \"PositionOfInterest\" for place names, \"StreetAddress\" for address search, \"CadastralParcel\" for Cadastral parcels search. Default is \"StreetAddress\".\n * @param {Gp.BBox} [options.filterOptions.bbox] - Bounding box where to perform the search. Expressed in options.srs coordinates system.\n * @param {Gp.Circle} [options.filterOptions.circle] - Circle where to perform the search. Expressed in options.srs coordinates system.\n * @param {Array.} [options.filterOptions.polygon] - Polygon where to perform the search. Expressed in options.srs coordinates system.\n * @param {Number} [options.maximumResponses] - Maximum number of responses. Default underlying service value applies (25) if not provided.\n * @param {Boolean} [options.returnFreeForm = false] - Set this parameter to true if you wish to have an address returned in a single String (unstructured). If unset, default underlying service value (false) applies.\n * @param {String} [options.srs = CRS:84] - Coordinates System used to express coordinates for parameters and responses. Only WGS 84 geographical positioning is supported. Therefore, two values are allowed : \"CRS:84\" (position.x is the longitude and position.y the latitude) and \"EPSG:4326\" (position.x is the latitude and position.y the longitude) . Default is CRS:84.\n * @param {Function} options.onSuccess - Callback function for getting successful service response. Takes a {@link Gp.Services.GeocodeResponse} object as a parameter except if \"rawResponse\" is set to true.\n * @param {Function} [options.onFailure] - Callback function for handling unsuccessful service responses (timeOut, missing rights, ...). Takes a {@link Gp.Error} object as parameter.\n * @param {Number} [options.timeOut=0] - Number of milliseconds above which a timeOut response will be returned with onFailure callback (see above). Default value is 0 which means timeOut will not be handled.\n * @param {String} [options.serverUrl=http (s)://wxs.ign.fr/APIKEY/geoportail/ols] - Web service URL. If used, options.apiKey parameter is ignored. Only use if you know what you're doing.\n * @param {String} [options.protocol=XHR] - Protocol used to handle dialog with web service. Possible values are 'JSONP' ({@link https://en.wikipedia.org/wiki/JSONP}) and 'XHR' ({@link https://en.wikipedia.org/wiki/XMLHttpRequest}). Only XHR protocol is supported in a NodeJS environment. Only use if you know what you're doing.\n * @param {String} [options.proxyURL] - Proxy URL to use when requesting underlying web service. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you're doing.\n * @param {String} [options.callbackSuffix] - Callback function name suffix to use in case of a JSONP protocol use (see above), to set your own suffix instead of auto-increment. Ignored when options.protocol is set to 'XHR' value. Only use if you know what you're doing.\n * @param {String} [options.httpMethod=GET] - HTTP method to use when requesting underlying web service in case of a XHR protocol use (see above). Possible values are 'GET' and 'POST'. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {String} [options.contentType=\"application/xml\"] - Content-Type to use when requesting underlying web service in case of a XHR protocol use (see above) and if method HTTP is POST. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {Boolean} [options.rawResponse=false] - Setting this parameter to true implies you want to handle the service response by yourself : it will be returned as an unparsed String in onSuccess callback parameter. Only use if you know what you are doing.\n * @param {Function} [options.onBeforeParse] - Callback function for handling service response before parsing (as an unparsed String). Takes a String as a parameter (the raw service response). Returns a String that will be parsed as the service response. Only use if you know what you are doing.\n */\n reverseGeocode : function (options) {\n var reverseGeocodeService = new ReverseGeocode(options);\n reverseGeocodeService.call();\n },\n /**\n * Getting suggestions of probable places names or address based on uncomplete texts, using the [autocompletion service of the Geoportal Platform]{@link https://geoservices.ign.fr/documentation/geoservices/autocompletion.html}\n *\n * @method autoComplete\n * @param {Object} options - Options for function call.\n * @param {String} options.apiKey - Access key to Geoportal platform, obtained [here]{@link http://professionnels.ign.fr/ign/contrats}.\n * @param {String} options.text - Text input to complete.\n * @param {Array.} [options.filterOptions.type = \"StreetAddress\"] - Suggestion types to provide : address (\"StreetAddress\") and/or place name (\"PositionOfInterest\").\n * @param {Array.} [options.filterOptions.territory] - Places where to limit the search of suggestions : \"METROPOLE\" (Corsica and metropolitan France), \"DOMTOM\" (French overseas departments and territories), or an INSEE code of a department. No limitation by default. For instance : ['METROPOLE', '31']\n * @param {Number} [options.maximumResponses = 10] - Maximum number of responses.\n * @param {Function} options.onSuccess - Callback function for getting successful service response. Takes a {@link Gp.Services.AutoCompleteResponse} object as a parameter except if \"rawResponse\" is set to true.\n * @param {Function} [options.onFailure] - Callback function for handling unsuccessful service responses (timeOut, missing rights, ...). Takes a {@link Gp.Error} object as parameter.\n * @param {Number} [options.timeOut=0] - Number of milliseconds above which a timeOut response will be returned with onFailure callback (see above). Default value is 0 which means timeOut will not be handled.\n * @param {String} [options.serverUrl=http (s)://wxs.ign.fr/APIKEY/ols/apis/completion] - Web service URL. If used, options.apiKey parameter is ignored. Only use if you know what you're doing.\n * @param {String} [options.protocol=XHR] - Protocol used to handle dialog with web service. Possible values are 'JSONP' ({@link https://en.wikipedia.org/wiki/JSONP}) and 'XHR' ({@link https://en.wikipedia.org/wiki/XMLHttpRequest}). Only XHR protocol is supported in a NodeJS environment. Only use if you know what you're doing.\n * @param {String} [options.proxyURL] - Proxy URL to use when requesting underlying web service. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you're doing.\n * @param {String} [options.callbackSuffix] - Callback function name suffix to use in case of a JSONP protocol use (see above), to set your own suffix instead of auto-increment. Ignored when options.protocol is set to 'XHR' value. Only use if you know what you're doing.\n * @param {String} [options.httpMethod=GET] - HTTP method to use when requesting underlying web service in case of a XHR protocol use (see above). Possible values are 'GET' and 'POST'. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {String} [options.contentType=\"application/xml\"] - Content-Type to use when requesting underlying web service in case of a XHR protocol use (see above) and if method HTTP is POST. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {Boolean} [options.rawResponse=false] - Setting this parameter to true implies you want to handle the service response by yourself : it will be returned as an unparsed String in onSuccess callback parameter. Only use if you know what you are doing.\n * @param {Function} [options.onBeforeParse] - Callback function for handling service response before parsing (as an unparsed String). Takes a String as a parameter (the raw service response). Returns a String that will be parsed as the service response. Only use if you know what you are doing.\n */\n autoComplete : function (options) {\n var autoCompleteService = new AutoComplete(options);\n autoCompleteService.call();\n },\n /**\n * Getting a route from one point to another using the [route service of the Geoportal Platform]{@link https://geoservices.ign.fr/documentation/geoservices/itineraires.html}.\n *\n * @method route\n * @param {Object} options - Options for function call.\n * @param {String} options.apiKey - Access key to Geoportal platform, obtained [here]{@link http://professionnels.ign.fr/ign/contrats}.\n * @param {String} [options.routePreference = \"fastest\"] - Indicates the way to compute the route : \"fastest\" (time optimisation) or \"shortest\" (distance optimisation).\n * @param {Gp.Point} options.startPoint - Start point of the route. Expressed in CRS:84 coordinates system (startPoint.x corresponds to longitude, startPoint.y corresponds to latitude).\n * @param {Gp.Point} options.endPoint - End point of the route. Expressed in CRS:84 coordinates system (endPoint.x corresponds to longitude, endPoint.y corresponds to latitude).\n * @param {Array.} [options.viaPoints] - Ordered via Points of the route. Expressed in CRS:84 coordinates system (viaPoints[i].x corresponds to longitude, viaPoints[i].y corresponds to latitude).\n * @param {String} [options.graph = \"Voiture\"] - User profile to use to compute the route : \"Voiture\" (using a vehicule) or \"Pieton\" (pedestrian). Has an influence on the kind of roads the route may use and the average speed.\n * @param {Array.} [options.exclusions] - Indicates if route has to avoid some features (\"toll\", \"bridge\" or \"tunnel\").\n * @param {Boolean} [options.geometryInInstructions = false] - Indicates if route geometry has to be also returned with route instructions.\n * @param {Boolean} [options.provideBoundingBox = true] - Indicates if route instructions has to be localised with a BBOX in the response.\n * @param {String} [options.distanceUnit = \"km\"] - The unit used to provide distances in the response (\"m\" or \"km\").\n * @param {Function} options.onSuccess - Callback function for getting successful service response. Takes a {@link Gp.Services.RouteResponse} object as a parameter except if \"rawResponse\" is set to true.\n * @param {Function} [options.onFailure] - Callback function for handling unsuccessful service responses (timeOut, missing rights, ...). Takes a {@link Gp.Error} object as parameter.\n * @param {Number} [options.timeOut=0] - Number of milliseconds above which a timeOut response will be returned with onFailure callback (see above). Default value is 0 which means timeOut will not be handled.\n * @param {String} [options.outputFormat='json'] - Output format (\"json\" or \"xml\") to use for underlying webService. Only use if you know what you are doing.\n * @param {String} [options.serverUrl=http (s)://wxs.ign.fr/APIKEY/itineraire/rest/route.json] - Web service URL. If used, options.apiKey parameter is ignored. Only use if you know what you're doing.\n * @param {String} [options.protocol=XHR] - Protocol used to handle dialog with web service. Possible values are 'JSONP' ({@link https://en.wikipedia.org/wiki/JSONP}) and 'XHR' ({@link https://en.wikipedia.org/wiki/XMLHttpRequest}). Only XHR protocol is supported in a NodeJS environment. Only use if you know what you're doing.\n * @param {String} [options.proxyURL] - Proxy URL to use when requesting underlying web service. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you're doing.\n * @param {String} [options.callbackSuffix] - Callback function name suffix to use in case of a JSONP protocol use (see above), to set your own suffix instead of auto-increment. Ignored when options.protocol is set to 'XHR' value. Only use if you know what you're doing.\n * @param {String} [options.httpMethod=GET] - HTTP method to use when requesting underlying web service in case of a XHR protocol use (see above). Possible values are 'GET' and 'POST'. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {String} [options.contentType=\"application/xml\"] - Content-Type to use when requesting underlying web service in case of a XHR protocol use (see above) and if method HTTP is POST. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {Boolean} [options.rawResponse=false] - Setting this parameter to true implies you want to handle the service response by yourself : it will be returned as an unparsed String in onSuccess callback parameter. Only use if you know what you are doing.\n * @param {Function} [options.onBeforeParse] - Callback function for handling service response before parsing (as an unparsed String). Takes a String as a parameter (the raw service response). Returns a String that will be parsed as the service response. Only use if you know what you are doing.\n */\n route : function (options) {\n var routeService = new Route(options);\n routeService.call();\n },\n /**\n * Computing a set of places (curve) reachable from a given point (or from where to start to reach a given point) within a time or distance constraint using the [isochrone service of the Geoportal Platform]{@link https://geoservices.ign.fr/documentation/geoservices/isochrones.html}.\n *\n * @method isoCurve\n * @param {Object} options - Options for function call.\n * @param {String} options.apiKey - Access key to Geoportal platform, obtained [here]{@link http://professionnels.ign.fr/ign/contrats}.\n * @param {Gp.Point} options.position - Start or Arrival (options.reverse===true) Point for the computing. Expressed in CRS:84 coordinates system (position.x corresponds to longitude, position.y corresponds to latitude).\n * @param {String} [options.graph = \"Voiture\"] - User profile to use to compute the isoCurve : \"Voiture\" (using a vehicule) or \"Pieton\" (pedestrian). Has an influence on the kind of roads to use and the average speed.\n * @param {Array.} [options.exclusions] - Indicates if route has to avoid some features (\"toll\", \"bridge\" or \"tunnel\").\n * @param {String} [options.method = \"time\"] - Computing method to use : \"time\" (using a duration as a constraint) or \"distance\" (using a distance as a constraint).\n * @param {Float} options.time - Maximum duration (expressed in seconds) to use when options.method is set to \"time\".\n * @param {Float} options.distance - Maximum distance (expressed in meters) to use when options.method is set to \"distance\".\n * @param {Boolean} [options.reverse = false] - Set this parameter to true if you want options.position to be the destination (instead of departure) for the computing.\n * @param {Boolean} [options.smoothing = false] - Set this parameter to true if you want the resulting geometry to be smoothed.\n * @param {Boolean} [options.holes = false] - Set this parameter to true if you want the resulting geometry (polygon) to have holes if pertinent.\n * @param {Function} options.onSuccess - Callback function for getting successful service response. Takes a {@link Gp.Services.IsoCurveResponse} object as a parameter except if \"rawResponse\" is set to true.\n * @param {Function} [options.onFailure] - Callback function for handling unsuccessful service responses (timeOut, missing rights, ...). Takes a {@link Gp.Error} object as parameter.\n * @param {Number} [options.timeOut=0] - Number of milliseconds above which a timeOut response will be returned with onFailure callback (see above). Default value is 0 which means timeOut will not be handled.\n * @param {String} [options.outputFormat='json'] - Output format (\"json\" or \"xml\") to use for underlying webService. Only use if you know what you are doing.\n * @param {String} [options.serverUrl=http (s)://wxs.ign.fr/APIKEY/isochrone/isochrone.json] - Web service URL. If used, options.apiKey parameter is ignored. Only use if you know what you're doing.\n * @param {String} [options.protocol=XHR] - Protocol used to handle dialog with web service. Possible values are 'JSONP' ({@link https://en.wikipedia.org/wiki/JSONP}) and 'XHR' ({@link https://en.wikipedia.org/wiki/XMLHttpRequest}). Only XHR protocol is supported in a NodeJS environment. Only use if you know what you're doing.\n * @param {String} [options.proxyURL] - Proxy URL to use when requesting underlying web service. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you're doing.\n * @param {String} [options.callbackSuffix] - Callback function name suffix to use in case of a JSONP protocol use (see above), to set your own suffix instead of auto-increment. Ignored when options.protocol is set to 'XHR' value. Only use if you know what you're doing.\n * @param {String} [options.httpMethod=GET] - HTTP method to use when requesting underlying web service in case of a XHR protocol use (see above). Possible values are 'GET' and 'POST'. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {String} [options.contentType=\"application/xml\"] - Content-Type to use when requesting underlying web service in case of a XHR protocol use (see above) and if method HTTP is POST. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {Boolean} [options.rawResponse=false] - Setting this parameter to true implies you want to handle the service response by yourself : it will be returned as an unparsed String in onSuccess callback parameter. Only use if you know what you are doing.\n * @param {Function} [options.onBeforeParse] - Callback function for handling service response before parsing (as an unparsed String). Takes a String as a parameter (the raw service response). Returns a String that will be parsed as the service response. Only use if you know what you are doing.\n */\n isoCurve : function (options) {\n var processIsoCurveService = new ProcessIsoCurve(options);\n processIsoCurveService.call();\n }\n};\n\n/**\n * Point object.\n *\n * @namespace\n * @alias Gp.Point\n *\n * @property {Float} x - Point abscissa\n * @property {Float} y - Point ordinate\n */\nvar point = {};\n\n/**\n * Circle object.\n *\n * @namespace\n * @alias Gp.Circle\n *\n * @property {Float} x - Circle center abscissa.\n * @property {Float} y - Circle center ordinate.\n * @property {Float} radius - Circle radius.\n */\nvar circle = {};\n\n/**\n * Bounding box object, expressed with four coordinates.\n *\n * @namespace\n * @alias Gp.BBox\n *\n * @property {Float} left - minimum abscissa\n * @property {Float} right - maximum abscissa\n * @property {Float} bottom - minimum ordinate\n * @property {Float} top - maximum ordinate\n */\nvar bbox = {};\n\nexport default Services;\n" - }, - { - "id": 46, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Alti.js", - "name": "./src/Services/Alti/Alti.js", - "index": 3, - "index2": 27, - "size": 8785, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Services.js", - "issuerId": 45, - "issuerName": "./src/Services/Services.js", - "profile": { - "factory": 512, - "building": 54, - "dependencies": 2 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 45, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Services.js", - "module": "./src/Services/Services.js", - "moduleName": "./src/Services/Services.js", - "type": "harmony import", - "userRequest": "./Alti/Alti", - "loc": "9:0-31" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 3, - "source": "\nimport Logger from \"../../Utils/LoggerByDefault\";\nimport _ from \"../../Utils/MessagesResources\";\nimport ErrorService from \"../../Exceptions/ErrorService\";\nimport CommonService from \"../CommonService\";\nimport DefaultUrlService from \"../DefaultUrlService\";\nimport AltiRequestFactory from \"./Request/AltiRequestFactory\";\nimport AltiResponseFactory from \"./Response/AltiResponseFactory\";\n\n/**\n * @classdesc\n *\n * Appel du service d'altimétrie du Géoportail\n *\n * @todo gestion du parma. output et callback\n * @todo outputFormat (REST) et format (WPS)\n * @todo La reponse JSON peut encapsuler un XML !\n *\n * @constructor\n * @extends {Gp.Services.CommonService}\n * @alias Gp.Services.Alti\n * @param {Object} options - options spécifiques au service (+ les options heritées)\n *\n * @param {Array.} options.positions - Tableau ({lon:float,lat:float}) contenant les coordonnées des points (CRS:84)\n * dont on veut connaître les altitudes (ou à partir desquelles on va calculer le profil).\n * Chaque élément du tableau est un objet JavaScript avec deux attributs : lon et lat, qui sont des flottants.\n * Minimum 2 éléments si on souhaite calculer un profil altimétrique (ElevationLine).\n * Maximum 50 éléments.\n *\n * @param {String} options.outputFormat - Le format de la réponse du service alti : 'xml' ou 'json'.\n * Ce paramètre déterminera l'extension '.xml' ou '.json' du service dans le cas de l'API REST,\n * ou la valeur du paramètre 'format' dans le cas de la norme WPS.\n * Nécessaire si serverUrl est renseigné, et qu'on souhaite passer par l'API REST,\n * pour connaître le format dans lequel sera fournie la réponse (pour son traitement).\n * Non nécessaire pour la norme WPS. Par défaut, ce paramètre vaut 'json'.\n *\n * @param {Number} [options.sampling] - Nombre de points à utiliser pour déterminer le tracé d'un profil altimétrique, compris entre 2 et 5000.\n * A spécifier lorsqu'on souhaite accéder à cette fonctionnalité.\n * Dans ce cas, les points fournis en entrée (au minimum de deux) servent à déterminer l'axe planimétrique\n * le long duquel le profil doit être calculé.\n * Si le paramètre sampling n'est pas spécifié ou moins de deux points sont fournis,\n * c'est le service Elevation qui sera interrogé (altitudes simples calculées pour les points fournis).\n * Une valeur de sampling strictement inférieure à 2 déclenchera un échantillonnage avec la valeur par défaut du service (3 points).\n *\n * @param {String} [options.api] - Manière d'accéder au service : 'REST' (via l'API REST) ou 'WPS' (via la norme WPS).\n * Par défaut, on utilise l'API REST.\n *\n * @param {Boolean} [options.zonly] - Permet de ne récupérer que les altitudes en sortie s'il vaut 'true'.\n * Vaut 'false' par défaut.\n *\n * @example\n * var options = {\n * apiKey : null,\n * serverUrl : 'http://localhost/service/',\n * protocol : 'JSONP', // JSONP|XHR\n * proxyURL : null,\n * httpMethod : 'GET', // GET|POST\n * timeOut : 10000, // ms\n * rawResponse : false, // true|false\n * scope : null, // this\n * onSuccess : function (response) {},\n * onFailure : function (error) {},\n * // spécifique au service\n * positions : [{lon:, lat:}, {lon:, lat:}],\n * outputFormat : 'json' // json|xml\n * sampling : 3,\n * api : 'REST', // REST|WPS\n * zonly : false // false|true\n * };\n *\n * @private\n */\nfunction Alti (options) {\n if (!(this instanceof Alti)) {\n throw new TypeError(_.getMessage(\"CLASS_CONSTRUCTOR\", \"Alti\"));\n }\n\n /**\n * Nom de la classe (heritage)\n * FIXME instance ou classe ?\n */\n this.CLASSNAME = \"Alti\";\n\n // appel du constructeur par heritage\n CommonService.apply(this, arguments);\n\n this.logger = Logger.getLogger(\"Gp.Services.Alti\");\n this.logger.trace(\"[Constructeur Alti (options)]\");\n\n // #####################\n // analyse des options\n // #####################\n\n if (!options.positions) {\n throw new Error(_.getMessage(\"PARAM_MISSING\", \"positions\"));\n }\n\n if (options.positions.length === 0) {\n throw new Error(_.getMessage(\"PARAM_EMPTY\", \"positions\"));\n }\n\n // ajout des options spécifiques au service\n this.options.positions = options.positions;\n\n // format de réponse du service : \"json\" ou \"xml\" (valeur par défaut), en minuscule !\n this.options.outputFormat = (typeof options.outputFormat === \"string\") ? options.outputFormat.toLowerCase() : \"xml\";\n\n // sampling\n this.options.sampling = options.sampling || null;\n\n // type d'api utilisé pour requeter le service, en majuscule !\n this.options.api = (typeof options.api === \"string\") ? options.api.toUpperCase() : \"REST\";\n\n // l'api ne peut être interrogée qu'en GET.\n if (this.options.api === \"REST\") {\n this.options.httpMethod = \"GET\";\n }\n\n // param. zonly\n this.options.zonly = options.zonly || false;\n\n // gestion de l'url du service par defaut\n // si l'url n'est pas renseignée, il faut utiliser les urls par defaut\n // en fonction du type d'api, REST ou WPS, du format de reponse demandé (outputFormat)\n // ainsi que sur le type de service (profil ou elevation)\n if (!this.options.serverUrl) {\n var lstUrlByDefault = DefaultUrlService.Alti.url(this.options.apiKey);\n var urlFound = null;\n switch (this.options.api) {\n case \"WPS\":\n urlFound = lstUrlByDefault.wps;\n break;\n case \"REST\":\n var key = (options.sampling ? \"profil\" : \"elevation\") + \"-\" + this.options.outputFormat;\n urlFound = lstUrlByDefault[key];\n break;\n default:\n throw new Error(_.getMessage(\"PARAM_UNKNOWN\", \"api\"));\n }\n\n if (!urlFound) {\n throw new Error(\"Url by default not found !\");\n }\n this.options.serverUrl = urlFound;\n this.logger.trace(\"Server URL by default : \" + this.options.serverUrl);\n }\n\n // gestion du type de service\n // si l'extension de l'url est .json ou .xml, on surcharge le format de sortie (outputFormat)\n var idx = this.options.serverUrl.lastIndexOf(\".\");\n if (idx !== -1) {\n var extension = this.options.serverUrl.substring(idx + 1);\n if (extension && extension.length < 5) { // FIXME extension de moins de 4 car. ...\n this.logger.trace(\"Server Extension URL : \" + extension);\n switch (extension.toLowerCase()) {\n case \"json\":\n case \"xml\":\n this.options.outputFormat = extension.toLowerCase();\n break;\n default:\n throw new Error(\"type of service : unknown or unsupported (json or xml) !\");\n }\n }\n }\n}\n\n/**\n * @lends module:Alti#\n */\nAlti.prototype = Object.create(CommonService.prototype, {\n // todo\n // getter/setter\n});\n\n/**\n * Constructeur (alias)\n */\nAlti.prototype.constructor = Alti;\n\n/**\n * Création de la requête (overwrite)\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nAlti.prototype.buildRequest = function (error, success) {\n // utilisation en mode callback\n var options = {\n httpMethod : this.options.httpMethod,\n // callback\n onSuccess : function (result) {\n // sauvegarde de la requete !\n this.request = result;\n success.call(this, this.request);\n },\n onError : error,\n scope : this,\n // spécifique au service :\n positions : this.options.positions,\n outputFormat : this.options.outputFormat,\n sampling : this.options.sampling,\n api : this.options.api,\n zonly : this.options.zonly\n };\n\n AltiRequestFactory.build(options);\n};\n\n/**\n * Analyse de la reponse (overwrite)\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nAlti.prototype.analyzeResponse = function (error, success) {\n // INFO\n // Factory pour masquer la complexité du retour du service qui renvoie soit\n // - une 'string' qui contient du XML ou JSON natif en mode XHR\n // - un objet JSON qui est natif ou encapsulé\n\n if (this.response) {\n var options = {\n response : this.response,\n outputFormat : this.options.outputFormat, // utile pour parser la string en mode XHR : JSON ou XML !\n rawResponse : this.options.rawResponse,\n onError : error,\n onSuccess : success,\n scope : this\n };\n\n AltiResponseFactory.build(options);\n } else {\n error.call(this, new ErrorService(_.getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n }\n};\n\nexport default Alti;\n" - }, - { - "id": 47, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/loglevel/lib/loglevel.js", - "name": "./node_modules/loglevel/lib/loglevel.js", - "index": 5, - "index2": 0, - "size": 7862, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Utils/LoggerByDefault.js", - "issuerId": 0, - "issuerName": "./src/Utils/LoggerByDefault.js", - "profile": { - "factory": 610, - "building": 988 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 0, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Utils/LoggerByDefault.js", - "module": "./src/Utils/LoggerByDefault.js", - "moduleName": "./src/Utils/LoggerByDefault.js", - "type": "harmony import", - "userRequest": "loglevel", - "loc": "2:0-32" - } - ], - "usedExports": [ - "enableAll", - "getLogger" - ], - "providedExports": null, - "optimizationBailout": [], - "depth": 4, - "source": "/*\n* loglevel - https://github.com/pimterry/loglevel\n*\n* Copyright (c) 2013 Tim Perry\n* Licensed under the MIT license.\n*/\n(function (root, definition) {\n \"use strict\";\n if (typeof define === 'function' && define.amd) {\n define(definition);\n } else if (typeof module === 'object' && module.exports) {\n module.exports = definition();\n } else {\n root.log = definition();\n }\n}(this, function () {\n \"use strict\";\n\n // Slightly dubious tricks to cut down minimized file size\n var noop = function() {};\n var undefinedType = \"undefined\";\n\n var logMethods = [\n \"trace\",\n \"debug\",\n \"info\",\n \"warn\",\n \"error\"\n ];\n\n // Cross-browser bind equivalent that works at least back to IE6\n function bindMethod(obj, methodName) {\n var method = obj[methodName];\n if (typeof method.bind === 'function') {\n return method.bind(obj);\n } else {\n try {\n return Function.prototype.bind.call(method, obj);\n } catch (e) {\n // Missing bind shim or IE8 + Modernizr, fallback to wrapping\n return function() {\n return Function.prototype.apply.apply(method, [obj, arguments]);\n };\n }\n }\n }\n\n // Build the best logging method possible for this env\n // Wherever possible we want to bind, not wrap, to preserve stack traces\n function realMethod(methodName) {\n if (methodName === 'debug') {\n methodName = 'log';\n }\n\n if (typeof console === undefinedType) {\n return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives\n } else if (console[methodName] !== undefined) {\n return bindMethod(console, methodName);\n } else if (console.log !== undefined) {\n return bindMethod(console, 'log');\n } else {\n return noop;\n }\n }\n\n // These private functions always need `this` to be set properly\n\n function replaceLoggingMethods(level, loggerName) {\n /*jshint validthis:true */\n for (var i = 0; i < logMethods.length; i++) {\n var methodName = logMethods[i];\n this[methodName] = (i < level) ?\n noop :\n this.methodFactory(methodName, level, loggerName);\n }\n\n // Define log.log as an alias for log.debug\n this.log = this.debug;\n }\n\n // In old IE versions, the console isn't present until you first open it.\n // We build realMethod() replacements here that regenerate logging methods\n function enableLoggingWhenConsoleArrives(methodName, level, loggerName) {\n return function () {\n if (typeof console !== undefinedType) {\n replaceLoggingMethods.call(this, level, loggerName);\n this[methodName].apply(this, arguments);\n }\n };\n }\n\n // By default, we use closely bound real methods wherever possible, and\n // otherwise we wait for a console to appear, and then try again.\n function defaultMethodFactory(methodName, level, loggerName) {\n /*jshint validthis:true */\n return realMethod(methodName) ||\n enableLoggingWhenConsoleArrives.apply(this, arguments);\n }\n\n function Logger(name, defaultLevel, factory) {\n var self = this;\n var currentLevel;\n var storageKey = \"loglevel\";\n if (name) {\n storageKey += \":\" + name;\n }\n\n function persistLevelIfPossible(levelNum) {\n var levelName = (logMethods[levelNum] || 'silent').toUpperCase();\n\n if (typeof window === undefinedType) return;\n\n // Use localStorage if available\n try {\n window.localStorage[storageKey] = levelName;\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=\" + levelName + \";\";\n } catch (ignore) {}\n }\n\n function getPersistedLevel() {\n var storedLevel;\n\n if (typeof window === undefinedType) return;\n\n try {\n storedLevel = window.localStorage[storageKey];\n } catch (ignore) {}\n\n // Fallback to cookies if local storage gives us nothing\n if (typeof storedLevel === undefinedType) {\n try {\n var cookie = window.document.cookie;\n var location = cookie.indexOf(\n encodeURIComponent(storageKey) + \"=\");\n if (location !== -1) {\n storedLevel = /^([^;]+)/.exec(cookie.slice(location))[1];\n }\n } catch (ignore) {}\n }\n\n // If the stored level is not valid, treat it as if nothing was stored.\n if (self.levels[storedLevel] === undefined) {\n storedLevel = undefined;\n }\n\n return storedLevel;\n }\n\n /*\n *\n * Public logger API - see https://github.com/pimterry/loglevel for details\n *\n */\n\n self.name = name;\n\n self.levels = { \"TRACE\": 0, \"DEBUG\": 1, \"INFO\": 2, \"WARN\": 3,\n \"ERROR\": 4, \"SILENT\": 5};\n\n self.methodFactory = factory || defaultMethodFactory;\n\n self.getLevel = function () {\n return currentLevel;\n };\n\n self.setLevel = function (level, persist) {\n if (typeof level === \"string\" && self.levels[level.toUpperCase()] !== undefined) {\n level = self.levels[level.toUpperCase()];\n }\n if (typeof level === \"number\" && level >= 0 && level <= self.levels.SILENT) {\n currentLevel = level;\n if (persist !== false) { // defaults to true\n persistLevelIfPossible(level);\n }\n replaceLoggingMethods.call(self, level, name);\n if (typeof console === undefinedType && level < self.levels.SILENT) {\n return \"No console available for logging\";\n }\n } else {\n throw \"log.setLevel() called with invalid level: \" + level;\n }\n };\n\n self.setDefaultLevel = function (level) {\n if (!getPersistedLevel()) {\n self.setLevel(level, false);\n }\n };\n\n self.enableAll = function(persist) {\n self.setLevel(self.levels.TRACE, persist);\n };\n\n self.disableAll = function(persist) {\n self.setLevel(self.levels.SILENT, persist);\n };\n\n // Initialize with the right level\n var initialLevel = getPersistedLevel();\n if (initialLevel == null) {\n initialLevel = defaultLevel == null ? \"WARN\" : defaultLevel;\n }\n self.setLevel(initialLevel, false);\n }\n\n /*\n *\n * Top-level API\n *\n */\n\n var defaultLogger = new Logger();\n\n var _loggersByName = {};\n defaultLogger.getLogger = function getLogger(name) {\n if (typeof name !== \"string\" || name === \"\") {\n throw new TypeError(\"You must supply a name when creating a logger.\");\n }\n\n var logger = _loggersByName[name];\n if (!logger) {\n logger = _loggersByName[name] = new Logger(\n name, defaultLogger.getLevel(), defaultLogger.methodFactory);\n }\n return logger;\n };\n\n // Grab the current global log variable in case of overwrite\n var _log = (typeof window !== undefinedType) ? window.log : undefined;\n defaultLogger.noConflict = function() {\n if (typeof window !== undefinedType &&\n window.log === defaultLogger) {\n window.log = _log;\n }\n\n return defaultLogger;\n };\n\n defaultLogger.getLoggers = function getLoggers() {\n return _loggersByName;\n };\n\n return defaultLogger;\n}));\n" - }, - { - "id": 48, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Protocols/Protocol.js", - "name": "./src/Protocols/Protocol.js", - "index": 10, - "index2": 12, - "size": 6108, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/CommonService.js", - "issuerId": 3, - "issuerName": "./src/Services/CommonService.js", - "profile": { - "factory": 451, - "building": 32, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 1, - "reasons": [ - { - "moduleId": 3, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/CommonService.js", - "module": "./src/Services/CommonService.js", - "moduleName": "./src/Services/CommonService.js", - "type": "harmony import", - "userRequest": "../Protocols/Protocol", - "loc": "4:0-45" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "/**\n * Protocols : Interface de dialogue avec les webservices\n *\n * @module Protocols\n * @private\n * @alias Gp.Protocols.Protocols\n */\nimport Helper from \"../Utils/Helper\";\nimport XHR from \"./XHR\";\nimport JSONP from \"./JSONP\";\n\nvar Protocol = {\n\n /**\n * Interface unique d\"envoi d\"une requête.\n *\n * @method send\n * @static\n * @param {Object} options - options generales\n * @param {String} options.url - url du service\n * @param {String} options.method - GET, POST, PUT, DELETE\n * @param {String} options.protocol - XHR | JSONP\n * @param {String} options.format - format de la reponse du service : json, xml ou null (brute)...\n * @param {String} options.wrap - encapsuler la reponse du service dans du JSON : true|false (true par defaut sur le protocole JSONP)\n * @param {String} options.callbackSuffix - suffixe de la fonction de callback (JSONP uniquement) (ex: si callbackSuffix=\"\", la fonction s'appellera \"callback\")\n * @param {String} options.timeOut - 0 ms\n * @param {Boolean} options.nocache - true|false\n * @param {Object|String} options.data - content (post) ou param (get)\n * @param {Object|String} options.headers - (post) ex. referer\n * @param {Object|String} options.content - (post) ex. \"application/json\"\n * @param {String} options.scope - this (TODO)\n * @param {Function} options.onResponse - callback\n * @param {Function} options.onFailure - callback\n * @param {Function} options.onTimeOut - callback\n * @param {String} options.proxyUrl - (TODO)\n */\n send : function (options) {\n // INFO\n // \"output\" - param est interne à la classe \"Protocol\" (parametrable via \"wrap\"), et à ajouter à l\"url\n // ce param est independant du service car il est géré par le filtre LUA :\n // ex. json|xml (json par defaut).\n // Ce param. permet d\"encapsuler du XML dans du JSON :\n // {http : {status:200, error:null},xml :\"réponse du service\"}\n // Utile pour les services qui ne repondent que du XML (ex. Geocodage)\n //\n // |-------------------------------------------------|\n // | \\service | | | |\n // | output\\ format| json | xml | remarques |\n // |--------\\------|------|-----|--------------------|\n // | json | json | json| json/xml encapsulé |\n // | xml | json | xml | param inactif |\n // |-------------------------------------------------|\n // ex. le service demande une reponse native au \"format\" json et avec un \"output\" json.\n // on a donc une reponse json encapsulé dans un json : ce qu'on ne souhaite pas !\n // dans ce cas on ne renseigne pas output=json\n\n // INFO\n // \"wrap\" - choix d\"encapsuler ou non les reponses dans du JSON.\n // Par defaut, on encapsule uniquement les reponses sur le protocole JSONP (et qui sont en xml) !\n\n // INFO\n // \"callback\" - param est interne à la classe \"Protocol\" (non parametrable), et à ajouter à l\"url\n // ce param est independant du service car il est géré aussi par le filtre LUA :\n // ex. callback|null\n // Ce param. permet de renvoyer une reponse javascript :\n // callback ({http : {status:200, error:null},xml :\"réponse du service\"})\n // Ce param. est non renseigné par defaut car pour du JSONP, on utilise le\n // le protocol JSONP, et ce dernier implemente déjà le callback !\n\n // settings par defaut\n var settings = options || {\n method : \"GET\",\n // protocol : \"JSONP\",\n protocol : \"XHR\",\n timeOut : 0,\n format : null,\n wrap : true,\n nocache : true,\n output : \"json\",\n callback : null,\n callbackSuffix : null\n };\n\n // on determine l'environnement d'execution : browser ou non ?\n // et on stoppe pour nodeJS... sur un protocole JSONP !\n if (typeof window === \"undefined\" && options.protocol === \"JSONP\") {\n console.log(\"Value (s) for parameter (s) 'protocol=JSONP (instead use XHR)' not supported to NodeJS\");\n return;\n }\n\n if (options.protocol === \"XHR\" || options.format === \"json\") {\n settings.wrap = false;\n } else if (options.protocol === \"JSONP\" && options.format === \"xml\") {\n settings.wrap = true;\n }\n\n settings.callback = (options.protocol === \"JSONP\") ? null : null; // FIXME non géré !?\n settings.output = settings.wrap ? \"json\" : null;\n\n // on encapsule les reponses dans un objet JSON\n if (settings.wrap) {\n var params = {};\n params.output = settings.output;\n params.callback = settings.callback;\n delete params.callback; // FIXME non géré !?\n settings.url = Helper.normalyzeUrl(options.url, params);\n }\n\n // choix de l\"implementation :\n // XHR ou JSONP\n switch (settings.protocol) {\n case \"XHR\":\n // on normalise l'url (gestion du cache)\n if (options.method === \"GET\" && options.nocache) {\n settings.url = Helper.normalyzeUrl(settings.url, {\n t : new Date().getTime()\n });\n }\n // appel du service en XHR\n XHR.call(settings);\n break;\n case \"JSONP\":\n\n // on normalise l'url si les params. sont renseignés dans la string|object \"data\"\n if (settings.data) {\n settings.url = Helper.normalyzeUrl(settings.url, settings.data);\n }\n\n // appel du service en JSONP\n JSONP.call(settings);\n break;\n default:\n throw new Error(\"protocol not supported (XHR|JSONP) !\");\n }\n }\n\n};\n\nexport default Protocol;\n" - }, - { - "id": 49, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/es6-promise/dist/es6-promise.js", - "name": "./node_modules/es6-promise/dist/es6-promise.js", - "index": 12, - "index2": 7, - "size": 29288, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Protocols/XHR.js", - "issuerId": 19, - "issuerName": "./src/Protocols/XHR.js", - "profile": { - "factory": 812, - "building": 398 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 19, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Protocols/XHR.js", - "module": "./src/Protocols/XHR.js", - "moduleName": "./src/Protocols/XHR.js", - "type": "harmony import", - "userRequest": "es6-promise", - "loc": "5:0-37" - } - ], - "usedExports": [ - "default" - ], - "providedExports": null, - "optimizationBailout": [], - "depth": 3, - "source": "/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.4+314e4831\n */\n\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.ES6Promise = factory());\n}(this, (function () { 'use strict';\n\nfunction objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\n\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nvar isArray = _isArray;\n\nvar len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}\n\nfunction then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve$1(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n resolve(promise, object);\n return promise;\n}\n\nvar PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar TRY_CATCH_ERROR = { error: null };\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n TRY_CATCH_ERROR.error = error;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) {\n try {\n then$$1.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then$$1) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then$$1, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then$$1) {\n if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then$$1 === TRY_CATCH_ERROR) {\n reject(promise, TRY_CATCH_ERROR.error);\n TRY_CATCH_ERROR.error = null;\n } else if (then$$1 === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then$$1)) {\n handleForeignThenable(promise, maybeThenable, then$$1);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = void 0,\n failed = void 0;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n}\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve$$1 = c.resolve;\n\n\n if (resolve$$1 === resolve$1) {\n var _then = getThen(entry);\n\n if (_then === then && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise$1) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve$$1) {\n return resolve$$1(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve$$1(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all(entries) {\n return new Enumerator(this, entries).promise;\n}\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject$1(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n reject(promise, reason);\n return promise;\n}\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise$1 = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n };\n\n return Promise;\n}();\n\nPromise$1.prototype.then = then;\nPromise$1.all = all;\nPromise$1.race = race;\nPromise$1.resolve = resolve$1;\nPromise$1.reject = reject$1;\nPromise$1._setScheduler = setScheduler;\nPromise$1._setAsap = setAsap;\nPromise$1._asap = asap;\n\n/*global self*/\nfunction polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise$1;\n}\n\n// Strange compat..\nPromise$1.polyfill = polyfill;\nPromise$1.Promise = Promise$1;\n\nreturn Promise$1;\n\n})));\n\n\n\n//# sourceMappingURL=es6-promise.map\n" - }, - { - "id": 50, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/process/browser.js", - "name": "./node_modules/process/browser.js", - "index": 13, - "index2": 5, - "size": 5418, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/es6-promise/dist/es6-promise.js", - "issuerId": 49, - "issuerName": "./node_modules/es6-promise/dist/es6-promise.js", - "profile": { - "factory": 152, - "building": 984 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 49, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/es6-promise/dist/es6-promise.js", - "module": "./node_modules/es6-promise/dist/es6-promise.js", - "moduleName": "./node_modules/es6-promise/dist/es6-promise.js", - "type": "cjs require", - "userRequest": "process", - "loc": "1:0-37" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [], - "depth": 4, - "source": "// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n" - }, - { - "id": 51, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/webpack/buildin/global.js", - "name": "(webpack)/buildin/global.js", - "index": 14, - "index2": 6, - "size": 509, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/es6-promise/dist/es6-promise.js", - "issuerId": 49, - "issuerName": "./node_modules/es6-promise/dist/es6-promise.js", - "profile": { - "factory": 177, - "building": 965 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 49, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/es6-promise/dist/es6-promise.js", - "module": "./node_modules/es6-promise/dist/es6-promise.js", - "moduleName": "./node_modules/es6-promise/dist/es6-promise.js", - "type": "cjs require", - "userRequest": "global", - "loc": "1:0-44" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [], - "depth": 4, - "source": "var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n" - }, - { - "id": 52, - "identifier": "external {\"commonjs2\":\"request\",\"commonjs\":\"request\",\"amd\":\"require\"}", - "name": "external {\"commonjs2\":\"request\",\"commonjs\":\"request\",\"amd\":\"require\"}", - "index": 15, - "index2": 8, - "size": 42, - "cacheable": false, - "built": false, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Protocols/XHR.js", - "issuerId": 19, - "issuerName": "./src/Protocols/XHR.js", - "profile": { - "factory": 1, - "building": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 19, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Protocols/XHR.js", - "module": "./src/Protocols/XHR.js", - "moduleName": "./src/Protocols/XHR.js", - "type": "cjs require", - "userRequest": "request", - "loc": "162:30-48" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [], - "depth": 3 - }, - { - "id": 53, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Protocols/JSONP.js", - "name": "./src/Protocols/JSONP.js", - "index": 17, - "index2": 11, - "size": 10034, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Protocols/Protocol.js", - "issuerId": 48, - "issuerName": "./src/Protocols/Protocol.js", - "profile": { - "factory": 966, - "building": 49, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 1, - "reasons": [ - { - "moduleId": 48, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Protocols/Protocol.js", - "module": "./src/Protocols/Protocol.js", - "moduleName": "./src/Protocols/Protocol.js", - "type": "harmony import", - "userRequest": "./JSONP", - "loc": "10:0-28" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 6, - "source": "/**\n * JSONP : Implémentation du protocole JSONP de la plateforme Géoportail (cf. {@link https://github.com/sobstel/jsonp.js}).\n *\n * @module JSONP\n * @private\n * @alias Gp.Protocols.JSONP\n */\nimport Logger from \"../Utils/LoggerByDefault\";\n\nvar JSONP = {\n\n /**\n * Construction d'un identifiant statique basé sur le timestamp,\n * et qui s'incremente de +1 à chaque appel\n */\n uuid : (function () {\n var id = Math.floor(Date.now());\n return function () {\n return id++;\n };\n })(),\n\n /**\n * Cette fonction réalise l'appel du service fourni via le paramètre \"options.url\"\n * en mettant en œuvre le protocole JSONP.\n *\n * @method call\n * @static\n * @param {Object} options - parametres d'invocation du service en JSONP\n * @param {String} options.url - URL du service à invoquer (indépendamment du protocole JSONP).\n * Cette URL contient déjà les paramètres du service.\n * Si le paramètre dédié à la mise en oeuvre du protocole JSONP (callback=xxx) n'est pas présent, il est rajouté par la fonction ;\n * sa valeur est déterminée en fonction du paramètre callbackName.\n * @param {Number} [options.timeOut = 0] - Nombre de ms au bout duquel on considère que le service n'a pas répondu.\n * Une valeur de 0 pour ce paramètre permet de désactiver la gestion du timeOut.\n * @param {String} [options.callbackSuffix = null] - Suffixe de la fonction de callback à rajouter sur l'URL.\n * Si aucun suffixe n'est spécifié (cas par défaut), on utilisera l'identifiant this.uuid () comme suffixe. Ex: \"callback1458574396582 ()\"\n * @param {String} [options.callbackName = gp.protocol.jsonp] - Valeur du paramètre callback à rajouter sur l'URL.\n * Si l'URL fournie contient déjà le paramètre callback, le paramètre callbackName ne sera pas pris en compte.\n * La fonction de callback est créée dynamiquement par la fonction JSONP ;\n * elle a deux fonctions :\n * elle annule la condition de timeOut\n * puis appelle la fonction fournie par l'utilisateur via le paramètre onResponse.\n * @param {Function} options.onResponse - Nom de la fonction qui sera appelée lors de la réception des résultats du service.\n * Ce paramètre sera ignoré si l'URL contient déjà le paramètre callback.\n * La fonction de rappel appelée sera alors celle ayant pour nom la valeur de ce paramètre.\n * @param {Function} [options.onTimeOut] - Nom de la fonction qui sera appelée en cas de non réponse du service.\n * Le temps au bout duquel on considère que le service n'a pas répondu est déterminé par le paramètre timeOut.\n * @example\n * var options = {\n * url : 'http://localhost/some/test.json&callback=myResults',\n * timeOut : 100,\n * callbackName : 'myResults',\n * callbackSuffix : \"\",\n * onResponse : function (response) {\n * console.log('results : ', response);\n * },\n *\n * };\n * JSONP.call(options);\n */\n call : function (options) {\n // logger\n var logger = Logger.getLogger(\"JSONP\");\n logger.trace(\"[JSONP::call ()]\");\n\n // analyse parametres\n\n if (!options) {\n logger.error(\"missing parameter : options !\");\n throw new Error(\"missing parameter : options !\");\n }\n\n if (!options.url) {\n logger.error(\"missing parameter : options.url !\");\n throw new Error(\"missing parameter : options.url !\");\n }\n\n if (!options.timeOut) {\n logger.info(\"setting 'options.timeOut' default value\");\n options.timeOut = 0;\n }\n\n // FIXME si un callback coté client a été mis en place,\n // cette condition sur cette methode n'a pas de sens !?\n if (!options.onResponse) {\n logger.error(\"missing parameter : options.onResponse !\");\n throw new Error(\"missing parameter : options.onResponse !\");\n // FIXME doit on definir un callback interne par defaut !?\n // options.onResponse = function (data) {\n // console.log(\"response callback (inner) : \", data);\n // };\n }\n\n // ID du callback à utiliser : null ou string.\n // si l'utilisateur a spécifié un suffixe pour le callback, on le récupère comme un ID (ex: options.callbackSuffix = \"\")\n // sinon, on utilise un timestamp : this.uuid ()\n var callbackId = (typeof options.callbackSuffix === \"string\") ? options.callbackSuffix : this.uuid();\n\n // on recherche le parametre callback et son nom de fonction dans l'url\n var urlHasCallbackKey = false;\n var urlHasCallbackName = false;\n\n var idx = options.url.indexOf(\"callback=\");\n\n if (idx !== -1) {\n urlHasCallbackKey = true;\n // extraction callbackName de l'url : entre \"callback=\" et \"&\" ou fin de ligne\n var j = options.url.indexOf(\"&\", idx);\n if (j === -1) {\n j = options.url.length;\n }\n\n // on ecrase le parametre options.callbackName s'il avait été défini\n var callbackName = options.url.substring(idx + 9, j);\n\n if (callbackName) {\n urlHasCallbackName = true;\n options.callbackName = callbackName;\n logger.info(\"setting 'options.callbackName' value (\" + options.callbackName + \") from 'options.url' parameter\");\n }\n }\n\n // on ajoute le parametre callback dans l'URL s'il n'existe pas\n if (!urlHasCallbackKey) {\n // gestion des autres param. et \"?\"\n var k = options.url.indexOf(\"?\");\n if (k === -1) {\n // aucun param., ni de '?'\n options.url = options.url + \"?\" + \"callback=\";\n } else if (k === options.url.length) {\n // uniquement le '?'\n options.url = options.url + \"callback=\";\n } else {\n // le '?' et les param. existent\n options.url = options.url + \"&\" + \"callback=\";\n }\n logger.info(\"setting callback default key in 'options.url' : \" + options.url);\n }\n\n // utilisation de la fonction callback coté client ?\n var HasCallbackName = options.callbackName ? true : urlHasCallbackName;\n\n // on ajoute le nom de la fonction callback dans l'URL si elle n'existe pas\n if (!urlHasCallbackName) {\n // fonction callback par defaut\n if (!options.callbackName) {\n logger.info(\"setting 'options.callbackName' default value\");\n options.callbackName = \"callback\"; // ou \"gp.protocol.jsonp\" ?\n // info : si on ne veut pas gerer d'ID dans le callback,\n // options.callbackSuffix = \"\"\n if (callbackId || callbackId === \"\") {\n options.callbackName += callbackId;\n }\n }\n options.url = options.url.replace(\"callback=\", \"callback=\" + options.callbackName);\n logger.info(\"setting callback function name in 'options.url' : \" + options.url);\n }\n\n // timeOut par defaut\n if (!options.onTimeOut) {\n logger.info(\"setting 'options.onTimeOut' default value\");\n /** callback timeout par defaut */\n options.onTimeOut = function (/* error */) {\n console.log(\"TimeOut while invoking url : \" + options.url);\n };\n }\n\n if (!HasCallbackName) {\n var self = this;\n\n // event du timeout\n var onTimeOutTrigger = null;\n\n // declenche le timeout si > à 0 !\n if (options.timeOut > 0) {\n onTimeOutTrigger = window.setTimeout(\n function () {\n /** fonction de reponse du service */\n window[options.callbackName] = function () {};\n options.onTimeOut();\n self._deleteScript(callbackId);\n }, options.timeOut);\n }\n\n // FIXME le nom de la fonction n'accepte pas de namespace !\n // ex. Gp.Function.callback\n /**\n * fonction de reponse du service\n * @param {Object} data - data\n * @private\n */\n window[options.callbackName] = function (data) {\n window.clearTimeout(onTimeOutTrigger);\n options.onResponse(data);\n self._deleteScript(callbackId);\n };\n }\n\n this._createScript(callbackId, options.url);\n },\n\n /**\n * create Script\n * @param {String} callbackId - callback Id\n * @param {String} url - url\n * @private\n */\n _createScript : function (callbackId, url) {\n var scriptu;\n var scripto = document.getElementById(\"results\" + callbackId);\n\n scriptu = document.createElement(\"script\");\n scriptu.setAttribute(\"type\", \"text/javascript\");\n scriptu.setAttribute(\"src\", url);\n scriptu.setAttribute(\"charset\", \"UTF-8\");\n scriptu.setAttribute(\"id\", \"results\" + callbackId);\n scriptu.setAttribute(\"async\", \"true\"); // FIXME async ?\n // head ou body ou autres ?\n var node = document.documentElement || document.getElementsByTagName(\"head\")[0];\n if (scripto === null) {\n node.appendChild(scriptu);\n } else {\n // s'il existe déjà, on le remplace !\n node.replaceChild(scriptu, scripto);\n }\n },\n\n /**\n * delete Script\n * @param {String} callbackId - callback Id\n * @private\n */\n _deleteScript : function (callbackId) {\n var script = document.getElementById(\"results\" + callbackId);\n if (script) {\n var node = script.parentNode || document.documentElement;\n if (!node) {\n return;\n }\n node.removeChild(script);\n }\n }\n};\n\nexport default JSONP;\n" - }, - { - "id": 54, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestFactory.js", - "name": "./src/Services/Alti/Request/AltiRequestFactory.js", - "index": 19, - "index2": 21, - "size": 4471, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Alti.js", - "issuerId": 46, - "issuerName": "./src/Services/Alti/Alti.js", - "profile": { - "factory": 367, - "building": 424, - "dependencies": 3 - }, - "failed": false, - "errors": 0, - "warnings": 1, - "reasons": [ - { - "moduleId": 46, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Alti.js", - "module": "./src/Services/Alti/Alti.js", - "moduleName": "./src/Services/Alti/Alti.js", - "type": "harmony import", - "userRequest": "./Request/AltiRequestFactory", - "loc": "7:0-62" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 4, - "source": "/**\n * Creation d'une requête en REST ou WPS\n * (Factory)\n *\n * @module AltiRequestFactory\n * @alias Gp.Services.Alti.Request.AltiRequestFactory\n * @private\n */\nimport Logger from \"../../../Utils/LoggerByDefault\";\nimport ErrorService from \"../../../Exceptions/ErrorService\";\nimport AltiRequestREST from \"./AltiRequestREST\";\nimport AltiRequestWPS from \"./AltiRequestWPS\";\n\nvar AltiRequestFactory = {\n\n /**\n * interface unique\n *\n * @method build\n * @static\n * @param {Object} options - options definies dans le composant Alti\n *\n * @example\n * var options = {\n * httpMethod : 'GET', // GET|POST\n * onSuccess : function (response) {},\n * onError : function (error) {},\n * scope : this,\n * positions : [{lon:, lat:}, {lon:, lat:}],\n * outputFormat : 'json' // json|xml\n * sampling : 3,\n * api : 'REST', // REST|WPS\n * zonly : false // false|true\n * };\n *\n */\n build : function (options) {\n // logger\n var logger = Logger.getLogger(\"AltiRequestFactory\");\n logger.trace([\"AltiRequestFactory::build()\"]);\n\n var request = null;\n\n // on factorise les options par groupe;\n // - global,\n // - param, les params pour les data inputs\n // - wps, les param du service\n // - callback\n\n var settings = {\n // ajout des valeurs par defaut spécifiques au service\n type : options.sampling ? \"Profil\" : \"Elevation\",\n method : options.httpMethod,\n param : {\n positions : null,\n delimiter : null, // FIXME par defaut, on ne le met pas en place car ça fait planter la requête !?\n indent : null, // par defaut\n crs : null, // par defaut\n format : null, // (only to POST)\n sampling : null, // (only use by Profil)\n zonly : null // (only use by Elevation)\n }\n };\n\n // surcharge des valeurs obligatoires\n settings.param.positions = options.positions;\n settings.param.format = options.outputFormat;\n settings.param.sampling = options.sampling;\n settings.param.zonly = options.zonly;\n\n // gestion des callback\n var bOnError = !!((options.onError !== null && typeof options.onError === \"function\"));\n var bOnSuccess = !!((options.onSuccess !== null && typeof options.onSuccess === \"function\"));\n\n var message = null;\n switch (options.api) {\n case \"REST\":\n // FIXME les exceptions ne sont pas 'catchées' sur le constructeur !\n var myReq = new AltiRequestREST(settings);\n if (!myReq.processRequestString()) {\n message = \"Error in process request (rest) !\";\n if (bOnError) {\n options.onError.call(options.scope, new ErrorService(message));\n return;\n }\n throw new Error(message);\n }\n request = myReq.requestString;\n break;\n case \"WPS\":\n // ajout des valeurs par defaut spécifiques au service WPS\n settings.wps = {\n service : null, // par defaut\n version : null, // par defaut\n identifier : null, // par defaut\n rawdataoutput : null, // par defaut\n request : null // par defaut\n };\n\n request = AltiRequestWPS.build(settings);\n if (!request) {\n message = \"Error in process request (wps) !\";\n if (bOnError) {\n options.onError.call(options.scope, new ErrorService(message));\n return;\n }\n throw new Error(message);\n }\n break;\n default:\n message = \"Type of API is not supported by service (REST or WPS) !\";\n if (bOnError) {\n options.onError.call(options.scope, new ErrorService(message));\n return;\n }\n throw new Error(message);\n }\n\n if (bOnSuccess) {\n options.onSuccess.call(options.scope, request);\n }\n\n return request;\n }\n};\n\nexport default AltiRequestFactory;\n" - }, - { - "id": 55, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestREST.js", - "name": "./src/Services/Alti/Request/AltiRequestREST.js", - "index": 20, - "index2": 18, - "size": 6649, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestFactory.js", - "issuerId": 54, - "issuerName": "./src/Services/Alti/Request/AltiRequestFactory.js", - "profile": { - "factory": 119, - "building": 198, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 1, - "reasons": [ - { - "moduleId": 54, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestFactory.js", - "module": "./src/Services/Alti/Request/AltiRequestFactory.js", - "moduleName": "./src/Services/Alti/Request/AltiRequestFactory.js", - "type": "harmony import", - "userRequest": "./AltiRequestREST", - "loc": "11:0-48" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "/* jshint multistr : true */\n\nimport Logger from \"../../../Utils/LoggerByDefault\";\nimport _ from \"../../../Utils/MessagesResources\";\nimport AltiElevationRequest from \"./model/AltiElevationRequest\";\nimport AltiProfilRequest from \"./model/AltiProfilRequest\";\n\n/**\n * @classdesc\n * Classe de gestion des requêtes de type REST sur le service altimetrique.\n *\n * @todo Le service Alti n'implemente pas le POST !?\n * @constructor\n * @alias Gp.Services.Alti.Request.AltiRequestREST\n * @param {Object} options - options\n * @param {Object} options.param.positions - tableau de coordonnées lon/lat\n * @param {String} options.param.delimiter - '|'\n * @param {Boolean} options.param.indent - false|true\n * @param {String} options.param.crs - 'CRS:84'\n * @param {String} options.param.sampling - 3\n * @param {Boolean} options.param.zonly - false|true\n * @param {String} options.param.format - \"JSON|XML\"\n * @param {String} options.type - \"Profil|Elevation\"\n * @param {String} options.method - GET|POST\n *\n * @example\n * var options = {\n * type : 'Profil', // Elevation\n * method : 'GET', // par defaut\n * param : {\n * positions : [\n * {lon:'1.11', lat:'1.11'},\n * {lon:'1.10', lat:'1.10'},\n * {lon:'1.12', lat:'1.12'}\n * ],\n * delimiter : \";\", // par defaut\n * indent : true, // par defaut\n * crs : 'EPSG:4326', // par defaut\n * format : 'json', // par defaut (only to POST)\n * sampling : 3 , // par defaut (only use by Profil)\n * zonly : false // par defaut (only use by Elevation)\n * }\n * };\n *\n * var result;\n * try {\n * var obj = new AltiRequestREST (options);\n * if (! obj.processRequestString ()) {\n * throw new Error(\"Request empty !?\")\n * }\n * result = obj.requestString;\n * } catch (e) {\n * // exceptions...\n * }\n * @private\n */\nfunction AltiRequestREST (options) {\n this.logger = Logger.getLogger(\"AltiRequestREST\");\n this.logger.trace(\"[Constructeur AltiRequestREST ()]\");\n\n if (!(this instanceof AltiRequestREST)) {\n throw new TypeError(\"AltiRequestREST constructor cannot be called as a function.\");\n }\n\n this.options = options || {};\n\n // existance des options\n if (!this.options) {\n throw new Error(_.getMessage(\"PARAM_EMPTY\", \"options\"));\n }\n\n // type de requete : Altitude ou Profil\n // (param. à determiner en fonction des parametres d'entrée)\n if (!this.options.type) {\n throw new Error(_.getMessage(\"PARAM_EMPTY\", \"type (Elevation or Profil)\"));\n }\n\n // construction du modele de requête\n // (test du type d'objet candidat)\n this.DataObject = null;\n switch (this.options.type) {\n case \"Elevation\":\n this.DataObject = new AltiElevationRequest(this.options.param);\n break;\n case \"Profil\":\n this.DataObject = new AltiProfilRequest(this.options.param);\n break;\n default:\n throw new Error(_.getMessage(\"PARAM_TYPE\", \"type (Elevation or Profil)\"));\n }\n\n /**\n * methode.\n * Par defaut, \"GET\".\n */\n this.method = this.options.method || \"GET\";\n}\n\nAltiRequestREST.prototype = {\n\n /**\n * request\n * @type {String}\n */\n requestString : null,\n\n /**\n * Constructeur (alias)\n */\n constructor : AltiRequestREST,\n\n /**\n * Template de la requête.\n */\n template : {\n get : {\n // FIXME on retire le param 'delimiter' : &delimiter='__DELIMITER__'\n value : \"lon=__LON__&lat=__LAT__&indent=__INDENT__&crs='__CRS__'\",\n input : {\n point : \"&zonly=__ZONLY__\",\n profil : \"&sampling=__SAMPLING__\"\n }\n },\n post : {\n // FIXME on retire le param 'delimiter' : delimiter='__DELIMITER__'\\n\\\n value : \"lon=__LON__\\n\" +\n \"lat=__LAT__\\n\" +\n \"indent=__INDENT__\\n\" +\n \"crs='__CRS__'\\n\",\n input : {\n point : \"zonly=__ZONLY__\",\n profil : \"sampling=__SAMPLING__\"\n }\n }\n },\n\n /**\n * Construction de la requête.\n *\n * @example\n * // GET out : lon=0.2367,2.1570&lat=48.0551,46.6077&delimiter=,&indent=true&zonly=true&crs='CRS:84'\n * // POST out : Not yet supported method POST !\n * @returns {String}\n */\n processRequestString : function () {\n this.logger.trace(\"AltiRequestREST::processRequestString ()\");\n\n var template = \"\";\n if (this.method === \"POST\") {\n template = this.template.post.value;\n } else if (this.method === \"GET\") {\n template = this.template.get.value;\n }\n\n template = template.replace(/__LON__/g, this.DataObject.getLon());\n template = template.replace(/__LAT__/g, this.DataObject.getLat());\n // FIXME on retire le param 'delimiter'\n // template = template.replace(/__DELIMITER__/g, this.DataObject.delimiter);\n template = template.replace(/__INDENT__/g, this.DataObject.indent);\n template = template.replace(/__CRS__/g, this.DataObject.crs);\n\n // ajout +\n template = template + this.__addDataInputs();\n this.logger.trace(\"traduction tmpl\", template);\n\n // sauvegarde\n this.requestString = template;\n\n return this.requestString;\n },\n\n /**\n * Ajout de parametres spécifiques (ex. zonly)\n *\n * @returns {String}\n */\n __addDataInputs : function () {\n this.logger.trace(\"AltiRequestREST::addDataInput ()\");\n\n var myTemplate;\n if (this.method === \"POST\") {\n myTemplate = this.template.post;\n } else if (this.method === \"GET\") {\n myTemplate = this.template.get;\n } else {\n throw new Error(\"No other HTTP method supported by the service !\");\n }\n\n var tmpl = null;\n if (this.DataObject.CLASSNAME === \"AltiElevationRequest\") {\n tmpl = myTemplate.input.point;\n return tmpl.replace(/__ZONLY__/g, this.DataObject.zonly);\n } else if (this.DataObject.CLASSNAME === \"AltiProfilRequest\") {\n tmpl = myTemplate.input.profil;\n return tmpl.replace(/__SAMPLING__/g, this.DataObject.sampling);\n } else {\n throw new Error(\"No other object supported than elevation or profil !?\");\n }\n }\n};\n\nexport default AltiRequestREST;\n" - }, - { - "id": 56, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestWPS.js", - "name": "./src/Services/Alti/Request/AltiRequestWPS.js", - "index": 24, - "index2": 20, - "size": 4406, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestFactory.js", - "issuerId": 54, - "issuerName": "./src/Services/Alti/Request/AltiRequestFactory.js", - "profile": { - "factory": 120, - "building": 212, - "dependencies": 786 - }, - "failed": false, - "errors": 0, - "warnings": 1, - "reasons": [ - { - "moduleId": 54, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestFactory.js", - "module": "./src/Services/Alti/Request/AltiRequestFactory.js", - "moduleName": "./src/Services/Alti/Request/AltiRequestFactory.js", - "type": "harmony import", - "userRequest": "./AltiRequestWPS", - "loc": "12:0-46" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "/**\n * Classe d'interface des requêtes de type WPS sur le service altimetrique.\n * (Factory)\n *\n * @module Gp.Services.Alti.Request.AltiRequestWPS\n * @alias Gp.Services.Alti.Request.AltiRequestWPS\n * @private\n */\nimport Logger from \"../../../Utils/LoggerByDefault\";\nimport _ from \"../../../Utils/MessagesResources\";\nimport WPS from \"../../../Formats/WPS\";\nimport AltiElevationRequest from \"./model/AltiElevationRequest\";\nimport AltiProfilRequest from \"./model/AltiProfilRequest\";\n\nvar AltiRequestWPS = {\n\n /**\n * Interface unique de construction de la requête.\n *\n * @method build\n * @param {Object} options - options\n * @param {Object} options.param.positions - tableau de coordonnées lon/lat\n * @param {String} options.param.delimiter - '|'\n * @param {Boolean} options.param.indent - false|true\n * @param {String} options.param.crs - 'CRS:84'\n * @param {String} options.param.sampling - 3\n * @param {Boolean} options.param.zonly - false|true\n * @param {String} options.param.format - \"JSON|XML\" (only to POST)\n * @param {String} options.wps.service - \"WPS\"\n * @param {String} options.wps.version - \"1.0.0\"\n * @param {String} options.wps.identifier - \"gs:WPSElevation|gs:WPSLineElevation\"\n * @param {String} options.wps.rawdataoutput - \"result\"\n * @param {String} options.wps.request - \"Execute\"\n * @param {String} options.type - \"Profil|Elevation\"\n * @param {String} options.method - GET|POST\n * @example\n * var options = {\n * type : 'Profil', // Elevation\n * method : 'GET', // par defaut\n * param : {\n * positions : [\n * {lon:'1.11', lat:'1.11'},\n * {lon:'1.10', lat:'1.10'},\n * {lon:'1.12', lat:'1.12'}\n * ],\n * delimiter : \";\", // par defaut\n * indent : true, // par defaut\n * crs : 'EPSG:4326', // par defaut\n * format : 'json', // par defaut (only to POST)\n * sampling : 3 , // par defaut (only use by Profil)\n * zonly : false, // par defaut (only use by Elevation)\n * },\n * wps : {\n * service : 'WPS', // par defaut\n * version : '1.0.0', // par defaut\n * identifier : 'gs:WPS', // par defaut, Elevation = gs:WPSElevation, Profil = gs:WPSLineElevation\n * rawdataoutput : 'result',// par defaut\n * request : 'Execute' // par defaut\n * }\n * };\n */\n build : function (options) {\n // logger\n var logger = Logger.getLogger(\"AltiRequestWPS\");\n logger.trace([\"AltiRequestWPS::build()\"]);\n\n // existance des options\n if (!options) {\n throw new Error(_.getMessage(\"PARAM_EMPTY\", \"options\"));\n }\n\n // type de requete : Altitude ou Profil\n // (param. à determiner en fonction des parametres d'entrée)\n if (!options.type) {\n throw new Error(_.getMessage(\"PARAM_EMPTY\", \"type (Elevation or Profil)\"));\n }\n\n // construction du modele de requête\n // (test du type d'objet candidat)\n var DataObject = null;\n switch (options.type) {\n case \"Elevation\":\n // surcharge\n options.wps.identifier = \"gs:WPSElevation\";\n DataObject = new AltiElevationRequest(options.param);\n break;\n case \"Profil\":\n // surcharge\n options.wps.identifier = \"gs:WPSLineElevation\";\n DataObject = new AltiProfilRequest(options.param);\n break;\n default:\n throw new Error(_.getMessage(\"PARAM_TYPE\", \"type (Elevation or Profil)\"));\n }\n\n // construction de la requête WPS\n var settings = {\n data : DataObject,\n method : options.method,\n param : options.wps\n };\n\n var rqstWPS = new WPS(settings);\n\n if (!rqstWPS.processRequestString()) {\n throw new Error(\"Enable to process request !\");\n }\n\n return rqstWPS.requestString;\n }\n};\n\nexport default AltiRequestWPS;\n" - }, - { - "id": 57, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/WPS.js", - "name": "./src/Formats/WPS.js", - "index": 25, - "index2": 19, - "size": 9252, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestWPS.js", - "issuerId": 56, - "issuerName": "./src/Services/Alti/Request/AltiRequestWPS.js", - "profile": { - "factory": 784, - "building": 81, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 56, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestWPS.js", - "module": "./src/Services/Alti/Request/AltiRequestWPS.js", - "moduleName": "./src/Services/Alti/Request/AltiRequestWPS.js", - "type": "harmony import", - "userRequest": "../../../Formats/WPS", - "loc": "11:0-39" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 6, - "source": "import Logger from \"../Utils/LoggerByDefault\";\n\n/**\n * @classdesc\n * Standard WPS\n *\n * @constructor\n * @alias Gp.Formats.WPS\n * @param {Object} options - options\n * @param {Object} options.data - objet\n * @param {String} options.method - POST|GET\n * @param {String} options.param.service - \"WPS\"\n * @param {String} options.param.version - \"1.0.0\"\n * @param {String} options.param.identifier - \"gs:WPSElevation|gs:WPSLineElevation\"\n * @param {String} options.param.rawdataoutput - \"result\"\n * @param {String} options.param.request - \"Execute\"\n * @param {Function} options.onsuccess - function callback success (TODO)\n * @param {Function} options.onerror - function callback error (TODO)\n * @private\n */\nfunction WPS (options) {\n this.logger = Logger.getLogger();\n this.logger.trace(\"[Constructeur WPS()]\");\n\n if (!(this instanceof WPS)) {\n throw new TypeError(\"WPS constructor cannot be called as a function.\");\n }\n\n this.options = options || {};\n\n /**\n * Objet DATA\n */\n this.DataObject = this.options.data;\n\n if (!this.DataObject) {\n throw new TypeError(\"This data object is not defined !\");\n }\n\n /**\n * param service.\n * Par defaut, \"WPS\".\n */\n this.paramservice = this.options.param.service || \"WPS\";\n\n /**\n * param version.\n * Par defaut, \"1.0.0\".\n */\n this.paramversion = this.options.param.version || \"1.0.0\";\n\n /**\n * param identifier\n * Par defaut, \"gs:WPS\"\n */\n this.paramidentifier = this.options.param.identifier || \"gs:WPS\";\n\n /**\n * param rawdataoutput\n * Par defaut, \"result\".\n */\n this.paramrawdataoutput = this.options.param.rawdataoutput || \"result\";\n\n /**\n * param request\n * Par defaut, \"Execute\".\n */\n this.paramrequest = this.options.param.request || \"Execute\";\n\n /**\n * methode.\n * Par defaut, \"GET\".\n */\n this.method = this.options.method || \"GET\";\n}\n\nWPS.prototype = {\n\n /**\n * @lends module:WPS#\n */\n\n /**\n * request\n * @type {String}\n */\n requestString : null,\n\n /**\n * Constructeur (alias)\n */\n constructor : WPS,\n\n /**\n * Template de la requête.\n */\n template : {\n get : {\n value : \"service=__SERVICE__\" +\n \"&version=__VERSION__\" +\n \"&rawdataoutput=__RAWDATAOUTPUT__\" +\n \"&identifier=__IDENTIFIER__\" +\n \"&request=__REQUEST__\" +\n \"&datainputs=\",\n\n input : \"__KEY__=__DATA__\"\n\n },\n post : {\n\n value : \"\" +\n \"\" +\n \"__IDENTIFIER__\" +\n \"\" +\n \"\" +\n \"\" +\n \"\" +\n \"\" +\n \"__RAWDATAOUTPUT__\" +\n \"\" +\n \"\" +\n \"\",\n\n input : \"\" +\n \"__KEY__\" +\n \"\" +\n \"__DATA__\" +\n \"\" +\n \"\"\n }\n },\n\n /**\n * Namespace par defaut de la requete POST.\n *\n * @returns {String} namespace\n */\n namespaceByDefault : function () {\n var ns = [\n \"xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\"\",\n \"xmlns=\\\"http://www.opengis.net/wps/1.0.0\\\"\",\n \"xmlns:wfs=\\\"http://www.opengis.net/wfs\\\"\",\n \"xmlns:wps=\\\"http://www.opengis.net/wps/1.0.0\\\"\",\n \"xmlns:ows=\\\"http://www.opengis.net/ows/1.1\\\"\",\n \"xmlns:gml=\\\"http://www.opengis.net/gml\\\"\",\n \"xmlns:ogc=\\\"http://www.opengis.net/ogc\\\"\",\n \"xmlns:wcs=\\\"http://www.opengis.net/wcs/1.1.1\\\"\",\n \"xmlns:xlink=\\\"http://www.w3.org/1999/xlink\\\"\"\n ];\n\n return ns.join(\" \");\n },\n\n /**\n * Schemalocation par defaut.\n *\n * @returns {String} schemaLocation\n */\n schemaLocationByDefault : function () {\n return \"xsi:schemaLocation=\\\"http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd\\\"\";\n },\n\n /**\n * Construction de la requête.\n *\n * @example\n * // GET out :\n * // service=__SERVICE__\n * // &version=__VERSION__\n * // &rawdataoutput=__RAWDATAOUTPUT__\n * // &identifier=__IDENTIFIER__\n * // &request=__REQUEST__\n * // &datainputs=\"__DATAINPUTS__\"\n * // avec __DATAINPUTS__ = __KEY__=__DATA__;...\n *\n * // POST out :\n * // \n * // \n * // __IDENTIFIER__\n * // \n * // \n * // \n * // \n * // \n * // __RAWDATAOUTPUT__\n * // \n * // \n * // \",\n * // avec __DATAINPUTS__\n * // \n * // __KEY__\n * // \n * // __DATA__\n * // \n * // \n *\n * @returns {Boolean} validation de la construction de la requete\n */\n processRequestString : function () {\n this.logger.trace(\"WPS::processRequestString ()\");\n\n var template = \"\";\n if (this.method === \"POST\") {\n template = this.template.post.value;\n } else if (this.method === \"GET\") {\n template = this.template.get.value;\n } else {\n this.logger.error(\"No other method supported by the service !\");\n return false;\n }\n\n template = template.replace(/__SERVICE__/g, this.paramservice);\n template = template.replace(/__VERSION__/g, this.paramversion);\n template = template.replace(/__RAWDATAOUTPUT__/g, this.paramrawdataoutput);\n template = template.replace(/__IDENTIFIER__/g, this.paramidentifier);\n template = template.replace(/__REQUEST__/g, this.paramrequest);\n\n // ajout +\n if (this.method === \"POST\") {\n template = template.replace(/__NAMESPACE__/g, this.namespaceByDefault);\n template = template.replace(/__SCHEMALOCATION__/g, this.schemaLocationByDefault);\n }\n\n // ajout des datainputs\n template = template.replace(//g, this.__addDataInputs());\n\n if (!template) {\n this.logger.warn(\"traduction tmpl : empty request !?\");\n return false;\n }\n\n this.requestString = template;\n this.logger.trace(\"traduction tmpl\", template);\n\n return true;\n },\n\n /**\n * Ajout des données\n *\n * @returns {String} Données concaténées dans une chaine\n */\n __addDataInputs : function () {\n this.logger.trace(\"WPS::__addDataInputs ()\");\n\n // c'est un peu grossier...\n var tmpl = this.method === \"GET\" ? this.template.get.input : this.template.post.input;\n var sep = this.method === \"GET\" ? \";\" : \"\";\n\n var result = \"\";\n var that = this;\n var map = this.DataObject.getData();\n for (var i = 0; i < map.length; i++) {\n // FIXME closure ?\n (function (j) {\n if (sep) {\n sep = (j === map.length - 1) ? \"\" : \";\";\n }\n result = result.concat(that.__addDataInput(tmpl, map[j].k, map[j].v), sep);\n })(i);\n }\n\n return result;\n },\n\n /**\n * Ajout d'une donnée.\n *\n * @param {String} tmpl - template\n * @param {String} key - clef\n * @param {String} data - valeur\n * @returns {String} chaine avec les substitutions clef/valeur\n */\n __addDataInput : function (tmpl, key, data) {\n var tmp = tmpl;\n tmp = tmp.replace(/__KEY__/g, key);\n tmp = tmp.replace(/__DATA__/g, data);\n return tmp;\n },\n\n /**\n * Definir le mode de requête\n *\n * @param {String} method - GET|POST\n */\n setMethod : function (method) {\n if (method === \"GET\" || method === \"POST\") {\n this.method = method;\n } else {\n this.logger.warn(\"support only GET and POST method !\");\n }\n },\n\n /**\n * Retourne le mode de requete (GET|POST).\n *\n * @returns {AltiRequest.options.mode|String} methode (GET|POST)\n */\n getMethod : function () {\n return this.method;\n }\n};\n\nexport default WPS;\n" - }, - { - "id": 58, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Response/AltiResponseFactory.js", - "name": "./src/Services/Alti/Response/AltiResponseFactory.js", - "index": 26, - "index2": 26, - "size": 7849, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Alti.js", - "issuerId": 46, - "issuerName": "./src/Services/Alti/Alti.js", - "profile": { - "factory": 364, - "building": 136, - "dependencies": 2 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 46, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Alti.js", - "module": "./src/Services/Alti/Alti.js", - "moduleName": "./src/Services/Alti/Alti.js", - "type": "harmony import", - "userRequest": "./Response/AltiResponseFactory", - "loc": "8:0-65" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 4, - "source": "/**\n * Factory pour générer une reponse JSON à partir d'un XML ou d'un JSON\n * (Factory)\n *\n * @module AltiResponseFactory\n * @private\n * @alias Gp.Services.Alti.Response.AltiResponseFactory\n */\nimport Logger from \"../../../Utils/LoggerByDefault\";\nimport MRes from \"../../../Utils/MessagesResources\";\nimport ErrorService from \"../../../Exceptions/ErrorService\";\nimport XML from \"../../../Formats/XML\";\nimport AltiResponseReader from \"../Formats/AltiResponseReader\";\nimport AltiResponse from \"./model/AltiResponse\";\nimport Elevation from \"./model/Elevation\";\n\nvar AltiResponseFactory = {\n\n /**\n * interface unique\n *\n * @method build\n * @static\n * @param {Object} options - options definies dans le composant Alti\n *\n * @example\n * var options = {\n * response :\n * outputFormat :\n * rawResponse :\n * scope :\n * onSuccess :\n * onError :\n * };\n *\n */\n build : function (options) {\n // logger\n var logger = Logger.getLogger(\"AltiResponseFactory\");\n logger.trace([\"AltiResponseFactory::build()\"]);\n\n var data = null;\n\n if (options.response) {\n if (options.rawResponse) {\n logger.trace(\"analyze response : raw\");\n data = options.response;\n } else {\n switch (options.outputFormat) {\n case \"xml\":\n logger.trace(\"analyze response : xml\");\n\n try {\n var p = new XML({\n reader : AltiResponseReader\n });\n\n if (typeof options.response === \"string\") {\n p.setXMLString(options.response);\n } else {\n p.setXMLDoc(options.response);\n }\n\n data = p.parse();\n\n if (!data) {\n throw new Error(MRes.getMessage(\"SERVICE_RESPONSE_EXCEPTION_2\"));\n }\n } catch (e) {\n var message = e.message;\n options.onError.call(options.scope, new ErrorService({\n message : MRes.getMessage(\"SERVICE_RESPONSE_EXCEPTION\", message),\n status : 200,\n type : ErrorService.TYPE_SRVERR\n }));\n return;\n }\n\n break;\n\n case \"json\":\n logger.trace(\"analyze response : json\");\n logger.trace(\"analyze response : \", typeof options.response);\n\n var JSONResponse;\n if (typeof options.response === \"string\") {\n JSONResponse = JSON.parse(options.response);\n } else {\n JSONResponse = options.response;\n }\n\n // le service renvoie t il une erreur ?\n if (JSONResponse.error) {\n // ex. {\"error\": {\"code\": \"BAD_PARAMETER\",\"description\": \"The values () cannot be parsed as a valid longitude (double value such as -180 < lat < 180).\"}}\n options.onError.call(options.scope, new ErrorService({\n message : MRes.getMessage(\"SERVICE_RESPONSE_EXCEPTION\", JSONResponse.error.description),\n status : 200,\n type : ErrorService.TYPE_SRVERR\n }));\n return;\n }\n\n // analyse de la reponse\n if (JSONResponse) {\n var elevations = JSONResponse.elevations;\n var altiResponse = new AltiResponse();\n var elevation;\n if (Array.isArray(elevations) && elevations.length) {\n for (var i = 0; i < elevations.length; i++) {\n elevation = new Elevation();\n\n if (typeof elevations[i] === \"object\") {\n // elevations[i] est un objet elevation\n if (elevations[i].lon) {\n elevation.lon = elevations[i].lon;\n }\n if (elevations[i].lat) {\n elevation.lat = elevations[i].lat;\n }\n if (elevations[i].z) {\n elevation.z = elevations[i].z;\n }\n if (elevations[i].acc) {\n elevation.acc = elevations[i].acc;\n }\n } else if (typeof elevations[i] === \"number\") {\n // elevations[i] est un nombre, dans le cas de zonly=true notamment\n elevation.z = elevations[i];\n }\n\n if (Array.isArray(altiResponse.elevations)) {\n altiResponse.elevations.push(elevation);\n }\n }\n }\n data = altiResponse;\n }\n\n if (!data) {\n options.onError.call(options.scope, new ErrorService({\n message : MRes.getMessage(\"SERVICE_RESPONSE_ANALYSE_2\"),\n type : ErrorService.TYPE_UNKERR,\n status : -1\n }));\n return;\n }\n break;\n\n default:\n options.onError.call(options.scope, new ErrorService({\n message : MRes.getMessage(\"SERVICE_RESPONSE_FORMAT_2\"),\n type : ErrorService.TYPE_UNKERR,\n status : -1\n }));\n return;\n }\n\n // Si la réponse contenait une exception renvoyée par le service\n if (data.exceptionReport) {\n options.onError.call(options.scope, new ErrorService({\n message : MRes.getMessage(\"SERVICE_RESPONSE_EXCEPTION\", data.exceptionReport),\n type : ErrorService.TYPE_SRVERR,\n status : 200\n }));\n return;\n } else if (data.error) {\n var errorMess = data.error.description;\n options.onError.call(options.scope, new ErrorService({\n message : MRes.getMessage(\"SERVICE_RESPONSE_EXCEPTION\", errorMess),\n type : ErrorService.TYPE_SRVERR,\n status : 200\n }));\n return;\n }\n }\n } else {\n options.onError.call(options.scope, new ErrorService(MRes.getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n return;\n }\n\n options.onSuccess.call(options.scope, data);\n }\n};\n\nexport default AltiResponseFactory;\n" - }, - { - "id": 59, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Formats/AltiResponseReader.js", - "name": "./src/Services/Alti/Formats/AltiResponseReader.js", - "index": 28, - "index2": 25, - "size": 12298, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Response/AltiResponseFactory.js", - "issuerId": 58, - "issuerName": "./src/Services/Alti/Response/AltiResponseFactory.js", - "profile": { - "factory": 410, - "building": 166, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 1, - "reasons": [ - { - "moduleId": 58, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Response/AltiResponseFactory.js", - "module": "./src/Services/Alti/Response/AltiResponseFactory.js", - "moduleName": "./src/Services/Alti/Response/AltiResponseFactory.js", - "type": "harmony import", - "userRequest": "../Formats/AltiResponseReader", - "loc": "13:0-63" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "\n/**\n * Fonction retournant un objet contenant des clés de lecture (readers)\n * qui permettent de parser des réponses XML du service Altimétrique du Géoportail\n * (calcul altimétrique simple ou profil altimétrique d'une courbe),\n * lorsque le paramètre output = xml,\n * afin de récupérer les élévations retournées.\n *\n * @module AltiResponseReader\n * @alias Gp.Services.Alti.Formats.AltiResponseReader\n * @private\n */\n\n// import Logger from \"../../../Utils/LoggerByDefault\";\nimport AltiResponse from \"../Response/model/AltiResponse\";\nimport Elevation from \"../Response/model/Elevation\";\n\n/**\n *\n * Objet AltiResponseReader\n *\n * @member {Object} AltiResponseReader\n *\n * @property {Object} AltiResponseReader.READERS - Objet contenant des fonctions de lecture, appelées \"readers\"\n * dont chaque clé correspond au nom d'un tag du XML que l'on souhaite lire\n * et la valeur associée est une fonction (node, data)\n * où node est un noeud du document DOM\n * et data est un objet où l'on stocke les informations lues dans le XML.\n *\n * @property {Method} AltiResponseReader.READERS.elevations - Lecture d'un noeud \"elevations\" de la réponse XML\n * du service alti, correspondant logiquement à la racine du document\n * (contient un ou plusieurs childNodes correspondant chacun à une élévation retournée)\n *\n * @property {Method} AltiResponseReader.READERS.elevation - ecture d'un noeud \"elevation\" de la réponse xml du service alti.\n * (contient un ou 4 childNode (s) correspondant à l'altitude (z) et éventuellement lat, lon, et acc)\n *\n * @property {Method} AltiResponseReader.READERS.lat - Lecture d'un noeud \"lat\" de la réponse xml du service alti.\n * (contient une valeur de latitude, qui est un flottant)\n *\n * @property {Method} AltiResponseReader.READERS.lon - Lecture d'un noeud \"lon\" de la réponse xml du service alti.\n * (contient une valeur de longitude, qui est un flottant)\n *\n * @property {Method} AltiResponseReader.READERS.z - Lecture d'un noeud \"z\" de la réponse xml du service alti.\n * (contient une valeur d'altitude, qui est un flottant)\n *\n * @property {Method} AltiResponseReader.READERS.acc - Lecture d'un noeud \"acc\" de la réponse xml du service alti.\n * (contient une valeur de précision, qui est un flottant)\n *\n * @property {Method} AltiResponseReader.READERS.exceptionreport - Lecture d'un noeud \"ExceptionReport\" de la réponse xml du service alti.\n *\n * @property {Method} AltiResponseReader.READERS.exception - Lecture d'un noeud \"Exception\" de la réponse xml du service alti.\n *\n * @property {Method} AltiResponseReader.read - Méthode permettant de lancer la lecture d'une réponse XML du service altimétrique,\n * à l'aide des readers de la classe.\n *\n */\nvar AltiResponseReader = {};\n\nAltiResponseReader.READERS = {\n\n /**\n * Lecture d'un noeud \"elevations\" de la réponse XML du service alti, correspondant logiquement à la racine du document\n * (contient un ou plusieurs childNodes correspondant chacun à une élévation retournée)\n *\n * @param {DOMElement} root - racine de la réponse XML\n * @static\n * @memberof AltiResponseReader\n * @returns {Object} Retourne un objet de type AltiResponse\n */\n elevations : function (root) {\n // INFO : on passe en paramètre l'objet en entrée elevations, vide, à remplir.\n var altiResponse = new AltiResponse();\n\n if (root.hasChildNodes()) {\n var children = root.childNodes;\n var child;\n var elevation;\n\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n\n if (AltiResponseReader.READERS[child.nodeName]) {\n elevation = AltiResponseReader.READERS[child.nodeName](child);\n altiResponse.elevations.push(elevation);\n }\n }\n }\n\n return altiResponse;\n },\n\n /**\n * Lecture d'un noeud \"elevation\" de la réponse xml du service alti.\n * (contient un ou 4 childNode (s) correspondant à l'altitude (z) et éventuellement lat, lon, et acc)\n *\n * @param {DOMElement} node - noeud elevation à lire pour récupérer les informations de l'élévation retournée (z [, lon, lat, acc])\n * @return {Array} elevationResponse - format de la réponse en sortie, instance de AltiResponse\n * @static\n * @memberof AltiResponseReader\n */\n elevation : function (node) {\n var elevation = new Elevation();\n\n if (node.hasChildNodes()) {\n var children = node.childNodes;\n var child;\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n if (AltiResponseReader.READERS[child.nodeName]) {\n // INFO : on passe en paramètre l'objet en entrée elevation, vide, à remplir.\n AltiResponseReader.READERS[child.nodeName](child, elevation);\n }\n }\n }\n return elevation;\n },\n\n /**\n * Lecture d'un noeud \"lat\" de la réponse xml du service alti.\n * (contient une valeur de latitude, qui est un flottant)\n *\n * @param {DOMElement} node - noeud à lire pour récupérer la latitude\n * @param {Object} elevation - objet dans lequel stocker la latitude retournée\n * @static\n * @memberof AltiResponseReader\n */\n lat : function (node, elevation) {\n var textNode = node.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n elevation.lat = parseFloat(textNode.nodeValue);\n } else {\n throw new Error(\"Erreur dans la lecture de la réponse du service : latitude attendue mais absente\");\n }\n },\n\n /**\n * Lecture d'un noeud \"lon\" de la réponse xml du service alti.\n * (contient une valeur de longitude, qui est un flottant)\n *\n * @param {DOMElement} node - noeud à lire pour récupérer la longitude\n * @param {Object} elevation - objet dans lequel stocker la longitude retournée\n * @static\n * @memberof AltiResponseReader\n */\n lon : function (node, elevation) {\n var textNode = node.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n elevation.lon = parseFloat(textNode.nodeValue);\n } else {\n throw new Error(\"Erreur dans la lecture de la réponse du service : longitude attendue mais absente\");\n }\n },\n\n /**\n * Lecture d'un noeud \"z\" de la réponse xml du service alti.\n * (contient une valeur d'altitude, qui est un flottant)\n *\n * @param {DOMElement} node - noeud à lire pour récupérer l'altitude\n * @param {Object} elevation - objet dans lequel stocker l'altitude retournée\n * @static\n * @memberof AltiResponseReader\n */\n z : function (node, elevation) {\n var textNode = node.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n if (elevation) {\n elevation.z = parseFloat(textNode.nodeValue);\n } else {\n elevation = new Elevation();\n elevation.z = parseFloat(textNode.nodeValue);\n return elevation;\n }\n } else {\n throw new Error(\"Erreur dans la lecture de la réponse du service : altitude attendue mais absente\");\n }\n },\n\n /**\n * Lecture d'un noeud \"acc\" de la réponse xml du service alti.\n * (contient une valeur de précision, qui est un flottant)\n *\n * @param {DOMElement} node - noeud à lire pour récupérer la précision\n * @param {Object} elevation - objet dans lequel stocker la précision retournée\n * @static\n * @memberof AltiResponseReader\n */\n acc : function (node, elevation) {\n var textNode = node.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n elevation.acc = parseFloat(textNode.nodeValue);\n } else {\n throw new Error(\"Erreur dans la lecture de la réponse du service : précision (acc) attendue mais absente\");\n }\n },\n\n /**\n * Lecture d'un noeud \"ExceptionReport\" de la réponse xml du service alti.\n *\n * @param {DOMElement} node - noeud à lire pour récupérer l'exception\n * @return {Object} exceptionReport - objet contenant l'exception\n * @static\n * @memberof AltiResponseReader\n */\n exceptionreport : function (node) {\n var response = {};\n\n if (node.hasChildNodes()) {\n var children = node.childNodes;\n var child;\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n if (child.nodeName === \"Exception\") {\n response.exceptionReport = AltiResponseReader.READERS.exception(child);\n }\n }\n }\n\n return response;\n },\n\n /**\n * Lecture d'un noeud \"Exception\" de la réponse xml du service alti.\n *\n * @param {DOMElement} node - noeud à lire pour récupérer l'exception\n * @return {Object} exceptionReport - objet contenant l'exception, avec deux attributs :\n * {String} exceptionReport.exceptionCode - qui contient l'identifiant du code de l'exception\n * {String} exceptionReport.exception - qui contient le message de l'exception\n * @static\n * @memberof AltiResponseReader\n */\n exception : function (node) {\n var exceptionReport = {};\n\n // get exception code\n var exceptionCode = node.getAttribute(\"exceptionCode\");\n if (exceptionCode) {\n exceptionReport.exceptionCode = exceptionCode;\n }\n\n // get exception message\n var textNode = node.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n exceptionReport.exception = textNode.nodeValue;\n }\n\n return exceptionReport;\n },\n\n /**\n * Lecture d'un noeud \"Error\" de la réponse xml du service alti.\n *\n * @param {DOMElement} node - noeud à lire pour récupérer l'exception\n * @return {Object} error - objet contenant l'exception\n * @static\n */\n error : function (node) {\n var response = {\n error : {}\n };\n // get error code and description\n if (node.hasChildNodes()) {\n var children = node.childNodes;\n var child;\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n var textNode;\n // get error code\n if (child.nodeType === 1 && child.nodeName === \"code\") { // 1 === node.ELEMENT_NODE\n textNode = child.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n response.error.code = textNode.nodeValue;\n }\n }\n // get error description\n if (child.nodeType === 1 && child.nodeName === \"description\") { // 1 === node.ELEMENT_NODE\n textNode = child.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n response.error.description = textNode.nodeValue;\n }\n }\n }\n }\n return response;\n }\n\n};\n\n/**\n * Méthode permettant de lancer la lecture d'une réponse XML du service altimétrique,\n * à l'aide des readers de la classe.\n *\n * @method AltiResponseReader.read\n * @param {DOMElement} root - racine de la réponse XML à lire\n * @static\n * @memberof AltiResponseReader\n */\nAltiResponseReader.read = function (root) {\n if (root.nodeName === \"elevations\") {\n var altiResponse = AltiResponseReader.READERS.elevations(root);\n return altiResponse;\n } else if (root.nodeName === \"ExceptionReport\") {\n var exceptionReport = AltiResponseReader.READERS.exceptionreport(root);\n return exceptionReport;\n } else if (root.nodeName === \"error\") {\n var error = AltiResponseReader.READERS.error(root);\n return error;\n } else {\n throw new Error(\"Erreur lors de la lecture de la réponse : elle n'est pas au format attendu.\");\n }\n};\n\nexport default AltiResponseReader;\n" - }, - { - "id": 60, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/AutoConf.js", - "name": "./src/Services/AutoConf/AutoConf.js", - "index": 31, - "index2": 44, - "size": 7194, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Services.js", - "issuerId": 45, - "issuerName": "./src/Services/Services.js", - "profile": { - "factory": 512, - "building": 103, - "dependencies": 314 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 45, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Services.js", - "module": "./src/Services/Services.js", - "moduleName": "./src/Services/Services.js", - "type": "harmony import", - "userRequest": "./AutoConf/AutoConf", - "loc": "10:0-43" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 3, - "source": "\nimport Logger from \"../../Utils/LoggerByDefault\";\nimport _ from \"../../Utils/MessagesResources\";\nimport Helper from \"../../Utils/Helper\";\nimport ErrorService from \"../../Exceptions/ErrorService\";\nimport DefaultUrlService from \"../DefaultUrlService\";\nimport CommonService from \"../CommonService\";\nimport AutoConfResponseFactory from \"./Response/AutoConfResponseFactory\";\n\n/**\n * @classdesc\n * Appel du service d'autoconfiguration du Géoportail\n *\n * @private\n * @constructor\n * @extends {Gp.Services.CommonService}\n * @alias Gp.Services.AutoConf\n *\n * @param {Object} options - options spécifiques au service (+ les options heritées)\n *\n * @param {String} [options.layerId] - Le nom de l'agrégat (couche) dont on veut connaître les informations détaillées.\n * La présence de cette propriété implique l'utilisation de la deuxième opération du service pour accéder aux informations d'une couche aggrégée.\n * Dans ce cas, la fonction effectuera quand même dans un premier temps la récupération des informations de l'auto-\n * configuration complète, sauf si un premier appel à l'autoconf a déjà été fait avec cette clé (i.e. si la variable globale est définie\n * pour la clé de contrat). Elle ira ensuite chercher les informations des couches agrégées, qui seront ajoutées à la variable globale Gp.Config.\n *\n * @example\n * var options = {\n * // options communes aux services\n * apiKey : \"apikey\",\n * protocol : 'JSONP', // JSONP|XHR\n * timeOut : 10000, // ms\n * rawResponse : false, // true|false\n * scope : null, // this\n * onSuccess : function (response) {},\n * onFailure : function (error) {},\n * layerId : \"ORTHOIMAGERY.ORTHOPHOTOS.3D$GEOPORTAIL:OGC:WMTS@aggregate\"\n * };\n */\nfunction AutoConf (options) {\n if (!(this instanceof AutoConf)) {\n throw new TypeError(_.getMessage(\"CLASS_CONSTRUCTOR\", \"AutoConf\"));\n }\n\n /**\n * Nom de la classe (heritage)\n * FIXME instance ou classe ?\n */\n this.CLASSNAME = \"AutoConf\";\n\n // Autoconf default protocol remains JSONP (#see http://ignf.github.io/geoportal-access-lib/latest/jsdoc/tutorial-optimize-getconfig.html)\n if (!options) {\n options = {};\n }\n options.protocol = options.protocol || \"JSONP\";\n\n // appel du constructeur par heritage\n CommonService.apply(this, arguments);\n\n this.logger = Logger.getLogger(\"Gp.Services.AutoConf\");\n this.logger.trace(\"[Constructeur AutoConf (options)]\");\n\n // #####################\n // analyse des options\n // #####################\n\n // gestion de l'url du service par defaut\n if (!this.options.serverUrl) {\n // si l'url n'est pas renseignée, il faut utiliser les urls par defaut\n // en fonction du nombre de clés en entrée et du paramètre layerId\n if (!this.options.serverUrl) {\n var lstUrlByDefault = DefaultUrlService.AutoConf.url(this.options.apiKey);\n\n if (!this.options.layerId) {\n // cas d'une autoconf simple\n if (Array.isArray(this.options.apiKey) && this.options.apiKey.length > 0) {\n // cas d'un tableau de clés en entrée\n this.options.serverUrl = lstUrlByDefault.apiKeys;\n } else {\n this.options.serverUrl = lstUrlByDefault.apiKey;\n }\n } else {\n // cas d'une autoconf pour des couches aggrégées\n this.options.serverUrl = lstUrlByDefault.aggregate + this.options.layerId;\n }\n }\n }\n\n // INFO\n // le service ne repond pas en mode POST (405 Method Not Allowed)\n if (this.options.protocol === \"XHR\" && this.options.httpMethod === \"POST\") {\n this.logger.warn(\"Le service ne gére pas le mode d'interrogation en POST, on bascule sur du GET !\");\n this.options.httpMethod = \"GET\"; // on surcharge !\n }\n\n // #####################\n // attributs d'instances\n // #####################\n\n /**\n * Format forcé de la réponse du service : \"xml\"\n * sauf si l'on souhaite une reponse brute (options.rawResponse)\n */\n this.options.outputFormat = (this.options.rawResponse) ? \"\" : \"xml\";\n}\n\n/**\n * @lends module:AutoConf#\n */\n\nAutoConf.prototype = Object.create(CommonService.prototype, {\n // todo\n // getter/setter\n});\n\n/*\n * Constructeur (alias)\n */\nAutoConf.prototype.constructor = AutoConf;\n\n/**\n * Création de la requête (overwrite)\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback de succès de la création de la requête\n */\nAutoConf.prototype.buildRequest = function (error, success) {\n var scope = typeof window !== \"undefined\" ? window : {};\n\n if (scope.Gp && scope.Gp.Config && scope.Gp.Config.generalOptions && scope.Gp.Config.layers) {\n if (scope.Gp.Config.generalOptions.apiKeys[this.options.apiKey]) {\n if (this.options.layerId) { // cas d'une autoconf + détaillée sur une couche agrégée\n if (scope.Gp.Config.layers[this.options.layerId] && scope.Gp.Config.layers[this.options.layerId].aggregatedLayers) {\n this.logger.warn(\"Gp.Config existe déjà pour cette clé et cette couche\");\n this.options.onSuccess.call(this, scope.Gp.Config);\n return;\n }\n } else {\n this.logger.warn(\"Gp.Config existe déjà pour cette clé\");\n this.options.onSuccess.call(this, scope.Gp.Config);\n return;\n }\n }\n }\n\n // requete par defaut\n this.request = \"\";\n\n // gestion de l'autoconf local\n // Le fichier en local doit respecter le format de sortie du service.\n // - En XHR, le format est en xml\n // - En JSONP, le format est en xml encapsulé dans un json avec une fonction de callback\n // ex. callback ({\"http\":{\"status\":200,\"error\":null},\"xml\":\"...\"})\n var bLocal;\n if (this.options.serverUrl.indexOf(\"http://\") === -1) {\n bLocal = true;\n } else {\n bLocal = false;\n }\n\n // FIXME param. KVP optionnel sur un service uniquement (pas sur un autoconf local !)\n if (!bLocal && this.layerId) {\n this.request = Helper.normalyzeParameters({\n layerId : this.layerId\n });\n }\n\n // normalement pas d'erreur d'autoconf...\n (this.request || this.request === \"\")\n ? success.call(this, this.request)\n : error.call(this, new ErrorService(_.getMessage(\"SERVICE_REQUEST_BUILD\")));\n};\n\n/**\n * Analyse de la reponse (overwrite)\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback de succès de l'analyse de la réponse\n */\nAutoConf.prototype.analyzeResponse = function (error, success) {\n if (this.response) {\n var options = {\n layerId : this.options.layerId,\n response : this.response,\n rawResponse : this.options.rawResponse,\n onSuccess : success,\n onError : error,\n scope : this\n };\n\n AutoConfResponseFactory.build(options);\n } else {\n error.call(this, new ErrorService(_.getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n }\n};\n\nexport default AutoConf;\n" - }, - { - "id": 61, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Response/AutoConfResponseFactory.js", - "name": "./src/Services/AutoConf/Response/AutoConfResponseFactory.js", - "index": 32, - "index2": 43, - "size": 7098, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/AutoConf.js", - "issuerId": 60, - "issuerName": "./src/Services/AutoConf/AutoConf.js", - "profile": { - "factory": 315, - "building": 179, - "dependencies": 367 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 60, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/AutoConf.js", - "module": "./src/Services/AutoConf/AutoConf.js", - "moduleName": "./src/Services/AutoConf/AutoConf.js", - "type": "harmony import", - "userRequest": "./Response/AutoConfResponseFactory", - "loc": "8:0-73" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 4, - "source": "/**\n * Factory pour générer une reponse JSON à partir d'un XML\n *\n * @module AutoConfReponseFactory\n * @private\n * @alias Gp.Services.AutoConf.Response.AutoConfResponseFactory\n * @todo gérer le cas du JSONP qui encapsule du XML ?\n */\nimport Logger from \"../../../Utils/LoggerByDefault\";\nimport MRes from \"../../../Utils/MessagesResources\";\nimport ErrorService from \"../../../Exceptions/ErrorService\";\nimport XML from \"../../../Formats/XML\";\nimport AutoConfResponseReader from \"../Formats/AutoConfResponseReader\";\n\nvar AutoConfReponseFactory = {\n\n /**\n * interface unique\n * Fabrique d'analyse des réponses (xml) du service d'autoconfiguration.\n * Création d'un format XML, auquel on associe un reader et une chaîne XML, et qui renverra un objet JavaScript correspondant.\n * Si une erreur est levée lors de l'analyse, ou si l'objet est vide ou contient une exception : appel de la fonction de callback onError\n * Sinon, appel de la fonction de callback onSuccess (définies dans Autoconf.analyzeResponse)\n *\n * @method build\n * @static\n * @param {Object} options - options definies dans le composant AutoConf\n *\n * @example\n * var options = {\n * layerId :\n * response :\n * rawResponse :\n * scope :\n * onSuccess :\n * onError :\n * };\n */\n build : function (options) {\n // logger\n var logger = Logger.getLogger(\"AutoConfResponseFactory\");\n logger.trace([\"AutoConfResponseFactory::build()\"]);\n\n // data de type AutoConfResponse\n var data = null;\n\n if (options.response) {\n if (options.rawResponse) {\n data = options.response;\n } else {\n try {\n var p = new XML({\n reader : AutoConfResponseReader\n });\n\n if (typeof options.response === \"string\") {\n p.setXMLString(options.response);\n } else {\n p.setXMLDoc(options.response);\n }\n\n data = p.parse();\n } catch (e) {\n // si une exception a été levée, on appelle le callback d'erreur avec le message renvoyé\n var message = e.message;\n if (typeof options.response === \"string\") {\n message += \"\\n (raw response service'\" + options.response + \"')\";\n } else {\n message += \"\\n (raw response service'\" + options.response.documentElement.innerHTML + \"')\";\n }\n\n options.onError.call(options.scope, new ErrorService({\n message : MRes.getMessage(\"SERVICE_RESPONSE_EXCEPTION\", message),\n status : 200,\n type : ErrorService.TYPE_SRVERR\n }));\n return;\n }\n\n // Si la réponse est vide, on appelle le callback d'erreur\n var isEmpty = true;\n for (var key in data) {\n if (data.hasOwnProperty(key)) {\n isEmpty = false;\n }\n }\n if (isEmpty) {\n options.onError.call(options.scope, new ErrorService(MRes.getMessage(\"SERVICE_RESPONSE_EMPTY_2\")));\n return;\n }\n\n // Si la réponse contenait une exception renvoyée par le service, on appelle le callback d'erreur\n if (data.exceptionReport) {\n options.onError.call(options.scope, new ErrorService({\n message : MRes.getMessage(\"SERVICE_RESPONSE_EXCEPTION\", data.exceptionReport),\n type : ErrorService.TYPE_SRVERR,\n status : 200\n }));\n return;\n }\n }\n } else {\n // si la réponse (xmlString) est vide, on appelle le callback d'erreur\n options.onError.call(options.scope, new ErrorService(MRes.getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n return;\n }\n\n // définition de la variable globale Gp.Config à partir de la réponse\n var scope = typeof window !== \"undefined\" ? window : {};\n\n if (!scope.Gp) {\n scope.Gp = {};\n }\n if (!scope.Gp.Config) {\n scope.Gp.Config = data;\n } else {\n this.mergeConfig(scope.Gp.Config, data, options.layerId);\n }\n\n // si tout s'est bien passé, on appelle le callback de succès\n options.onSuccess.call(options.scope, scope.Gp.Config);\n },\n\n /**\n * Fonction utilisée dans le cas où l'autoconfiguration est appelée plusieurs fois\n * (par exemple pour des clés différentes ou pour des infos sur une couche agrégée)\n *\n * @method mergeConfig\n * @static\n * @param {Object} GpConfig - Variable Gp.Config préexistante\n * @param {Object} data - la nouvelle réponse de l'autoconf, à fusionner avec GpConfig\n * @param {String} [layerId] - l'identifiant d'une couche agrégée dans le cas d'une 2è opération de l'autoconf\n */\n mergeConfig : function (GpConfig, data, layerId) {\n if (data && GpConfig) {\n // on boucle sur les propriétés (generalOptions, layers, projections, services, tileMatrixSets, territories)\n for (var prop in data) {\n if (data.hasOwnProperty(prop)) {\n // on récupère la nouvelle clé dans generalOptions\n if (prop === \"generalOptions\") {\n for (var key in data[prop].apiKeys) {\n if (data[prop].apiKeys.hasOwnProperty(key) && !GpConfig.generalOptions.apiKeys[key]) {\n GpConfig.generalOptions.apiKeys[key] = data[prop].apiKeys[key];\n }\n }\n // on récupère les nouveaux objets (TMS, layers, projections...)\n } else {\n if (GpConfig[prop]) {\n for (var obj in data[prop]) {\n if (data[prop].hasOwnProperty(obj) && !GpConfig[prop][obj]) {\n GpConfig[prop][obj] = data[prop][obj];\n }\n }\n }\n }\n }\n }\n\n // dans le cas d'une autoconf pour une couche agrégée, on récupère l'info\n if (layerId) {\n var aggregatedLayers = [];\n\n for (var lyr in data.layers) {\n if (data.layers.hasOwnProperty(lyr)) {\n aggregatedLayers.push(lyr);\n }\n }\n\n if (GpConfig.layers[layerId]) {\n GpConfig.layers[layerId].aggregatedLayers = aggregatedLayers;\n }\n }\n }\n }\n};\n\nexport default AutoConfReponseFactory;\n" - }, - { - "id": 62, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "name": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "index": 33, - "index2": 42, - "size": 52312, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Response/AutoConfResponseFactory.js", - "issuerId": 61, - "issuerName": "./src/Services/AutoConf/Response/AutoConfResponseFactory.js", - "profile": { - "factory": 369, - "building": 532, - "dependencies": 3 - }, - "failed": false, - "errors": 0, - "warnings": 1, - "reasons": [ - { - "moduleId": 61, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Response/AutoConfResponseFactory.js", - "module": "./src/Services/AutoConf/Response/AutoConfResponseFactory.js", - "moduleName": "./src/Services/AutoConf/Response/AutoConfResponseFactory.js", - "type": "harmony import", - "userRequest": "../Formats/AutoConfResponseReader", - "loc": "13:0-71" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "\n/**\n * Fonction retournant un objet contenant des clés de lecture (readers)\n * qui permettent de parser des réponses XML du service d'autoconfiguration du Géoportail\n * afin de récupérer les informations retournées.\n * @module AutoConfResponseReader\n * @private\n * @alias Gp.Services.AutoConf.Formats.AutoConfResponseReader\n */\n\n// import Logger from \"../../../Utils/LoggerByDefault\";\nimport AutoConfResponse from \"../Response/model/AutoConfResponse\";\nimport Constraint from \"../Response/model/Constraint\";\nimport Format from \"../Response/model/Format\";\nimport Layer from \"../Response/model/Layer\";\nimport Legend from \"../Response/model/Legend\";\nimport Metadata from \"../Response/model/Metadata\";\nimport Originator from \"../Response/model/Originator\";\nimport Service from \"../Response/model/Service\";\nimport Style from \"../Response/model/Style\";\nimport Territory from \"../Response/model/Territory\";\nimport Thematic from \"../Response/model/Thematic\";\nimport TileMatrixSet from \"../Response/model/TileMatrixSet\";\nimport TileMatrix from \"../Response/model/TileMatrix\";\nimport TileMatrixLimit from \"../Response/model/TileMatrixLimit\";\n\nvar AutoConfResponseReader = {};\n\n/**\n * version du service d'autoconf\n */\nAutoConfResponseReader.VERSION = \"1.1.0\";\n\n/**\n * Objet stockant les différents namespaces et les URI associées\n */\nAutoConfResponseReader.NAMESPACES = {\n xmlns : \"http://www.opengis.net/context\",\n gpp : \"http://api.ign.fr/geoportail\",\n ows : \"http://www.opengis.net/ows/1.1\",\n sld : \"http://www.opengis.net/sld\",\n wmts : \"http://www.opengis.net/wmts/1.0\",\n xlink : \"http://www.w3.org/1999/xlink\",\n xsi : \"http://www.w3.org/2001/XMLSchema-instance\"\n};\n\n/**\n * Localisation (URL) du schema de définition du XML (XSD)\n */\nAutoConfResponseReader.SCHEMALOCATION = [\n \"http://www.opengis.net/context http://gpp3-wxs.ign.fr/schemas/extContext.xsd http://api.ign.fr/geoportail http://wxs.ign.fr/schemas/autoconf/autoconf.xsd\",\n \"http://www.opengis.net/context http://gpp3-wxs.ign.fr/schemas/extContext.xsd http://api.ign.fr/geoportail http://gpp3-wxs.ign.fr/schemas/autoconf.xsd\"\n];\n\n/**\n * Namespace par défaut du format\n */\nAutoConfResponseReader.DEFAULTPREFIX = \"context\";\n\n/**\n * Objet contenant des fonctions de lecture, appelées \"READERS\"\n * dont chaque clé correspond au nom d'un tag du XML que l'on souhaite lire\n * et la valeur associée est une fonction (node, data)\n * où node est un noeud du document DOM\n * et data est un objet où l'on stocke les informations lues dans le XML.\n */\nAutoConfResponseReader.READERS = {\n\n context : {\n\n /** ViewContext */\n ViewContext : function (viewContextNode) {\n // info : balise \"racine\" de la réponse de l'autoconf\n\n // vérification de la version du service, et des namespaces de l'en-tête\n __checkServiceAttributes(viewContextNode);\n\n // create AutoConfResponse\n var config = new AutoConfResponse();\n\n __getChildNodes(viewContextNode, config);\n\n return config;\n },\n\n // info : /General/Title\n // ou : /LayerList/Layer/Title\n /** Title */\n Title : function (titleNode, data) {\n if (data && data.generalOptions) { // cas de la variable config générale\n data.generalOptions.title = __getChildValue(titleNode);\n } else if (data && data.lyr) { // cas d'une layer\n data.lyr.title = __getChildValue(titleNode);\n }\n },\n\n // info : /LayerList/Layer/Abstract\n /** Abstract */\n Abstract : function (node, data) {\n if (data && data.lyr) {\n data.lyr.description = __getChildValue(node);\n }\n },\n\n // info : /General/Extension/gpp:General/gpp:Services/Server\n // ou : /LayerList/Server\n /** Server */\n Server : function (node, data) {\n var serverId = node.getAttribute(\"service\");\n var title = node.getAttribute(\"title\");\n var version = node.getAttribute(\"version\");\n if (serverId) {\n if (data && data.services && typeof data.services === \"object\" && !data.services[serverId]) {\n // on est dans la balise Services\n var s = new Service();\n s.title = title;\n s.version = version;\n // récupération de l'url du service, dans une balise enfant \"OnlineResource\"\n __getChildNodes(node, s);\n // ajout du service à la variable config\n data.services[serverId] = s;\n } else if (data && data.lyr) {\n // on est dans la balise Layer\n if (!data.lyr.serviceParams) {\n // si l'objet serviceParams n'a pas encore été créé, on le crée.\n data.lyr.serviceParams = {};\n }\n data.lyr.serviceParams.id = serverId;\n data.lyr.serviceParams.version = version;\n }\n }\n },\n\n // info : /General/Extension/gpp:General/gpp:Services/Server/OnlineResource\n // ou : /LayerList/Layer/Server/OnlineResource\n // ou : /LayerList/Layer/Extention/gpp:Layer/gpp:QuickLook/OnlineResource\n // ou : /LayerList/Layer/Extension/gpp:Layer/gpp:Legends/gpp:Legend/gpp:LegendURL/OnlineResource\n // ou : /LayerList/Layer/Extension/gpp:Layer/gpp:MetadataURL/OnlineResource\n /** OnlineResource */\n OnlineResource : function (node, service) {\n if (service && service.hasOwnProperty(\"serverUrl\")) {\n service.serverUrl = node.getAttribute(\"xlink:href\");\n }\n },\n\n // info : /LayerList\n /** LayerList */\n LayerList : function (layerListNode, config) {\n // liste de balises \"layer\"\n __getChildNodes(layerListNode, config);\n\n if (config && config.layers && config.generalOptions && config.services) {\n // récupération des clés et des couches associées\n for (var lyr in config.layers) {\n if (config.layers.hasOwnProperty(lyr)) {\n var layerConfig = config.layers[lyr];\n\n // récupération de la clé associée\n var apiKeys = layerConfig.apiKeys;\n if (apiKeys && Array.isArray(apiKeys)) {\n for (var i = 0; i < apiKeys.length; i++) {\n // pour chaque clé API, on ajoute la couche\n var key = apiKeys[i];\n if (config.generalOptions.apiKeys) {\n if (!config.generalOptions.apiKeys[key] || !Array.isArray(config.generalOptions.apiKeys[key])) {\n config.generalOptions.apiKeys[key] = [];\n }\n config.generalOptions.apiKeys[key].push(lyr);\n }\n }\n }\n\n // récupération du service associé\n var serviceParams = layerConfig.serviceParams;\n if (serviceParams && serviceParams.id) {\n if (!config.services[serviceParams.id]) {\n var s = new Service();\n if (serviceParams.serverUrl) {\n s.serverUrl = serviceParams.serverUrl;\n }\n if (serviceParams.version) {\n s.version = serviceParams.version;\n }\n config.services[serviceParams.id] = s;\n }\n }\n\n // récupération de la projection associée (dans le cas d'une couche WMTS)\n if (layerConfig.wmtsOptions && layerConfig.wmtsOptions.tileMatrixSetLink && config.tileMatrixSets) {\n var tmsLink = layerConfig.wmtsOptions.tileMatrixSetLink;\n var tileMatrixSets = config.tileMatrixSets;\n for (var tms in tileMatrixSets) {\n if (tileMatrixSets.hasOwnProperty(tms) && tms === tmsLink) {\n layerConfig.defaultProjection = tileMatrixSets[tms].projection;\n }\n }\n }\n }\n }\n }\n },\n\n // info : /LayerList/Layer\n /** Layer */\n Layer : function (layerNode, config) {\n if (config && config.layers) {\n var lyrData = {\n lyr : new Layer(),\n lyrId : null\n };\n\n var hidden = layerNode.getAttribute(\"hidden\");\n if (hidden === \"1\") {\n lyrData.lyr.hidden = true;\n } else {\n lyrData.lyr.hidden = false;\n }\n\n var queryable = layerNode.getAttribute(\"queryable\");\n if (queryable === \"1\") {\n lyrData.lyr.queryable = true;\n } else {\n lyrData.lyr.queryable = false;\n }\n\n // on peut avoir les balises : Server, Name, Title, Abstract, DataURL, MetadataURL,\n // sld:MinScaleDenominator, sld:MaxScaleDenominator, SRS, FormatList, StyleList\n // DimensionList, Extension\n __getChildNodes(layerNode, lyrData);\n\n // si on a bien récupéré l'identifiant de la couche, on s'en sert pour l'ajouter au tableau associatif des couches disponibles\n if (lyrData.lyrId) {\n // Dans le cas des services, on modifie le contexte de l'identifiant.\n if (lyrData.lyr.serviceParams && lyrData.lyr.serviceParams.id) {\n var serviceid = lyrData.lyr.serviceParams.id;\n if (serviceid.toUpperCase().indexOf(\"OPENLS\") !== -1 || serviceid.toUpperCase().indexOf(\"ELEVATION\") !== -1) {\n // Il faut changer l'identifiant de la ressource.\n var resourceId = lyrData.lyrId.split(\"$\")[0];\n lyrData.lyrId = resourceId + \"$\" + serviceid;\n }\n }\n\n // on ajoute l'information dans les attributs de la couche\n lyrData.lyr.layerId = lyrData.lyrId;\n // et dans le tableau Gp.Config.layers\n config.layers[lyrData.lyrId] = lyrData.lyr;\n }\n }\n },\n\n // info : /LayerList/Layer/Name\n /** TODO : jsdoc block */\n Name : function (node, lyrData) {\n if (lyrData && lyrData.lyr) {\n lyrData.lyr.name = __getChildValue(node);\n }\n },\n\n // info : /LayerList/Layer/SRS (dans le cas des couches WMS ou WFS)\n /** TODO : jsdoc block */\n SRS : function (node, lyrData) {\n // on récupère la projection de la couche (SRS)\n if (lyrData && lyrData.lyr) {\n lyrData.lyr.defaultProjection = __getChildValue(node);\n }\n },\n\n // info : /LayerList/Layer/FormatList/Format\n /** TODO : jsdoc block */\n Format : function (node, lyrData) {\n if (lyrData && lyrData.lyr) {\n var f = new Format();\n var current = node.getAttribute(\"current\");\n if (current === \"1\") {\n f.current = true;\n } else {\n f.current = false;\n }\n f.name = __getChildValue(node);\n // si on n'a pas encore ajouté de format, on crée le tableau vide\n if (!lyrData.lyr.formats || !Array.isArray(lyrData.lyr.formats)) {\n lyrData.lyr.formats = [];\n }\n lyrData.lyr.formats.push(f);\n }\n },\n\n // info : /LayerList/Layer/StyleList/Style\n /** TODO : jsdoc block */\n Style : function (node, lyrData) {\n if (lyrData && lyrData.lyr) {\n var s = new Style();\n var current = node.getAttribute(\"current\");\n if (current === \"1\" || current === 1) {\n s.current = true;\n } else {\n s.current = false;\n }\n if (node.hasChildNodes) {\n var children = node.childNodes;\n var child;\n var childName;\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n if (child.nodeType === 1) { // 1 === node.ELEMENT_NODE\n childName = child.localName || child.baseName || child.nodeName;\n if (childName === \"Name\") {\n s.name = __getChildValue(child);\n } else if (childName === \"Title\") {\n s.title = __getChildValue(child);\n }\n }\n }\n }\n // si on n'a pas encore ajouté de style, on crée le tableau vide\n if (!lyrData.lyr.styles || !Array.isArray(lyrData.lyr.styles)) {\n lyrData.lyr.styles = [];\n }\n lyrData.lyr.styles.push(s);\n }\n },\n\n // info : /LayerList/Layer/DimensionList/Dimension\n /** TODO : jsdoc block */\n Dimension : function (node, lyrData) {\n // possède des attributs obligatoires : name, units, unitSymbol et userValue\n // et d'autres attributs facultatifs : default, multipleValues, nearestValue, current\n var name = node.getAttribute(\"name\");\n var dim = __getChildValue(node);\n if (lyrData && lyrData.lyr) {\n // si on n'a pas encore ajouté de dimension, on crée l'objet vide\n if (!lyrData.lyr.dimensions) {\n lyrData.lyr.dimensions = {};\n }\n if (name === \"Type\") {\n lyrData.lyr.dimensions.type = dim;\n } else if (name === \"VisibilityRange\") {\n lyrData.lyr.dimensions.visibilityRange = dim;\n } else if (name === \"VisibilityMode \") {\n lyrData.lyr.dimensions.visibilityMode = dim;\n } else if (name === \"GeometricType\") {\n lyrData.lyr.dimensions.geometricType = dim;\n } else if (name === \"NoDataValue\") {\n lyrData.lyr.dimensions.noDataValue = dim;\n }\n }\n }\n\n },\n\n gpp : {\n\n // info : /General/Extension/gpp:General/gpp:Theme\n /** TODO : jsdoc block */\n Theme : function (themeNode, config) {\n if (config && config.generalOptions && config.generalOptions.hasOwnProperty(\"theme\")) {\n config.generalOptions.theme = __getChildValue(themeNode);\n }\n },\n\n // info : /General/Extension/gpp:General/gpp:defaultGMLGFIStyleUrl\n /** TODO : jsdoc block */\n defaultGMLGFIStyleUrl : function (node, config) {\n if (config && config.generalOptions && config.generalOptions.hasOwnProperty(\"defaultGMLGFIStyle\")) {\n config.generalOptions.defaultGMLGFIStyle = __getChildValue(node);\n }\n },\n\n // info : /General/Extension/gpp:General/gpp:Territories/gpp:Territory\n /** TODO : jsdoc block */\n Territory : function (territoryNode, config) {\n // info : Information to configure the API for this territory\n var tid = territoryNode.getAttribute(\"id\");\n if (tid) {\n // create a new Territory\n var t = new Territory();\n\n var isDefault = territoryNode.getAttribute(\"default\");\n if (isDefault === \"1\") {\n t.isDefault = true;\n } else {\n t.isDefault = false;\n }\n // read territory informations\n __getChildNodes(territoryNode, t);\n // add territory to config\n if (config && config.territories && typeof config.territories === \"object\") {\n config.territories[tid] = t;\n }\n }\n },\n\n // info : /General/Extension/gpp:General/gpp:Territories/gpp:Territory/gpp:defaultCRS\n /** TODO : jsdoc block */\n defaultCRS : function (node, territory) {\n // info : Identifier for the default Coordinate Reference System (CRS).\n if (territory && territory.hasOwnProperty(\"defaultCRS\")) {\n territory.defaultCRS = __getChildValue(node);\n }\n },\n\n // info : /General/Extension/gpp:General/gpp:Territories/gpp:Territory/gpp:AdditionalCRS\n // ou : /LayerList/Extension/gpp:Layer/gpp:AdditionalCRS\n /** TODO : jsdoc block */\n AdditionalCRS : function (node, data) {\n // info : Identifier for additional Coordinate Reference System (CRS).\n // info : data peut être une instance de Territory.js, ou une instance de Layer.js\n var addCRS = __getChildValue(node);\n if (addCRS && data) {\n if (Array.isArray(data.additionalCRS)) { // cas d'un territoire\n data.additionalCRS.push(addCRS);\n } else { // cas d'une couche\n // si le tableau n'est pas encore créé\n if (!data.additionalProjections || !Array.isArray(data.additionalProjections)) {\n data.additionalProjections = [];\n }\n data.additionalProjections.push(addCRS);\n }\n }\n },\n\n // info : /General/Extension/gpp:General/gpp:Territories/gpp:Territory/gpp:DefaultLayer\n /** TODO : jsdoc block */\n DefaultLayer : function (node, territory) {\n var lyr = node.getAttribute(\"layerId\");\n if (lyr && territory && Array.isArray(territory.defaultLayers)) {\n territory.defaultLayers.push(lyr);\n }\n },\n\n // info : /General/Extension/gpp:General/gpp:Territories/gpp:Territory/gpp:BoundingBox\n // ou : /LayerList/Extension/gpp:Layer/gpp:BoundingBox\n // ou : /LayerList/Layer/Extension/gpp:Layer/gpp:Constraints/gpp:Constraint/gpp:BoundingBox\n // ou : /LayerList/Extension/gpp:Layer/gpp:Originators/gpp:Originator/gpp:Constraints/gpp:Constraint/gpp:BoundingBox\n /** TODO : jsdoc block */\n BoundingBox : function (node, data) {\n if (data) {\n var values = __getChildValue(node).split(\",\");\n if (values.length === 4) {\n // get bbox coordinates (wgs84)\n var bbox = {\n left : parseFloat(values[0]),\n right : parseFloat(values[2]),\n top : parseFloat(values[3]),\n bottom : parseFloat(values[1])\n };\n // get temporal extent params (constraint or layer)\n var minT = node.getAttribute(\"minT\");\n var maxT = node.getAttribute(\"maxT\");\n\n if (data.hasOwnProperty(\"geoBBOX\")) { // cas d'un territoire\n data.geoBBOX = bbox;\n } else if (data.hasOwnProperty(\"bbox\")) { // cas d'une constraint\n if (data.bbox.left || data.bbox.right || data.bbox.top || data.bbox.bottom) {\n // si on a déjà une bbox, il faut stocker d'autres contraintes\n if (!data.multiConstraints) {\n data.multiConstraints = [];\n }\n var newConstraint = new Constraint();\n newConstraint.bbox = bbox;\n newConstraint.temporalExtent = [minT, maxT];\n data.multiConstraints.push(newConstraint);\n } else {\n // contrainte classique\n data.bbox = bbox;\n data.temporalExtent = [minT, maxT];\n }\n } else { // cas d'une layer\n if (!data.globalConstraint) {\n data.globalConstraint = new Constraint();\n }\n data.globalConstraint.bbox = bbox;\n data.globalConstraint.temporalExtent = [minT, maxT];\n }\n }\n }\n },\n\n // info : /General/Extension/gpp:General/gpp:Territories/gpp:Territory/gpp:Resolution\n /** TODO : jsdoc block */\n Resolution : function (node, territory) {\n // info : The default resolution to display on this territory, in CRS coordinate system\n var res = __getChildValue(node);\n if (res && territory && territory.defaultOptions && territory.defaultOptions.hasOwnProperty(\"resolution\")) {\n territory.defaultOptions.resolution = parseFloat(res);\n }\n },\n\n // info : /General/Extension/gpp:General/gpp:Territories/gpp:Territory/gpp:Center/gpp:x\n /** TODO : jsdoc block */\n x : function (node, territory) {\n var lon = __getChildValue(node);\n if (lon && territory && territory.geoCenter && territory.geoCenter.hasOwnProperty(\"lon\")) {\n territory.geoCenter.lon = parseFloat(lon);\n }\n },\n\n // info : /General/Extension/gpp:General/gpp:Territories/gpp:Territory/gpp:Center/gpp:y\n /** TODO : jsdoc block */\n y : function (node, territory) {\n var lat = __getChildValue(node);\n if (lat && territory && territory.geoCenter && territory.geoCenter.hasOwnProperty(\"lat\")) {\n territory.geoCenter.lat = parseFloat(lat);\n }\n },\n\n // info : /General/Extension/gpp:General/gpp:Resolutions\n /** TODO : jsdoc block */\n Resolutions : function (resNode, config) {\n // info : List of resolutions in CRS:84 (comma separated values)\n if (config && config.generalOptions && config.generalOptions.hasOwnProperty(\"wgs84Resolutions\")) {\n config.generalOptions.wgs84Resolutions = __getChildValue(resNode).split(\",\");\n }\n },\n\n // info : /LayerList/Layer/Extension/gpp:Layer\n /** TODO : jsdoc block */\n Layer : function (node, lyrData) {\n // attributs : id, opacity, order, visibleInCatalog, aggregate, more\n if (lyrData && lyrData.hasOwnProperty(\"lyrId\") && lyrData.lyr) {\n lyrData.lyrId = node.getAttribute(\"id\");\n var aggregate = node.getAttribute(\"aggregate\");\n var more = node.getAttribute(\"more\");\n if (aggregate || more) {\n lyrData.lyr.isAggregate = true;\n }\n __getChildNodes(node, lyrData.lyr);\n }\n },\n\n // info : /LayerList/Layer/Extension/gpp:Layer/gpp:Constraints/gpp:Constraint\n // ou : /LayerList/Extension/gpp:Layer/gpp:Originators/gpp:Originator/gpp:Constraints/gpp:Constraint\n /** TODO : jsdoc block */\n Constraint : function (node, data) {\n var c = new Constraint();\n __getChildNodes(node, c);\n if (data) {\n // on peut être dans le cas d'un originator ou d'une layer, tous les deux ont l'attribut constraints\n if (!data.constraints || !Array.isArray(data.constraints)) {\n data.constraints = [];\n }\n\n // cas de plusieurs contraintes (par ex différents territoires)\n if (c.multiConstraints && Array.isArray(c.multiConstraints)) {\n // on récupère la première contrainte, stockée normalement\n var constraint = new Constraint();\n constraint.crs = c.crs;\n constraint.bbox = c.bbox;\n constraint.minScaleDenominator = c.minScaleDenominator;\n constraint.maxScaleDenominator = c.maxScaleDenominator;\n constraint.temporalExtent = c.temporalExtent;\n data.constraints.push(constraint);\n\n // puis on récupère les autres contraintes, à partir de multiConstraints\n for (var i = 0; i < c.multiConstraints.length; i++) {\n constraint = new Constraint();\n constraint.crs = c.crs;\n constraint.minScaleDenominator = c.minScaleDenominator;\n constraint.maxScaleDenominator = c.maxScaleDenominator;\n constraint.bbox = c.multiConstraints[i].bbox;\n constraint.temporalExtent = c.multiConstraints[i].temporalExtent;\n data.constraints.push(constraint);\n }\n } else {\n // cas d'une contrainte classique\n data.constraints.push(c);\n }\n }\n },\n\n // info : /LayerList/Layer/Extension/gpp:Layer/gpp:Originators/gpp:Originator/gpp:Constraints/gpp:Constraint/gpp:CRS\n // ou : /LayerList/Layer/Extension/gpp:Layer/gpp:Constraints/gpp:Constraint/gpp:CRS\n /** TODO : jsdoc block */\n CRS : function (node, data) {\n // nothing to do.\n if (data && data.hasOwnProperty(\"crs\")) {\n data.crs = __getChildValue(node);\n }\n },\n\n // info : /LayerList/Layer/Extension/gpp:Layer/gpp:Thematics/gpp:Thematic\n /** TODO : jsdoc block */\n Thematic : function (node, lyr) {\n if (lyr) {\n var t = new Thematic();\n t.inspire = false;\n t.name = __getChildValue(node);\n // si aucune thématique n'a été ajoutée, on crée le tableau vide\n if (!lyr.thematics || !Array.isArray(lyr.thematics)) {\n lyr.thematics = [];\n }\n lyr.thematics.push(t);\n }\n },\n\n // info : /LayerList/Layer/Extension/gpp:Layer/gpp:Thematics/gpp:InspireThematic\n /** TODO : jsdoc block */\n InspireThematic : function (node, lyr) {\n if (lyr) {\n var t = new Thematic();\n t.inspire = true;\n t.name = __getChildValue(node);\n // si aucune thématique n'a été ajoutée, on crée le tableau vide\n if (!lyr.thematics || !Array.isArray(lyr.thematics)) {\n lyr.thematics = [];\n }\n lyr.thematics.push(t);\n }\n },\n\n // info : /LayerList/Layer/Extension/gpp:Layer/gpp:Originators/gpp:Originator\n /** TODO : jsdoc block */\n Originator : function (node, lyr) {\n if (lyr) {\n // info : contient des balises Attribution, Logo, URL, et Constraints\n var o = new Originator();\n o.name = node.getAttribute(\"name\");\n __getChildNodes(node, o);\n // si aucun originator n'a été ajouté, on crée le tableau vide\n if (!lyr.originators || !Array.isArray(lyr.originators)) {\n lyr.originators = [];\n }\n lyr.originators.push(o);\n }\n },\n\n // info : /LayerList/Layer/Extension/gpp:Layer/gpp:Originators/gpp:Originator/gpp:Attribution\n /** TODO : jsdoc block */\n Attribution : function (node, originator) {\n if (originator && originator.hasOwnProperty(\"attribution\")) {\n originator.attribution = __getChildValue(node);\n }\n },\n\n // info : /LayerList/Layer/Extension/gpp:Layer/gpp:Originators/gpp:Originator/gpp:Logo\n /** TODO : jsdoc block */\n Logo : function (node, originator) {\n if (originator && originator.hasOwnProperty(\"logo\")) {\n originator.logo = __getChildValue(node);\n }\n },\n\n // info : /LayerList/Layer/Extension/gpp:Layer/gpp:Originators/gpp:Originator/gpp:URL\n /** TODO : jsdoc block */\n URL : function (node, originator) {\n if (originator && originator.hasOwnProperty(\"url\")) {\n originator.url = __getChildValue(node);\n }\n },\n\n // info : /LayerList/Layer/Extension/gpp:Layer/gpp:Legends/gpp:Legend\n /** TODO : jsdoc block */\n Legend : function (node, lyr) {\n // 2 balises : sld:MinScaleDenominator et gpp:LegendURL\n var l = new Legend();\n __getChildNodes(node, l);\n if (lyr) {\n // si aucune légende n'a encore été ajoutée, on crée le tableau vide\n if (!lyr.legends || !Array.isArray(lyr.legends)) {\n lyr.legends = [];\n }\n lyr.legends.push(l);\n }\n },\n\n // info : /LayerList/Layer/Extension/gpp:Layer/gpp:Legends/gpp:Legend/gpp:LegendURL\n /** TODO : jsdoc block */\n LegendURL : function (node, legend) {\n if (legend && legend.hasOwnProperty(\"format\")) {\n legend.format = node.getAttribute(\"format\");\n if (node.hasChildNodes) {\n var child = node.childNodes[0];\n var childName = child.localName || child.baseName || child.nodeName;\n if (childName === \"OnlineResource\" && legend.hasOwnProperty(\"url\")) {\n legend.url = child.getAttribute(\"xlink:href\");\n }\n }\n }\n },\n\n // info : /LayerList/Layer/Extension/gpp:Layer/gpp:QuickLook\n /** TODO : jsdoc block */\n QuickLook : function (node, lyr) {\n // info : contient une balise OnlineResource avec l'url dans l'attribut \"xlink:href\"\n if (node.hasChildNodes) {\n var child = node.childNodes[0];\n var childName = child.localName || child.baseName || child.nodeName;\n if (childName === \"OnlineResource\" && lyr) {\n lyr.quicklookUrl = child.getAttribute(\"xlink:href\");\n }\n }\n },\n\n // info : /LayerList/Layer/Extension/gpp:Layer/gpp:MetadataURL\n /** TODO : jsdoc block */\n MetadataURL : function (node, lyr) {\n if (lyr) {\n // info : contient une balise OnlineResource avec l'url dans l'attribut \"xlink:href\"\n var m = new Metadata();\n m.format = node.getAttribute(\"format\");\n if (node.hasChildNodes) {\n var child = node.childNodes[0];\n var childName = child.localName || child.baseName || child.nodeName;\n if (childName === \"OnlineResource\") {\n m.url = child.getAttribute(\"xlink:href\");\n }\n }\n // si aucune metadata n'a été ajoutée, on crée le tableau vide\n if (!lyr.metadata && !Array.isArray(lyr.metadata)) {\n lyr.metadata = [];\n }\n lyr.metadata.push(m);\n }\n },\n\n // info : /LayerList/Layer/Extension/gpp:Layer/gpp:Keys/gpp:Key\n /** TODO : jsdoc block */\n Key : function (node, lyr) {\n if (lyr) {\n // récupération de la clé API\n var key = node.getAttribute(\"id\");\n // si on n'a pas encore ajouté de clé, on crée le tableau vide\n if (!lyr.apiKeys || !Array.isArray(lyr.apiKeys)) {\n lyr.apiKeys = [];\n }\n lyr.apiKeys.push(key);\n\n // récupération de l'url du service avec la clé API\n var serverUrl = __getChildValue(node);\n if (!lyr.serviceParams) {\n lyr.serviceParams = {};\n }\n if (!lyr.serviceParams.serverUrl) {\n lyr.serviceParams.serverUrl = {};\n }\n if (!lyr.serviceParams.serverUrl[key]) {\n lyr.serviceParams.serverUrl[key] = serverUrl;\n }\n }\n }\n\n },\n\n ows : {\n /** TODO : jsdoc block */\n Identifier : function (node, data) {\n if (data && data.hasOwnProperty(\"TMS\")) { // dans le cas d'un TileMatrixSet\n data.identifier = __getChildValue(node);\n } else if (data && data.hasOwnProperty(\"matrixId\")) { // dans le cas d'une TileMatrix\n data.matrixId = __getChildValue(node);\n }\n },\n\n /** TODO : jsdoc block */\n SupportedCRS : function (node, tmsData) {\n if (tmsData && tmsData.TMS && tmsData.TMS.hasOwnProperty(\"projection\")) {\n tmsData.TMS.projection = __getChildValue(node);\n }\n }\n },\n\n sld : {\n // info : /General/Extension/gpp:General/gpp:Territories/gpp:Territory/sld:MinScaleDenominator\n // ou : /LayerList/Layer/sld:MinScaleDenominator\n // ou : /LayerList/Layer/Extension/gpp:Layer/gpp:Originators/gpp:Originator/gpp:Constraints/sld:MinScaleDenominator\n // ou : /LayerList/Layer/Extension/gpp:Layer/gpp:Legends/gpp:Legend/sld:MinScaleDenominator\n /** TODO : jsdoc block */\n MinScaleDenominator : function (node, data) {\n var minScale = __getChildValue(node);\n if (minScale && data) {\n if (data.hasOwnProperty(\"defaultOptions\")) { // cas d'un territoire\n data.defaultOptions.minScaleDenominator = parseFloat(minScale);\n } else if (data.lyr) { // cas d'une layer\n if (!data.lyr.globalConstraint) {\n data.lyr.globalConstraint = new Constraint();\n }\n data.lyr.globalConstraint.minScaleDenominator = parseFloat(minScale);\n } else if (data.hasOwnProperty(\"minScaleDenominator\")) { // cas d'une contrainte ou d'une légende\n data.minScaleDenominator = parseFloat(minScale);\n }\n }\n },\n\n // info : /General/Extension/gpp:General/gpp:Territories/gpp:Territory/sld:MaxScaleDenominator\n // ou : /LayerList/Layer/sld:MaxScaleDenominator\n // ou : /LayerList/Layer/Extension/gpp:Layer/gpp:Originators/gpp:Originator/gpp:Constraints/sld:MaxScaleDenominator\n /** TODO : jsdoc block */\n MaxScaleDenominator : function (node, data) {\n var maxScale = __getChildValue(node);\n if (maxScale && data) {\n if (data.hasOwnProperty(\"defaultOptions\")) { // cas d'un territoire\n data.defaultOptions.maxScaleDenominator = parseFloat(maxScale);\n } else if (data.lyr) { // cas d'une layer\n if (!data.lyr.globalConstraint) {\n data.lyr.globalConstraint = new Constraint();\n }\n data.lyr.globalConstraint.maxScaleDenominator = parseFloat(maxScale);\n } else if (data.hasOwnProperty(\"maxScaleDenominator\")) { // cas d'une contrainte\n data.maxScaleDenominator = parseFloat(maxScale);\n }\n }\n }\n },\n\n wmts : {\n\n // info : /LayerList/Layer/Extension/gpp:Layer/wmts:TileMatrixSetLink/wmts:TileMatrixSetLimits\n /** TODO : jsdoc block */\n TileMatrixSetLimits : function (node, lyr) {\n // info : contient des balises wmts:TileMatrixLimits\n if (lyr) {\n var limits = {};\n // on récupère les limites dans les balises TileMatrixLimits\n __getChildNodes(node, limits);\n\n if (!lyr.wmtsOptions) {\n lyr.wmtsOptions = {};\n }\n lyr.wmtsOptions.tileMatrixSetLimits = limits;\n }\n },\n\n // info : /LayerList/Layer/Extension/gpp:Layer/wmts:TileMatrixSetLink/wmts:TileMatrixSetLimits/wmts:TileMatrixLimits\n /** TODO : jsdoc block */\n TileMatrixLimits : function (node, limits) {\n var limit = new TileMatrixLimit();\n var limitId;\n if (node.hasChildNodes) {\n var children = node.childNodes;\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n var childName = child.localName || child.baseName || child.nodeName;\n if (childName === \"TileMatrix\") {\n limitId = __getChildValue(child);\n } else if (childName === \"MinTileRow\") {\n limit.minTileRow = __getChildValue(child);\n } else if (childName === \"MaxTileRow\") {\n limit.maxTileRow = __getChildValue(child);\n } else if (childName === \"MinTileCol\") {\n limit.minTileCol = __getChildValue(child);\n } else if (childName === \"MaxTileCol\") {\n limit.maxTileCol = __getChildValue(child);\n }\n }\n if (limitId && limits && !limits[limitId]) {\n limits[limitId] = limit;\n }\n }\n },\n\n // info : /General/Extension/gpp:General/gpp:TileMatrixSets/wmts:TileMatrixSet\n // ou : // info : /LayerList/Layer/Extension/gpp:Layer/wmts:TileMatrixSetLink/wmts:TileMatrixSet\n /** TODO : jsdoc block */\n TileMatrixSet : function (node, data) {\n // info : Describes a particular set of tile matrices.\n\n if (data && data.tileMatrixSets) { // les tileMatrixSets de General\n // nouvel objet TileMatrixSet\n var tmsData = {};\n tmsData.TMS = new TileMatrixSet();\n tmsData.resolutions = [];\n\n // lecture des informations du TMS\n __getChildNodes(node, tmsData);\n\n // récupération des identifiants des niveaux de matrice (pour faciliter l'accès au WMTS via les API carto)\n var tileMatrices = tmsData.TMS.tileMatrices;\n for (var tm in tileMatrices) {\n if (tileMatrices.hasOwnProperty(tm)) {\n tmsData.TMS.matrixIds.push(tm);\n }\n }\n\n if (tmsData.TMS.getProjection() === \"IGNF:WGS84G\" || tmsData.TMS.getProjection() === \"EPSG:4326\") {\n if (data.generalOptions && Array.isArray(data.generalOptions.wgs84Resolutions)) {\n var wgs84Resolutions = data.generalOptions.wgs84Resolutions;\n for (var i = 0; i < wgs84Resolutions.length; i++) {\n // info : les résolutions stockées dans wgs84Resolutions, issues de l'autoconf, sont des string\n tmsData.resolutions[i] = parseFloat(wgs84Resolutions[i]);\n }\n }\n }\n\n // tri des résolutions (par ordre décroissant cette fois)\n if (Array.isArray(tmsData.resolutions) && tmsData.resolutions.sort !== undefined) {\n tmsData.resolutions.sort(\n function (x, y) {\n return y - x;\n }\n );\n }\n tmsData.TMS.nativeResolutions = tmsData.resolutions;\n\n // ajout du TileMatrixSet à la variable config\n data.tileMatrixSets[tmsData.identifier] = tmsData.TMS;\n } else { // le TileMatrixSetLink d'une couche (layer)\n if (data && !data.wmtsOptions) {\n data.wmtsOptions = {};\n }\n // ajout du lien vers le TMS\n data.wmtsOptions.tileMatrixSetLink = __getChildValue(node);\n }\n },\n\n // info : /General/Extension/gpp:General/gpp:TileMatrixSets/wmts:TileMatrixSet/wmts:TileMatrix\n /** TODO : jsdoc block */\n TileMatrix : function (node, tmsData) {\n // info : Describes a particular tile matrix.\n\n if (tmsData) {\n // nouveau niveau de matrice : TileMatrix\n var tileMatrix = new TileMatrix();\n\n // lecture des information du TileMatrix\n __getChildNodes(node, tileMatrix);\n\n // calcul de la résolution associée au dénominateur d'échelle du niveau de pyramide, selon la projection.\n if (tmsData.TMS && tmsData.TMS.getProjection()) {\n var proj = tmsData.TMS.getProjection();\n if (proj === \"EPSG:3857\" || proj === \"EPSG:2154\") {\n // calcul de la résolution associée, en m/px\n // en se basant sur une \"taille standard de pixel\" de 0.28mm*0.28mm (standard WMTS 1.0)\n var r = tileMatrix.scaleDenominator * 0.00028;\n if (tmsData.resolutions && Array.isArray(tmsData.resolutions)) {\n tmsData.resolutions.push(r);\n }\n }\n }\n\n // ajout du TileMatrix au TileMatrixSet\n if (tmsData.TMS && tmsData.TMS.tileMatrices) {\n tmsData.TMS.tileMatrices[tileMatrix.matrixId] = tileMatrix;\n }\n }\n },\n\n // info : /General/Extension/gpp:General/gpp:TileMatrixSets/wmts:TileMatrixSet/wmts:TileMatrix/wmts:ScaleDenominator\n /** TODO : jsdoc block */\n ScaleDenominator : function (node, tileMatrix) {\n var scale = __getChildValue(node);\n if (scale && tileMatrix && tileMatrix.hasOwnProperty(\"scaleDenominator\")) {\n tileMatrix.scaleDenominator = parseFloat(scale);\n }\n },\n\n // info : /General/Extension/gpp:General/gpp:TileMatrixSets/wmts:TileMatrixSet/wmts:TileMatrix/wmts:TopLeftCorner\n /** TODO : jsdoc block */\n TopLeftCorner : function (node, tileMatrix) {\n var values = __getChildValue(node).split(\" \");\n if (values && tileMatrix) {\n tileMatrix.topLeftCorner = {};\n tileMatrix.topLeftCorner.x = parseFloat(values[0]);\n tileMatrix.topLeftCorner.y = parseFloat(values[1]);\n }\n },\n\n // info : /General/Extension/gpp:General/gpp:TileMatrixSets/wmts:TileMatrixSet/wmts:TileMatrix/wmts:TileWidth\n /** TODO : jsdoc block */\n TileWidth : function (node, tileMatrix) {\n var value = __getChildValue(node);\n if (value && tileMatrix && tileMatrix.hasOwnProperty(\"tileWidth\")) {\n tileMatrix.tileWidth = parseInt(value, 10);\n }\n },\n\n // info : /General/Extension/gpp:General/gpp:TileMatrixSets/wmts:TileMatrixSet/wmts:TileMatrix/wmts:TileHeight\n /** TODO : jsdoc block */\n TileHeight : function (node, tileMatrix) {\n var value = __getChildValue(node);\n if (value && tileMatrix && tileMatrix.hasOwnProperty(\"tileHeight\")) {\n tileMatrix.tileHeight = parseInt(value, 10);\n }\n },\n\n // info : /General/Extension/gpp:General/gpp:TileMatrixSets/wmts:TileMatrixSet/wmts:TileMatrix/wmts:MatrixWidth\n /** TODO : jsdoc block */\n MatrixWidth : function (node, tileMatrix) {\n var value = __getChildValue(node);\n if (value && tileMatrix && tileMatrix.hasOwnProperty(\"matrixWidth\")) {\n tileMatrix.matrixWidth = parseInt(value, 10);\n }\n },\n\n // info : /General/Extension/gpp:General/gpp:TileMatrixSets/wmts:TileMatrixSet/wmts:TileMatrix/wmts:MatrixHeight\n /** TODO : jsdoc block */\n MatrixHeight : function (node, tileMatrix) {\n var value = __getChildValue(node);\n if (value && tileMatrix && tileMatrix.hasOwnProperty(\"matrixHeight\")) {\n tileMatrix.matrixHeight = parseInt(value, 10);\n }\n }\n },\n\n /** TODO : jsdoc block */\n serviceException : function (node) {\n var response = {};\n if (node.hasChildNodes()) {\n var children = node.childNodes;\n var child;\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n if (child.nodeName === \"exception\") {\n response.exceptionReport = AutoConfResponseReader.READERS[\"exception\"](child);\n }\n }\n }\n return response;\n },\n\n /** TODO : jsdoc block */\n exception : function (node) {\n var exceptionReport = {};\n\n // get exception code\n var exceptionCode = node.getAttribute(\"code\");\n if (exceptionCode) {\n exceptionReport.exceptionCode = exceptionCode;\n }\n\n // get exception message\n var textNode = node.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n exceptionReport.exception = textNode.nodeValue;\n }\n\n return exceptionReport;\n }\n\n};\n\n/**\n * Méthode permettant de lancer la lecture d'une réponse XML du service d'autoconf,\n * à l'aide des READERS de la classe.\n *\n * @method AutoConfResponseReader.read\n * @param {DOMElement} root - racine de la réponse XML à lire\n * @return {Object} config|exceptionReport : l'objet contenant les informations de la réponse XML,\n * sous la forme d'un objet AutoConfResponse, ou un objet littéral exceptionReport si le service a renvoyé une exception.\n * @static\n * @memberof AutoConfResponseReader\n */\nAutoConfResponseReader.read = function (root) {\n if (root.nodeName === \"ViewContext\") {\n var nsPrefix = root.prefix || AutoConfResponseReader.DEFAULTPREFIX;\n var config = AutoConfResponseReader.READERS[nsPrefix][root.nodeName](root);\n return config;\n } else if (root.nodeName === \"serviceException\") {\n var exceptionReport = AutoConfResponseReader.READERS[root.nodeName](root);\n return exceptionReport;\n } else {\n throw new Error(\"Erreur lors de la lecture de la réponse : elle n'est pas au format attendu.\");\n }\n};\n\n/**\n * Récupération des attributs d'un noeud élément\n *\n * @private\n * @memberof AutoConfResponseReader\n * @method __getAttributes\n * @param {DOMElement} node - noeud contenant l'attribut recherché\n * @return {Object} nodeAttributes - objet contenant les noms et valeurs des différents attributs\n */\nfunction __getAttributes (node) {\n if (node.attributes.length > 0) {\n var nodeAttributes = {};\n var attributes = node.attributes;\n for (var i = 0; i < attributes.length; i++) {\n var attribute = attributes[i];\n nodeAttributes[attribute.nodeName] = attribute.nodeValue;\n }\n return nodeAttributes;\n }\n}\n\n/**\n * Récupération des noeuds enfants (seulement de type ELEMENT), à partir d'un noeud donné, pour lecture (readNode).\n *\n * @private\n * @memberof AutoConfResponseReader\n * @method __getChildNodes\n * @param {DOMElement} node - a DOM node\n * @param {Array|Object} [data] - an object to be filled with node data\n */\nfunction __getChildNodes (node, data) {\n if (node.hasChildNodes()) {\n var children = node.childNodes;\n var child;\n var childName;\n var childPrefix;\n\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n\n if (child.nodeType === 1) { // 1 === node.ELEMENT_NODE\n childName = child.localName || child.baseName || child.nodeName;\n childPrefix = child.prefix || AutoConfResponseReader.DEFAULTPREFIX;\n\n if (AutoConfResponseReader.READERS[childPrefix][childName]) {\n var reader = AutoConfResponseReader.READERS[childPrefix][childName];\n reader(child, data);\n } else {\n __getChildNodes(child, data);\n }\n }\n }\n }\n}\n\n/**\n * Lecture de la valeur du premier child d'un noeud, si elle existe.\n *\n * @private\n * @memberof AutoConfResponseReader\n * @method __getChildValue\n * @param {DOMElement} node - a DOM node\n * @return {String} value - valeur du firstChild du noeud en entrée, ou chaîne vide.\n */\nfunction __getChildValue (node) {\n var textNode;\n var value = \"\";\n\n if (node.hasChildNodes()) {\n textNode = node.firstChild;\n if (textNode.nodeType === 3 || textNode.nodeType === 4) { // 3 === node.TEXT_NODE\n value = textNode.nodeValue;\n }\n }\n return value;\n}\n\n/**\n * Vérification des attributs du service, dans la balise XLS de la réponse :\n * version, namespaces, et namespace par défaut doivent correspondre à ceux attendus.\n *\n * @private\n * @memberof AutoConfResponseReader\n * @method __checkServiceAttributes\n * @param {DOMElement} viewContextNode - a DOM node, corresponding to XLS first tag.\n */\nfunction __checkServiceAttributes (viewContextNode) {\n if (viewContextNode.attributes.length > 0) {\n // on récupère et parcourt les attributs de la balise XLS de la réponse\n var xlsAttributes = __getAttributes(viewContextNode);\n for (var att in xlsAttributes) {\n if (xlsAttributes.hasOwnProperty(att)) {\n // vérification de la version\n if (att === \"version\") {\n if (xlsAttributes[\"version\"] !== AutoConfResponseReader.VERSION) {\n console.log(\"[AutoConfResponseReader] autoconf version is not the expected one : there may be errors in parsing\");\n return;\n }\n }\n\n // on vérifie que l'uri du namespace par défaut est bien celle que l'on attend\n if (att === \"xmlns\") {\n if (xlsAttributes[att] !== AutoConfResponseReader.NAMESPACES.xmlns) {\n console.log(\"[AutoConfResponseReader] autoconf response default namespace is not the expected one\");\n return;\n }\n continue;\n }\n\n var prefix = att.split(\":\")[0];\n var ns = att.split(\":\")[1];\n\n // si on a un autre xmlns, on vérifie aussi les URI\n if (prefix === \"xmlns\" && ns) {\n // si l'attribut correspond à un namespace défini dans le reader\n if (AutoConfResponseReader.NAMESPACES[ns]) {\n // il faut que les URI correspondent aussi.\n if (AutoConfResponseReader.NAMESPACES[ns] !== xlsAttributes[att]) {\n console.log(\"[AutoConfResponseReader] autoconf response \" + att + \" namespace is not the expected one\");\n return;\n }\n }\n }\n\n // pour finir on vérifie la localisation du schema XSD du service\n if (ns === \"schemaLocation\") {\n if (xlsAttributes[att] !== AutoConfResponseReader.SCHEMALOCATION[0] && xlsAttributes[att] !== AutoConfResponseReader.SCHEMALOCATION[1]) {\n console.log(\"[AutoConfResponseReader] autoconf response schema location is not the expected one\");\n return;\n }\n }\n }\n }\n }\n}\n\nexport default AutoConfResponseReader;\n" - }, - { - "id": 63, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Geocode.js", - "name": "./src/Services/Geocode/Geocode.js", - "index": 48, - "index2": 67, - "size": 10978, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Services.js", - "issuerId": 45, - "issuerName": "./src/Services/Services.js", - "profile": { - "factory": 513, - "building": 200, - "dependencies": 216 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 45, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Services.js", - "module": "./src/Services/Services.js", - "moduleName": "./src/Services/Services.js", - "type": "harmony import", - "userRequest": "./Geocode/Geocode", - "loc": "11:0-40" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 3, - "source": "\nimport Logger from \"../../Utils/LoggerByDefault\";\nimport _ from \"../../Utils/MessagesResources\";\nimport ErrorService from \"../../Exceptions/ErrorService\";\nimport CommonService from \"../CommonService\";\nimport DirectGeocodeRequestFactory from \"./Request/DirectGeocodeRequestFactory\";\nimport DirectGeocodeResponseFactory from \"./Response/DirectGeocodeResponseFactory\";\n\n/**\n * @classdesc\n * Appel du service de géocodage direct du Géoportail :\n * envoi de la requête construite selon les paramètres en options,\n * éventuellement parsing et analyse de la réponse,\n * retour d'une réponse en paramètre de la fonction onSuccess.\n *\n *\n * @constructor\n * @extends {Gp.Services.CommonService}\n * @alias Gp.Services.Geocode\n *\n * @param {Object} options - options spécifiques au service (+ les options heritées)\n *\n * @param {String|Object} options.location - Nom de l'adresse, du toponyme, de l'unité administrative ou de la parcelle cadastrale recherchée.\n * Sous forme de String, la propriété permet de faire une recherche déstructurée.\n * Sous forme d'objet, la propriété permet de structurer la recherche.\n * Dans ce cas, les propriétés possibles de cet objet sont décrites ci-après.\n * @param {Number} [options.location.number] - Numéro du bâtiment de l'adresse recherchée, dans le cas d'une recherche structurée\n * (si options.location est un objet Javascript).\n * @param {String} [options.location.street] - Nom de la rue de l'adresse recherchée, dans le cas d'une recherche structurée\n * (si options.location est un objet Javascript).\n * @param {String} [options.location.city] - Nom de la ville de l'adresse recherchée, dans le cas d'une recherche structurée\n * (si options.location est un objet Javascript).\n * @param {Number} [options.location.postalCode] - Numéro du code postal de l'adresse recherchée, dans le cas d'une recherche structurée\n * (si options.location est un objet Javascript).\n *\n * @param {Object} [options.filterOptions] - Les propriétés possibles de cet objet sont décrites ci-après.\n * @param {Object} [options.filterOptions.bbox] - Emprise dans laquelle on souhaite effectuer la recherche.\n * Les propriétés possibles de cet objet sont décrites ci-après.\n * @param {Float} options.filterOptions.bbox.left - Abscisse du côté gauche de la BBOX\n * @param {Float} options.filterOptions.bbox.right - Abscisse du côté droit de la BBOX\n * @param {Float} options.filterOptions.bbox.top - Ordonnée supérieure de la BBOX\n * @param {Float} options.filterOptions.bbox.bottom - Ordonnée inférieure de la BBOX\n *\n * @param {Array.} [options.filterOptions.type = \"StreetAddress\"] - Type de l'objet recherché.\n * Le service de géocodage du Géoportail permet de rechercher des 'PostionOfInterest' pour des toponymes, des 'StreetAddress'\n * pour des adresses postales, et/ou des 'CadastralParcel' pour des parcelles cadastrales.\n * D'autres types pourront être rajoutés selon l'évolution du service.\n * Par défaut, type = ['StreetAddress'].\n *\n * @param {String} [options.filterOptions.[proprietes du filtre]] - Critère supplémentaire pour filtrer la recherche sous la forme\n * d'un couple clé/valeur à définir selon les possibilités du serveur ajouté à la requête.\n * Le service de géocodage du Géoportail permet de filtrer tous les résultats avec les propriétés :\n * \"municipality\", \"insee\", et \"department\".\n * Il permet aussi de filtrer les adresses postales avec les propriétés :\n * \"quality\", \"ID\", \"ID_TR\" et \"territory\".\n * Il permet de filtrer les toponymes avec les propriétés :\n * \"importance\", \"nature\" et \"territory\".\n * Enfin, il permet de filtrer les parcelles cadastrales avec les propriétés :\n * \"sheet\", \"section\", et \"absorbedcity\". Pas de valeur par défaut.\n *\n * @param {Number} [options.maximumResponses] - Nombre de réponses maximal que l'on souhaite recevoir.\n * Pas de valeur par défaut.\n * Si le serveur consulté est celui du Géoportail, la valeur par défaut sera donc celle du service : 25.\n *\n * @param {Boolean} [options.returnFreeForm] - Indique si l'on souhaite en réponse un localisant concaténée plutôt que structuré.\n * Pas de valeur par défaut. Si le serveur consulté est celui du Géoportail, la valeur par défaut sera donc celle du service : 'false'.\n *\n * @param {String} [options.srs] - Système de coordonnées dans lequel les paramètres géographiques en entrée et la réponse du service sont exprimés.\n * Pas de valeur par défaut. Si le serveur consulté est celui du Géoportail, la valeur par défaut sera donc celle du service : 'EPSG:4326'.\n *\n * @example\n * var options = {\n * apiKey : null,\n * serverUrl : 'http://localhost/service/',\n * protocol : 'JSONP', // JSONP|XHR\n * proxyURL : null,\n * httpMethod : 'GET', // GET|POST\n * timeOut : 10000, // ms\n * rawResponse : false, // true|false\n * scope : null, // this\n * onSuccess : function (response) {},\n * onFailure : function (error) {},\n * // spécifique au service\n * positions : [{lon:, lat:}, {lon:, lat:}],\n * (...)\n * };\n * @private\n */\nfunction Geocode (options) {\n if (!(this instanceof Geocode)) {\n throw new TypeError(_.getMessage(\"CLASS_CONSTRUCTOR\", \"Geocode\"));\n }\n\n /**\n * Nom de la classe (heritage)\n * FIXME instance ou classe ?\n */\n this.CLASSNAME = \"Geocode\";\n\n // appel du constructeur par heritage\n CommonService.apply(this, arguments);\n\n this.logger = Logger.getLogger(\"Gp.Services.Geocode\");\n this.logger.trace(\"[Constructeur Geocode (options)]\");\n\n if (!options.location) {\n throw new Error(_.getMessage(\"PARAM_MISSING\", \"location\"));\n }\n\n // FIXME ECMAScript 5 support\n if (typeof options.location === \"object\" && Object.keys(options.location).length === 0) {\n throw new Error(_.getMessage(\"PARAM_EMPTY\", \"location\"));\n } else if (typeof options.location === \"string\" && options.location.length === 0) {\n throw new Error(_.getMessage(\"PARAM_EMPTY\", \"location\"));\n }\n\n // ajout des options spécifiques au service\n this.options.location = options.location;\n\n // on definit des filtres apr defaut\n if (!options.filterOptions || typeof options.filterOptions !== \"object\") {\n this.options.filterOptions = options.filterOptions = {\n type : [\"StreetAddress\"]\n };\n }\n\n // FIXME ECMAScript 5 support (valable pour un objet uniquement !)\n // ceci permet de tester le cas où 'options.filterOptions' : {}\n if (Object.keys(options.filterOptions).length === 0) {\n this.options.filterOptions = {\n type : [\"StreetAddress\"]\n };\n }\n\n var filter = Object.keys(options.filterOptions);\n for (var i = 0; i < filter.length; i++) {\n var key = filter[i];\n // on transforme certains filtres qui pourraient être numériques en string\n var filtersCouldBeNumberList = [\"department\", \"number\", \"postalCode\", \"insee\", \"importance\", \"ID\", \"IDTR\", \"absorbedCity\", \"sheet\", \"section\", \"inseeRegion\", \"inseeDepartment\"];\n if (filtersCouldBeNumberList.indexOf(key) !== -1 && typeof options.filterOptions[key] !== \"string\") {\n options.filterOptions[key] = options.filterOptions[key].toString();\n }\n // on supprime les filtres vides\n if (!options.filterOptions[key]) {\n delete this.options.filterOptions[key];\n }\n }\n\n this.options.filterOptions.type = options.filterOptions.type || [\"StreetAddress\"];\n this.options.maximumResponses = options.maximumResponses || 25;\n this.options.returnFreeForm = options.returnFreeForm || false;\n this.options.srs = options.srs || \"EPSG:4326\";\n\n // attributs d'instances\n\n /**\n * Format forcé de la réponse du service : \"xml\"\n * sauf si l'on souhaite une reponse brute (options.rawResponse)\n */\n this.options.outputFormat = (this.options.rawResponse) ? \"\" : \"xml\";\n}\n\n/**\n * @lends module:Geocode#\n */\nGeocode.prototype = Object.create(CommonService.prototype, {\n // todo\n // getter/setter\n});\n\n/*\n * Constructeur (alias)\n */\nGeocode.prototype.constructor = Geocode;\n\n/**\n * Création de la requête (overwrite)\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nGeocode.prototype.buildRequest = function (error, success) {\n var options = {\n httpMethod : this.options.httpMethod,\n // options specifiques du service\n location : this.options.location,\n returnFreeForm : this.options.returnFreeForm,\n filterOptions : this.options.filterOptions,\n srs : this.options.srs,\n maximumResponses : this.options.maximumResponses\n };\n\n this.request = DirectGeocodeRequestFactory.build(options);\n\n // on teste si la requete a bien été construite !\n (!this.request)\n ? error.call(this, new ErrorService(_.getMessage(\"SERVICE_REQUEST_BUILD\")))\n : success.call(this, this.request);\n};\n\n/**\n * Analyse de la reponse (overwrite)\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nGeocode.prototype.analyzeResponse = function (error, success) {\n /* INFO :\n Etape 1 : Création de la requête\n -> Appel du format OpenLS pour créer une requête à partir des paramètres (par exemple)\n (soit directement une URL si GET, soit une requête XML si POST)\n /!\\ tester si apiKey && serverUrl => on ne garde que serverUrl\n -> stockage de la requête dans this.request\n Etape 2 : Envoi de la requête selon le bon protocole\n -> appel du protocol JSONP ou XHR, et envoi (par ex send ()) (this.protocol)\n -> récupération de la réponse xml dans la fonction onSuccess () (this.response)\n -> si code HTTP 200 et pas de message d'erreur : etape 3\n -> si code HTTP != 200 : lancement de la fonction de callback onFailure avec le message d'erreur\n Etape 3 : Analyse de la réponse xml et construction du JSON (si rawResponse === false )\n -> appel du parser pour récupérer le xmlDocument\n -> appel du reader OpenLS pour lire les éléments et récupérer l'objet JSON\n correspondant au type de géocodage (défini dans les specs)\n Etape 4 : Lancement de la fonction de callback onSuccess avec la réponse :\n -> xmlResponse (si rawResponse === true)\n -> ou geocodedLocations\n */\n\n if (this.response) {\n var options = {\n response : this.response,\n rawResponse : this.options.rawResponse,\n onError : error,\n onSuccess : success,\n scope : this\n };\n\n DirectGeocodeResponseFactory.build(options);\n } else {\n error.call(this, new ErrorService(_.getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n }\n};\n\nexport default Geocode;\n" - }, - { - "id": 64, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "name": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "index": 49, - "index2": 61, - "size": 3292, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Geocode.js", - "issuerId": 63, - "issuerName": "./src/Services/Geocode/Geocode.js", - "profile": { - "factory": 220, - "building": 488, - "dependencies": 56 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 63, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Geocode.js", - "module": "./src/Services/Geocode/Geocode.js", - "moduleName": "./src/Services/Geocode/Geocode.js", - "type": "harmony import", - "userRequest": "./Request/DirectGeocodeRequestFactory", - "loc": "6:0-80" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 4, - "source": "/**\n * Creation d'une requête OpenLS en mode POST ou GET\n * (Factory)\n *\n * @module DirectGeocodeRequestFactory\n * @alias Gp.Services.Geocode.Request.DirectGeocodeRequestFactory\n * @private\n */\nimport Logger from \"../../../Utils/LoggerByDefault\";\nimport XLS from \"../../../Formats/XLS\";\nimport LocationUtilityService from \"../../../Formats/XLS/LocationUtilityService\";\nimport GeocodeFilterExtension from \"../../../Formats/XLS/LocationUtilityService/GeocodeFilterExtension\";\nimport StreetAddress from \"../Request/model/StreetAddress\";\nimport PositionOfInterest from \"../Request/model/PositionOfInterest\";\nimport CadastralParcel from \"../Request/model/CadastralParcel\";\nimport Administratif from \"../Request/model/Administratif\";\n\nvar DirectGeocodeRequestFactory = {\n\n /**\n * interface unique\n *\n * @method build\n * @static\n * @param {Object} options - options definies dans le composant Geocode\n *\n * @example\n * var options = {\n * httpMethod:\n * // options specifiques du service\n * location:\n * returnFreeForm:\n * filterOptions:\n * srs:\n * maximumResponses:\n * };\n * var result = DirectGeocodeRequestFactory.build(options);\n * if (!result) {\n * // error...\n * }\n * @returns {String} request\n */\n build : function (options) {\n // logger\n var logger = Logger.getLogger(\"DirectGeocodeRequestFactory\");\n logger.trace([\"DirectGeocodeRequestFactory::build()\"]);\n\n var request = null;\n\n // gestion des filtres (table de geocodage) !\n // par defaut, on les ajoute toute ...\n var oFilter = new GeocodeFilterExtension();\n oFilter.addFilterExtensions(new Administratif());\n oFilter.addFilterExtensions(new StreetAddress());\n oFilter.addFilterExtensions(new PositionOfInterest());\n oFilter.addFilterExtensions(new CadastralParcel());\n\n // objet LUS\n // on peut aussi par un objet XLS::GeocodeRequest\n var oLUS = new LocationUtilityService({\n location : options.location,\n returnFreeForm : options.returnFreeForm,\n filterOptions : options.filterOptions\n });\n oLUS.addFilter(oFilter);\n\n // Format XLS\n var oXLS = new XLS({\n srsName : options.srs,\n maximumResponses : options.maximumResponses\n });\n oXLS.namespace = true;\n oXLS.setService(oLUS);\n\n // request brute !\n request = oXLS.build();\n\n // en mode GET, la requête est encodée\n // et le param. 'qxml' est ajouté\n if (options.httpMethod === \"GET\") {\n var myRequest = \"qxml=\" +\n encodeURIComponent(request)\n .replace(/-/g, \"%2D\")\n .replace(/_/g, \"%5F\")\n .replace(/\\./g, \"%2E\")\n .replace(/!/g, \"%21\")\n .replace(/~/g, \"%7E\")\n .replace(/\\*/g, \"%2A\")\n .replace(/'/g, \"%27\")\n .replace(/\\(/g, \"%28\")\n .replace(/\\)/g, \"%29\");\n request = myRequest;\n }\n\n logger.trace(request);\n\n return request;\n }\n};\n\nexport default DirectGeocodeRequestFactory;\n" - }, - { - "id": 65, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/RequestHeader.js", - "name": "./src/Formats/XLS/RequestHeader.js", - "index": 51, - "index2": 45, - "size": 1927, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS.js", - "issuerId": 11, - "issuerName": "./src/Formats/XLS.js", - "profile": { - "factory": 742, - "building": 125, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 11, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS.js", - "module": "./src/Formats/XLS.js", - "moduleName": "./src/Formats/XLS.js", - "type": "harmony import", - "userRequest": "./XLS/RequestHeader", - "loc": "2:0-48" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 6, - "source": "import Logger from \"../../Utils/LoggerByDefault\";\n\n/**\n * @classdesc\n *\n * Entête de la requête XSL\n *\n * @example\n * // header XSL\n * header = new RequestHeader ();\n * header.srsName = \"epsg:4326\";\n * header.toString();\n * // out ->\n * // \n *\n * @constructor\n * @alias Gp.Formats.XLS.RequestHeader\n * @param {Object} options - options\n * @param {Object} options.srsName - projection\n * @param {Function} options.onsuccess - function callback success (TODO)\n * @param {Function} options.onerror - function callback error (TODO)\n *\n * @private\n */\nfunction RequestHeader (options) {\n this.logger = Logger.getLogger();\n this.logger.trace(\"[Constructeur RequestHeader ()]\");\n\n if (!(this instanceof RequestHeader)) {\n throw new TypeError(\"RequestHeader constructor cannot be called as a function.\");\n }\n\n // options par defaut\n this.options = options || {\n srsName : \"EPSG:4326\"\n };\n\n // et on ajoute les options en paramètre aux options par défaut\n for (var opt in options) {\n if (options.hasOwnProperty(opt)) {\n this.options[opt] = options[opt];\n }\n }\n}\n\nRequestHeader.prototype = {\n\n /**\n * @lends module:RequestHeader#\n */\n\n /**\n * request (out)\n * @type {String}\n */\n requestString : null,\n\n /**\n * Template de la requête.\n * substitution des valeurs suivantes :\n * __SRSNAME__\n */\n template : \"\",\n\n /**\n * Constructeur (alias)\n */\n constructor : RequestHeader,\n\n /**\n * toString\n * @returns {String} requête\n */\n toString : function () {\n var template = null;\n template = this.template;\n template = template.replace(/__SRSNAME__/g, this.options.srsName);\n this.requestString = template;\n return this.requestString;\n }\n};\n\nexport default RequestHeader;\n" - }, - { - "id": 66, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/Request.js", - "name": "./src/Formats/XLS/Request.js", - "index": 52, - "index2": 46, - "size": 3174, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS.js", - "issuerId": 11, - "issuerName": "./src/Formats/XLS.js", - "profile": { - "factory": 743, - "building": 111, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 11, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS.js", - "module": "./src/Formats/XLS.js", - "moduleName": "./src/Formats/XLS.js", - "type": "harmony import", - "userRequest": "./XLS/Request", - "loc": "3:0-36" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 6, - "source": "/* jshint bitwise: false */\nimport Logger from \"../../Utils/LoggerByDefault\";\n\n/**\n * @classdesc\n *\n * Requête XLS\n *\n * @example\n * // request XSL\n * request = new Request ();\n * request.maximumResponses = 26;\n * request.methodName = \"GeocodeRequest\";\n * request.version = \"1.2\";\n * request.toString();\n * // out ->\n * // \n * // \n * // \n *\n * @constructor\n * @alias Gp.Formats.XLS.Request\n * @param {Object} options - options\n * @param {Object} options.maximumResponses - 25\n * @param {String} options.methodName - nom de l'objet LUS, \"GeocodeRequest\" | \"ReverseGeocodeRequest\"\n * @param {String} options.version - '1.2'\n * @param {Function} options.onsuccess - function callback success (TODO)\n * @param {Function} options.onerror - function callback error (TODO)\n *\n * @private\n */\nfunction Request (options) {\n this.logger = Logger.getLogger();\n this.logger.trace(\"[Constructeur Request ()]\");\n\n if (!(this instanceof Request)) {\n throw new TypeError(\"Request constructor cannot be called as a function.\");\n }\n\n // options par defaut\n this.options = options || {\n maximumResponses : 25,\n methodName : null,\n version : \"1.2\"\n };\n\n // et on ajoute les options en paramètre aux options par défaut\n for (var opt in options) {\n if (options.hasOwnProperty(opt)) {\n this.options[opt] = options[opt];\n }\n }\n}\n\nRequest.prototype = {\n\n /**\n * @lends module:Request#\n */\n\n /**\n * request (out)\n * @type {String}\n */\n requestString : null,\n\n /**\n * Template de la requête.\n * substitution des valeurs suivantes :\n * __MAXRESPONSES__, __METHODNAME__, __UUID__, __VERSION__\n * __REQUESTSERVICE__\n */\n template : \"\" +\n \"\" +\n \"\",\n\n /**\n * Constructeur (alias)\n */\n constructor : Request,\n\n /**\n * an rfc4122 version 4 compliant guid\n * @returns {String} guid\n */\n guid : function () {\n // INFO\n // cf. http://byronsalau.com/blog/how-to-create-a-guid-uuid-in-javascript/\n return \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g, function (c) {\n var r = Math.random() * 16 | 0;\n var v = c === \"x\" ? r : (r & 0x3 | 0x8);\n return v.toString(16);\n });\n },\n\n /**\n * toString\n * @returns {String} requête\n */\n toString : function () {\n var template = null;\n template = this.template;\n template = template.replace(/__MAXRESPONSES__/g, this.options.maximumResponses);\n template = template.replace(/__METHODNAME__/g, this.options.methodName);\n template = template.replace(/__UUID__/g, this.guid());\n template = template.replace(/__VERSION__/g, this.options.version);\n\n this.requestString = template;\n return this.requestString;\n }\n};\n\nexport default Request;\n" - }, - { - "id": 67, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService/GeocodeRequest.js", - "name": "./src/Formats/XLS/LocationUtilityService/GeocodeRequest.js", - "index": 55, - "index2": 51, - "size": 7049, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService.js", - "issuerId": 38, - "issuerName": "./src/Formats/XLS/LocationUtilityService.js", - "profile": { - "factory": 713, - "building": 151, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 38, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService.js", - "module": "./src/Formats/XLS/LocationUtilityService.js", - "moduleName": "./src/Formats/XLS/LocationUtilityService.js", - "type": "harmony import", - "userRequest": "./LocationUtilityService/GeocodeRequest", - "loc": "3:0-69" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 6, - "source": "import Logger from \"../../../Utils/LoggerByDefault\";\nimport Address from \"./model/Address\";\nimport GeocodeFilterExtension from \"./GeocodeFilterExtension\";\n\n/**\n * @classdesc\n * Requête de geocodage direct\n *\n * ```\n * XSD\n * Geocodage direct (balise xsd) :\n * element ref=\"RequestHeader\" [ (attribute name=\"clientName\" attribute name=\"clientPassword\" attribute name=\"sessionID\" attribute name=\"srsName\" attribute name=\"MSID\") ]\n * element name=\"Request\" attribute name=\"methodName\" attribute name=\"version\" attribute name=\"requestID\" [ attribute name=\"maximumResponses\" ]\n * element name=\"GeocodeRequest\" attribute name=\"returnFreeForm\"\n * element ref=\"xls:Address\"\n * ```\n *\n * @example\n * // creation de l'objet Geocode an ajoutant un objet Address\n * req = new GeocodeRequest ();\n * req.returnFreeForm = true; // TODO !\n * req.addAddress (new Address ({\n * location : \"saint mandé\",\n * type : ['PositionOfInterest'],\n * filter : {\n * (...)\n * }\n * }));\n * req.toString();\n * // out ->\n * // \n * //
\n * // saint mandé\n * //
\n * //
\n *\n * // creation de l'objet Geocode avec les options uniquement\n * req = new GeocodeRequest ({\n * location : \"saint mandé\",\n * returnFreeForm : true,\n * filterOptions : {\n * type : ['PositionOfInterest'],\n * (...)\n * }\n * });\n * req.toString();\n * // out ->\n * // \n * //
\n * // saint mandé\n * //
\n * //
\n * @constructor\n *\n * @alias Gp.Formats.XLS.LocationUtilityService.GeocodeRequest\n * @param {Object} options - options\n * @param {Object} options.location - location\n * @param {String} options.returnFreeForm - returnFreeForm\n * @param {String} options.filterOptions - filtres\n * @param {Function} options.onsuccess - function callback success (TODO)\n * @param {Function} options.onerror - function callback error (TODO)\n *\n * @private\n */\nfunction GeocodeRequest (options) {\n this.logger = Logger.getLogger();\n this.logger.trace(\"[Constructeur GeocodeRequest ()]\");\n\n if (!(this instanceof GeocodeRequest)) {\n throw new TypeError(\"GeocodeRequest constructor cannot be called as a function.\");\n }\n\n // options par defaut\n this.options = options || {};\n\n // et on ajoute les options en paramètre aux options par défaut\n for (var opt in options) {\n if (options.hasOwnProperty(opt)) {\n this.options[opt] = options[opt];\n }\n }\n\n // TODO\n // gestion de l'option 'returnFreeForm' si elle n'est pas renseignée dans les options !\n\n /**\n * Nom de la classe (heritage)\n */\n this.CLASSNAME = \"GeocodeRequest\";\n}\n\nGeocodeRequest.prototype = {\n\n /**\n * @lends module:GeocodeRequest#\n */\n\n /**\n * request (out)\n * @type {String}\n */\n strRequest : null,\n\n /**\n * Addresse\n * @type {Address}\n */\n oAddress : null,\n\n /**\n * Filter\n * @type {GeocodeFilterExtension}\n */\n oFilter : null,\n\n /**\n * Template de la requête.\n * substitution des valeurs suivantes :\n * __ADDRESS__, __RETURNFREEFORM__\n */\n template : \"\" +\n \"__ADDRESS__\" +\n \"\",\n\n /**\n * Ajout d'un objet de type Adresse\n *\n * @param {Object} oAddress - Adresse\n */\n addAddress : function (oAddress) {\n if (oAddress instanceof Address) {\n this.oAddress = oAddress;\n }\n },\n\n /**\n * Ajout d'un objet de type GeocodeFilterExtension\n *\n * @param {Object} oFilter - GeocodeFilterExtension\n */\n addFilter : function (oFilter) {\n // FIXME gestion des filtres à partir des tables de geocodages\n if (oFilter instanceof GeocodeFilterExtension) {\n this.oFilter = oFilter;\n }\n },\n\n /**\n * Constructeur (alias)\n */\n constructor : GeocodeRequest,\n\n /**\n * toString\n *\n * @returns {String} requête\n */\n toString : function () {\n var template = \"\";\n template = this.template;\n\n // soit on a déjà un objet Address instancié,\n // sinon, on le fabrique via les options\n if (!this.oAddress) {\n var settings = {};\n settings.location = this.options.location;\n settings.type = this.options.filterOptions.type || [\"StreetAddress\"];\n settings.filter = this.options.filterOptions;\n delete settings.filter.type; // on ne met pas le 'type' dans les filtres...\n\n // gestion des filtres\n if (this.oFilter) {\n // on reconstruit les filtres\n settings.filter = {};\n\n // on determine la liste des filtres possibles\n // pour chaque table de geocodage en param\n for (var idx in settings.type) {\n var filter = settings.type[idx];\n var oFilter = this.oFilter.getFilter(filter);\n\n if (!oFilter) {\n this.logger.warn(\"Le filtre '\" + filter + \"' n'existe pas !?\");\n continue;\n }\n\n var mFilter = this.options.filterOptions;\n\n // correspondances des attributs de filtres possibles avec ceux qui sont en options\n var attributs = oFilter.attributesList;\n for (var idxe = 0; idxe < attributs.length; idxe++) {\n var key = attributs[idxe];\n if (mFilter[key]) {\n var matchingKey = oFilter.serviceAttributes[idxe];\n oFilter.placeAttributes[matchingKey] = mFilter[key];\n this.logger.trace(\"Selection du filtre '\" + key + \"' sur le type '\" + filter + \"'.\");\n }\n }\n\n // ajout des valeurs des filtres\n var places = oFilter.placeAttributes;\n for (var kplace in places) {\n if (places.hasOwnProperty(kplace)) {\n settings.filter[kplace] = places[kplace];\n }\n }\n }\n }\n\n this.oAddress = new Address(settings);\n if (!this.oAddress) {\n throw new Error(\"La construction de l'adresse n'est pas correctement definie !?\");\n }\n }\n\n // FIXME gestion des filtres pour un objet Address déjà instancié ?\n\n template = template.replace(/__ADDRESS__/g, this.oAddress.toString());\n template = template.replace(/__RETURNFREEFORM__/g, (this.options.returnFreeForm) ? \"true\" : \"false\");\n\n this.strRequest = template;\n return this.strRequest;\n }\n};\n\nexport default GeocodeRequest;\n" - }, - { - "id": 68, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService/model/Address.js", - "name": "./src/Formats/XLS/LocationUtilityService/model/Address.js", - "index": 56, - "index2": 49, - "size": 9314, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService/GeocodeRequest.js", - "issuerId": 67, - "issuerName": "./src/Formats/XLS/LocationUtilityService/GeocodeRequest.js", - "profile": { - "factory": 122, - "building": 73, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 67, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService/GeocodeRequest.js", - "module": "./src/Formats/XLS/LocationUtilityService/GeocodeRequest.js", - "moduleName": "./src/Formats/XLS/LocationUtilityService/GeocodeRequest.js", - "type": "harmony import", - "userRequest": "./model/Address", - "loc": "2:0-38" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 7, - "source": "\nimport Logger from \"../../../../Utils/LoggerByDefault\";\n\n/**\n * @classdesc\n *\n * Location type \"Address\".\n *\n * Modèles de classes :\n * ------------------\n * ```\n *\n * Address\n * (est composé de)\n * ______ | _________ _________________\n * / | \\ \\\n * Place (StreetAddress ou FreeFormAddress) PostalCode\n * (*) _|_\n * / \\\n * Street Building\n * ```\n * ```\n * XSD\n * Address (balise xsd) :\n * ex.
1 r de paris saint denis
\n * attribute name=\"countryCode\"\n * element name=\"freeFormAddress\"\n * element ref=\"xls:Place\"\n * element ref=\"gml:Envelope\"\n * ou\n * ex.
1 rue MarconiMetz57000
\n * attribute name=\"countryCode\"\n * element ref=\"xls:StreetAddress\"\n * element ref=\"xls:PostalCode\"\n * element ref=\"xls:Place\"\n * element ref=\"gml:Envelope\"\n * ```\n *\n * @example\n * // simple\n * adr = new Address ({\n * location : \"2 av pasteur, Saint-Mandée\",\n * type : [\"StreetAddress\"],\n * filter : {}\n * });\n * adr.toString();\n * // -> out\n * //
\n * // 2 av pasteur, Saint-Mandée\n * //
\n *\n * // avec filtre\n * adr = new Address ({\n * location : {\n * number : 2,\n * street : \"av pasteur\",\n * city : \"Saint-Mandée\", // FIXME filter Place \"commune\" ou \"municipality\" ?\n * postalCode : \"94166\" // FIXME filter Place ou balise PostalCode ?\n * },\n * type : [\"StreetAddress\"],\n * filter : {\n * territory : \"FR\",\n * department : \"94\"\n * }\n * });\n * adr.toString();\n * // -> out\n * //
\n * // \n * // \n * // 2 av pasteur\n * // \n * // Saint-Mandée\n * // 94\n * // FR\n * // 94166\n * //
\n *\n * // avec bbox\n * adr = new Address ({\n * location : \"2 av pasteur, Saint-Mandée\",\n * type : [\"StreetAddress\"],\n * filter : {\n * bbox : {left:1, right:2, top:2, bottom:0}\n * }\n * });\n * adr.toString();\n * // -> out\n * //
\n * // 2 av pasteur, Saint-Mandée\n * // \n * // 1 0\n * // 2 2\n * // \n * //
\n *\n * @constructor\n * @alias Gp.Formats.XLS.LocationUtilityService.Address\n * @param {Object} options - options\n * @param {Object} options.location - location\n * @param {String} options.type - type\n * @param {String} options.filter - filtres\n * @param {String} options.filter.* - Filtré en fonction des tables de geocodage interrogées\n *\n * @private\n */\nfunction Address (options) {\n this.logger = Logger.getLogger(\"Address\");\n this.logger.trace(\"[Constructeur Address ()]\");\n\n if (!(this instanceof Address)) {\n throw new TypeError(\"Address constructor cannot be called as a function.\");\n }\n\n // param par defaut\n this.options = options || {\n location : {},\n type : [\"StreetAddress\"],\n filter : {}\n };\n\n // param obligatoire\n if (!options.location) {\n throw new Error(\"l'option 'location' n'est pas renseignée !\");\n }\n\n // et on ajoute les options en paramètre aux options par défaut\n for (var opt in options) {\n if (options.hasOwnProperty(opt)) {\n this.options[opt] = options[opt];\n }\n }\n}\n\n/**\n * @lends module:Address#\n */\nAddress.prototype = {\n\n /**\n * Constructeur (alias)\n */\n constructor : Address,\n\n /**\n * request (out)\n * @type {String}\n */\n requestString : null,\n\n /**\n * Template de la requête.\n *\n * substitution des valeurs suivantes :\n * - address : __COUNTRYCODE__, __LOCATION__, __PLACE__, __POSTALCODE__, __ENVELOPE__\n * - freeFormAddress : __FREEFORMADDRESSVALUE__\n * - streetAddress : __STREET__, __BUILDING__\n * - street : __STREETVALUE__\n * - building : __BUILDINGVALUE__\n * - place : __PLACEATYPE__, __PLACEVALUE__\n * - postalCode : __POSTALCODEVALUE__\n * - gml:envelope : __LEFT__ __BOTTOM__ __RIGHT__ __TOP__\n *\n * @todo gestion de l\"indentation\n */\n template : {\n address : \"
\" +\n \"__LOCATION__\" +\n \"__PLACE__\" +\n \"__POSTALCODE__\" +\n \"__ENVELOPE__\" +\n \"
\",\n location : {\n freeFormAddress : \"__FREEFORMADDRESSVALUE__\",\n streetAddress : {\n container : \"\" +\n \"__STREET__\" +\n \"__BUILDING__\" +\n \"\",\n building : \"\",\n street : \"__STREETVALUE__\"\n }\n },\n place : \"__PLACEVALUE__\",\n postalCode : \"__POSTALCODEVALUE__\",\n envelope : \"\" +\n \"__LEFT__ __BOTTOM__\" +\n \"__RIGHT__ __TOP__\" +\n \"\"\n }\n\n};\n\n/**\n * toString\n *\n * @returns {String} requête\n */\nAddress.prototype.toString = function () {\n var template = null;\n template = this.template.address;\n template = template.replace(/__COUNTRYCODE__/g, this.options.type);\n\n // on a une adresse structurée ou libre ?\n if (typeof this.options.location === \"string\") {\n // balise freeFormeAddress\n var tmplFreeFormAddress = this.template.location.freeFormAddress;\n tmplFreeFormAddress = tmplFreeFormAddress.replace(/__FREEFORMADDRESSVALUE__/g, this.options.location);\n template = template.replace(/__LOCATION__/g, tmplFreeFormAddress);\n } else {\n // balises Street et Building\n var tmplBuilding = \"\";\n var tmplStreet = \"\";\n\n if (this.options.location.number) {\n tmplBuilding = this.template.location.streetAddress.building;\n tmplBuilding = tmplBuilding.replace(/__BUILDINGVALUE__/g, this.options.location.number);\n }\n\n if (this.options.location.street) {\n tmplStreet = this.template.location.streetAddress.street;\n tmplStreet = tmplStreet.replace(/__STREETVALUE__/g, this.options.location.street);\n }\n\n // balise streetAddress\n var tmplStreetAddress = this.template.location.streetAddress.container;\n tmplStreetAddress = tmplStreetAddress.replace(/__STREET__/g, tmplStreet);\n tmplStreetAddress = tmplStreetAddress.replace(/__BUILDING__/g, tmplBuilding);\n template = template.replace(/__LOCATION__/g, tmplStreetAddress);\n }\n\n // a t on un filtre de type PostalCode ?\n var tmplPostalCode = \"\";\n if (this.options.location.postalCode) {\n tmplPostalCode = this.template.postalCode;\n tmplPostalCode = tmplPostalCode.replace(/__POSTALCODEVALUE__/g, this.options.location.postalCode);\n }\n\n // a t on un filtre de type GML::Envelope ?\n var tmplEnvelope = \"\";\n if (this.options.filter) {\n var bbox = this.options.filter.bbox;\n if (bbox) {\n tmplEnvelope = this.template.envelope;\n tmplEnvelope = tmplEnvelope.replace(/__LEFT__/g, bbox.left);\n tmplEnvelope = tmplEnvelope.replace(/__BOTTOM__/g, bbox.bottom);\n tmplEnvelope = tmplEnvelope.replace(/__RIGHT__/g, bbox.right);\n tmplEnvelope = tmplEnvelope.replace(/__TOP__/g, bbox.top);\n }\n }\n\n // liste des filtres Place\n var Places = [];\n\n // a t on des filtres de type Place ?\n var tmplPlace = \"\";\n if (this.options.filter) {\n var filters = this.options.filter;\n for (var filter in filters) {\n if (filter === \"bbox\") {\n continue;\n }\n // FIXME gestion des filtres spécifiques IGN ?\n tmplPlace = this.template.place;\n tmplPlace = tmplPlace.replace(/__PLACETYPE__/g, filter);\n tmplPlace = tmplPlace.replace(/__PLACEVALUE__/g, filters[filter]);\n Places.push(tmplPlace);\n }\n }\n\n // a t on un filtre de type Place dans location ?\n var tmplPlaceCity = \"\";\n if (this.options.location.city) {\n tmplPlaceCity = this.template.place;\n tmplPlaceCity = tmplPlaceCity.replace(/__PLACETYPE__/g, \"Municipality\");\n tmplPlaceCity = tmplPlaceCity.replace(/__PLACEVALUE__/g, this.options.location.city);\n Places.push(tmplPlaceCity);\n }\n\n template = template.replace(/__POSTALCODE__/g, tmplPostalCode);\n template = template.replace(/__PLACE__/g, Places.join(\"\\n\"));\n template = template.replace(/__ENVELOPE__/g, tmplEnvelope);\n\n this.requestString = template;\n return this.requestString;\n};\n\nexport default Address;\n" - }, - { - "id": 69, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService/ReverseGeocodeRequest.js", - "name": "./src/Formats/XLS/LocationUtilityService/ReverseGeocodeRequest.js", - "index": 58, - "index2": 54, - "size": 5333, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService.js", - "issuerId": 38, - "issuerName": "./src/Formats/XLS/LocationUtilityService.js", - "profile": { - "factory": 713, - "building": 174, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 38, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService.js", - "module": "./src/Formats/XLS/LocationUtilityService.js", - "moduleName": "./src/Formats/XLS/LocationUtilityService.js", - "type": "harmony import", - "userRequest": "./LocationUtilityService/ReverseGeocodeRequest", - "loc": "4:0-83" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 6, - "source": "\nimport Logger from \"../../../Utils/LoggerByDefault\";\nimport Position from \"./model/Position\";\nimport Preference from \"./model/Preference\";\n\n/**\n * @classdesc\n *\n * Requête de geocodage inverse\n *\n * XSD\n * ```\n * Geocodage inverse (balise xsd) :\n * element ref=\"RequestHeader\" [ (attribute name=\"clientName\" attribute name=\"clientPassword\" attribute name=\"sessionID\" attribute name=\"srsName\" attribute name=\"MSID\") ]\n * element name=\"Request\" attribute name=\"methodName\" attribute name=\"version\" attribute name=\"requestID\" [ attribute name=\"maximumResponses\" ]\n * element name=\"ReverseGeocodeRequest\"\n * element ref=\"xls:Position\"\n * element name=\"ReverseGeocodePreference\" (enumeration)\n * ```\n *\n * @example\n * // creation de l\"objet ReverseGeocode\n * req = new ReverseGeocodeRequest ();\n * req.addPosition (new Position (position:{x: , y: }));\n * req.addPreference ([\"StreetAddress\"]);\n * req.toString();\n * // out ->\n * // \n * // \n * // \n * // 50.347775 3.205098\n * // \n * // \n * // StreetAddress\n * // \n * @constructor\n * @alias Gp.Formats.XLS.ReverseGeocodeRequest\n * @param {Object} options - options\n * @param {Object} options.position - position\n * @param {String} options.returnFreeForm - returnFreeForm\n * @param {String} options.filterOptions - filtres\n * @param {Function} options.onsuccess - function callback success (TODO)\n * @param {Function} options.onerror - function callback error (TODO)\n *\n * @private\n */\nfunction ReverseGeocodeRequest (options) {\n this.logger = Logger.getLogger();\n this.logger.trace(\"[Constructeur ReverseGeocodeRequest ()]\");\n\n if (!(this instanceof ReverseGeocodeRequest)) {\n throw new TypeError(\"ReverseGeocodeRequest constructor cannot be called as a function.\");\n }\n\n // options par defaut\n this.options = options || {};\n\n // et on ajoute les options en paramètre aux options par défaut\n for (var opt in options) {\n if (options.hasOwnProperty(opt)) {\n this.options[opt] = options[opt];\n }\n }\n\n /**\n * Nom de la classe (heritage)\n */\n this.CLASSNAME = \"ReverseGeocodeRequest\";\n}\n\nReverseGeocodeRequest.prototype = {\n\n /**\n * @lends module:ReverseGeocodeRequest#\n */\n\n /**\n * request (out)\n * @type {String}\n */\n strRequest : null,\n\n /**\n * Position\n * @type {Position}\n */\n oPosition : null,\n\n /**\n * Preference\n * @type {Preference}\n */\n oPreference : null,\n\n /**\n * Constructeur (alias)\n */\n constructor : ReverseGeocodeRequest,\n\n /**\n * Template de la requête.\n * substitution des valeurs suivantes :\n * __POSITION__, __PREFERENCE__, __RETURNFREEFORM__\n */\n template : \"\" +\n \"__POSITION__\" +\n \"__PREFERENCE__\" +\n \"\",\n\n /**\n * Ajout d\"un objet de type Position\n *\n * @param {Object} oPosition - Position\n */\n addPosition : function (oPosition) {\n if (oPosition instanceof Position) {\n this.oPosition = oPosition;\n }\n },\n\n /**\n * Ajout d\"une liste de table de référence LUS :\n * [StreetAddress, PointOfInterest, CadastralParcel, Administrativ]\n *\n * @param {Object} oPreference - Preference\n */\n addPreferences : function (oPreference) {\n if (oPreference instanceof Preference) {\n this.oPreference = oPreference;\n }\n },\n\n /**\n * toString\n * @returns {String} requête\n */\n toString : function () {\n var template = \"\";\n template = this.template;\n\n // si on a déjà un objet Preference instancié,\n // sinon, on le fabrique via les options\n if (!this.oPreference) {\n this.oPreference = new Preference(this.options.filterOptions.type || [\"StreetAddress\"]);\n if (!this.oPreference) {\n throw new Error(\"Les preferences ne sont pas definies !?\");\n }\n }\n template = template.replace(/__PREFERENCE__/g, this.oPreference.toString());\n\n // si on a déjà un objet Position instancié,\n // sinon, on le fabrique via les options\n if (!this.oPosition) {\n var settings = {\n position : this.options.position,\n filter : {}\n };\n\n // FIXME gestion des filtres ?\n if (this.options.filterOptions) {\n settings.filter = this.options.filterOptions;\n delete settings.filter.type; // pas besoin ?\n }\n this.oPosition = new Position(settings);\n if (!this.oPosition) {\n throw new Error(\"La position et ses filtres ne sont pas definis !?\");\n }\n }\n template = template.replace(/__POSITION__/g, this.oPosition.toString());\n template = template.replace(/__RETURNFREEFORM__/g, (this.options.returnFreeForm) ? \"true\" : \"false\");\n\n this.strRequest = template;\n return this.strRequest;\n }\n};\n\nexport default ReverseGeocodeRequest;\n" - }, - { - "id": 70, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService/model/Position.js", - "name": "./src/Formats/XLS/LocationUtilityService/model/Position.js", - "index": 59, - "index2": 52, - "size": 6776, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService/ReverseGeocodeRequest.js", - "issuerId": 69, - "issuerName": "./src/Formats/XLS/LocationUtilityService/ReverseGeocodeRequest.js", - "profile": { - "factory": 99, - "building": 126, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 69, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService/ReverseGeocodeRequest.js", - "module": "./src/Formats/XLS/LocationUtilityService/ReverseGeocodeRequest.js", - "moduleName": "./src/Formats/XLS/LocationUtilityService/ReverseGeocodeRequest.js", - "type": "harmony import", - "userRequest": "./model/Position", - "loc": "3:0-40" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 7, - "source": "import Logger from \"../../../../Utils/LoggerByDefault\";\n\n/**\n * @classdesc\n * Location de type Position\n *\n * ```\n * XSD\n * Position (balise xsd) :\n * ex. 50.347775 3.205098\n * ex. 48.85978570614691 2.29135727611288781000\n * (au choix)\n * element ref=\"gml:Point\"\n * element ref=\"gml:CircleByCenterPoint\"\n * element ref=\"gml:Polygon\"\n * element ref=\"gml:MultiPolygon\"\n * ```\n *\n * FIXME les autres elements ne sont pas implémentés (QoP, Speed, Direction, Time, ...) ?\n *\n * ```\n * template : \"\n * __GMLPOINT__\n * __GMLFILTER__\n * \"\n * ```\n * ```\n * GML : {\n * pos : \"__X__ __Y__\",\n * point : \"__POS__\",\n * circle : \"__POS____RADIUS__\",\n * // not yet implemented !\n * polygon : \"\",\n * multipolygon : \"\"\n * }\n * ```\n *\n * @constructor\n * @alias Gp.Formats.XLS.LocationUtilityService.Position\n * @param {Object} options - options données en entrée\n * @param {Object} options.position - x/y\n * @param {Object} options.filter - filtre\n * @param {Object} options.filter.circle - un cercle\n * @param {Object} options.filter.polygon - un polygone\n *\n * @private\n */\nfunction Position (options) {\n this.logger = Logger.getLogger(\"Position\");\n this.logger.trace(\"[Constructeur Position ()]\");\n\n if (!(this instanceof Position)) {\n throw new TypeError(\"Position constructor cannot be called as a function.\");\n }\n\n // param par defaut\n this.options = options || {};\n\n // param obligatoire\n if (!options.position) {\n throw new Error(\"l'option 'position' n'est pas renseignée !\");\n }\n\n // et on ajoute les options en paramètre aux options par défaut\n for (var opt in options) {\n if (options.hasOwnProperty(opt)) {\n this.options[opt] = options[opt];\n }\n }\n}\n\n/**\n * @lends module:Position#\n */\nPosition.prototype = {\n\n /**\n * Constructeur (alias)\n */\n constructor : Position,\n\n /**\n * request (out)\n * @type {String}\n */\n requestString : null,\n\n /**\n * Template de la requête.\n *\n * substitution des valeurs suivantes :\n * __GMLPOINT__ __GMLFILTER__\n * __X__ __Y__ __RADIUS__\n * __XY__\n * @todo indentation XML\n * @todo implementation classe GML\n */\n template : {\n position : \"\" +\n \"__GMLPOINT__\" +\n \"__GMLFILTER__\" +\n \"\",\n gml : {\n point : \"__X__ __Y__\",\n pos : null,\n filter : {\n bbox : \"\" +\n \"__LEFT__ __BOTTOM__\" +\n \"__RIGHT__ __TOP__\" +\n \"\",\n circle : \"__X__ __Y____RADIUS__\",\n polygon : \"__XY__\",\n multipolygon : null\n }\n }\n }\n};\n\n/**\n * toString\n *\n * @returns {String} requête\n */\nPosition.prototype.toString = function () {\n var template = this.template.position;\n\n var tmplGmlPoint = this.template.gml.point;\n tmplGmlPoint = tmplGmlPoint.replace(/__X__/g, this.options.position.x);\n tmplGmlPoint = tmplGmlPoint.replace(/__Y__/g, this.options.position.y);\n\n var tmplGmlFilter = \"\";\n if (this.options.filter) {\n var filter = this.options.filter;\n\n for (var name in filter) {\n switch (name) {\n case \"circle\":\n tmplGmlFilter = this.template.gml.filter[name];\n tmplGmlFilter = tmplGmlFilter.replace(/__X__/g, filter[name].x);\n tmplGmlFilter = tmplGmlFilter.replace(/__Y__/g, filter[name].y);\n tmplGmlFilter = tmplGmlFilter.replace(/__RADIUS__/g, filter[name].radius);\n break;\n case \"bbox\":\n tmplGmlFilter = this.template.gml.filter[name];\n tmplGmlFilter = tmplGmlFilter.replace(/__LEFT__/g, filter[name].left);\n tmplGmlFilter = tmplGmlFilter.replace(/__BOTTOM__/g, filter[name].bottom);\n tmplGmlFilter = tmplGmlFilter.replace(/__RIGHT__/g, filter[name].right);\n tmplGmlFilter = tmplGmlFilter.replace(/__TOP__/g, filter[name].top);\n break;\n case \"polygon\":\n // FIXME implementation simple du polygone !\n // aucun test de fermeture du polygone, ni de gestion des trous !\n tmplGmlFilter = this.template.gml.filter[name];\n var strPoints = \"\";\n var lstPoints = filter[name];\n for (var i = 0; i < lstPoints.length; i++) {\n var coord = lstPoints[i];\n if (Array.isArray(coord)) {\n this.logger.error(\"Holes are not implemented !\");\n break;\n }\n if ((coord.x && coord.y) || (coord.x === 0 || coord.y === 0)) {\n strPoints += coord.x + \" \" + coord.y;\n }\n if (lstPoints.length !== i + 1) {\n strPoints += \" \";\n }\n }\n tmplGmlFilter = tmplGmlFilter.replace(/__XY__/g, strPoints);\n break;\n case \"multipolygon\":\n this.logger.warn(\"Filter '\" + name + \"' is not yet implemented !\");\n break;\n default:\n this.logger.error(\"This filter '\" + name + \"' is not useful !\");\n }\n }\n }\n\n template = template.replace(/__GMLPOINT__/g, tmplGmlPoint);\n template = template.replace(/__GMLFILTER__/g, tmplGmlFilter);\n\n this.requestString = template;\n return this.requestString;\n};\n\nexport default Position;\n" - }, - { - "id": 71, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService/model/Preference.js", - "name": "./src/Formats/XLS/LocationUtilityService/model/Preference.js", - "index": 60, - "index2": 53, - "size": 1686, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService/ReverseGeocodeRequest.js", - "issuerId": 69, - "issuerName": "./src/Formats/XLS/LocationUtilityService/ReverseGeocodeRequest.js", - "profile": { - "factory": 99, - "building": 139, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 69, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService/ReverseGeocodeRequest.js", - "module": "./src/Formats/XLS/LocationUtilityService/ReverseGeocodeRequest.js", - "moduleName": "./src/Formats/XLS/LocationUtilityService/ReverseGeocodeRequest.js", - "type": "harmony import", - "userRequest": "./model/Preference", - "loc": "4:0-44" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 7, - "source": "import Logger from \"../../../../Utils/LoggerByDefault\";\n\n/**\n * @classdesc\n *\n * Preference (Reverse)\n *\n * FIXME liste des types de tables de geocodage\n *\n * ```\n * template : \"__TYPE__\"\n * ```\n *\n * @constructor\n * @alias Gp.Formats.XLS.LocationUtilityService.Preference\n * @param {String} type - type de table de geocodage\n *\n * @private\n *\n */\n\nfunction Preference (type) {\n this.logger = Logger.getLogger(\"Preference\");\n this.logger.trace(\"[Constructeur Preference ()]\");\n\n if (!(this instanceof Preference)) {\n throw new TypeError(\"Preference constructor cannot be called as a function.\");\n }\n\n /**\n * type de table de geocodage\n * @type {Array.}\n */\n this.type = type;\n}\n\n/**\n * @lends module:Preference#\n */\nPreference.prototype = {\n\n /**\n * Constructeur (alias)\n */\n constructor : Preference,\n\n /**\n * request (out)\n * @type {String}\n */\n requestString : null,\n\n /**\n * Template de la requête.\n *\n * substitution des valeurs suivantes :\n * __TYPE__\n *\n */\n template : \"__TYPE__\"\n};\n\n/**\n * toString\n *\n * @returns {String} requête\n */\nPreference.prototype.toString = function () {\n var Preferences = [];\n var tmplPreference = \"\";\n for (var idx = 0; idx < this.type.length; idx++) {\n tmplPreference = this.template;\n tmplPreference = tmplPreference.replace(/__TYPE__/g, this.type[idx]);\n Preferences.push(tmplPreference);\n }\n\n this.strRequest = Preferences.join(\"\\n\");\n return this.strRequest;\n};\n\nexport default Preference;\n" - }, - { - "id": 72, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/model/StreetAddress.js", - "name": "./src/Services/Geocode/Request/model/StreetAddress.js", - "index": 61, - "index2": 57, - "size": 2024, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "issuerId": 64, - "issuerName": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "profile": { - "factory": 60, - "building": 926 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 64, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "module": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "moduleName": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "type": "harmony import", - "userRequest": "../Request/model/StreetAddress", - "loc": "13:0-59" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "\nimport GeocodeLocation from \"../GeocodeLocation\";\n\n/**\n * @classdesc\n * Format des attributs d'un résultat de géocodage de type StreetAddress.\n *\n * @constructor\n * @alias Gp.Services.Geocode.Request.StreetAddress\n * @private\n */\nfunction StreetAddress () {\n if (!(this instanceof StreetAddress)) {\n throw new TypeError(\"StreetAddress constructor cannot be called as a function.\");\n }\n\n // INFO\n // appel du constructeur de la classe mère\n // avec passage de param.\n GeocodeLocation.apply(this, arguments);\n\n /**\n * Nom de la classe (heritage)\n * @type {String}\n */\n this.CLASSNAME = \"StreetAddress\";\n\n /**\n * Liste des attributs possibles pour une GeocodeLocation de type StreetAddress\n * - **bbox** : Emprise de l'adresse dans le système de coordonnées demandé {left, right, top, bottom}. *{Object}*\n * - **ID** : Identifiant BD ADRESSE dans le cas où le résultat est une adresse. *{String}*\n * - **IDTR** : Identifiant \"Route Adresse\" de la voie portant l'adresse dans la base BD ADRESSE. *{String}*\n * - **quality** : Indicateur de qualité du géocodage (pour plus d'infos : http://api.ign.fr/tech-docs-js/fr/developpeur/search.html *{String}*\n * - **territory** : Code du territoire français où se situe l'adresse *{String}*\n * - **commune** : Ville l'adresse. *{String}*\n * - **department** : Département l'adresse. *{String}*\n * - **insee** : Code INSEE de l'adresse. *{Number}*\n * - **municipality** : Municipalité de l'adresse. *{String}*\n */\n\n this.attributesList = [\"bbox\", \"ID\", \"IDTR\", \"quality\", \"territory\", \"commune\", \"department\", \"insee\", \"municipality\"];\n\n this.serviceAttributes = [\"bbox\", \"ID\", \"IDTR\", \"Qualite\", \"Territoire\", \"Commune\", \"Departement\", \"INSEE\", \"Municipality\"];\n}\n\n/**\n * @lends module:StreetAdress#\n */\nStreetAddress.prototype = Object.create(GeocodeLocation.prototype);\n\n/**\n * Constructeur (alias)\n */\nStreetAddress.prototype.constructor = StreetAddress;\n\nexport default StreetAddress;\n" - }, - { - "id": 73, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/model/PositionOfInterest.js", - "name": "./src/Services/Geocode/Request/model/PositionOfInterest.js", - "index": 63, - "index2": 58, - "size": 1866, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "issuerId": 64, - "issuerName": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "profile": { - "factory": 60, - "building": 937, - "dependencies": 58 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 64, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "module": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "moduleName": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "type": "harmony import", - "userRequest": "../Request/model/PositionOfInterest", - "loc": "14:0-69" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "\nimport GeocodeLocation from \"../GeocodeLocation\";\n\n/**\n * @classdesc\n * Format des attributs d'un résultat de géocodage de type PositionOfInterest\n *\n * @constructor\n * @alias Gp.Services.Geocode.Request.PositionOfInterest\n * @private\n */\nfunction PositionOfInterest () {\n if (!(this instanceof PositionOfInterest)) {\n throw new TypeError(\"PositionOfInterest constructor cannot be called as a function.\");\n }\n\n // INFO\n // appel du constructeur de la classe mère\n // avec passage de param.\n GeocodeLocation.apply(this, arguments);\n\n /**\n * Nom de la classe (heritage)\n * @type {String}\n */\n this.CLASSNAME = \"PositionOfInterest\";\n\n /**\n * Liste des attributs possibles pour une GeocodeLocation de type PositionOfInterest\n * - **bbox** : Emprise du toponyme dans le système de coordonnées demandé {left, right, top, bottom} *{Object}*\n * - **importance** : Importance du toponyme *{number}*\n * - **nature** : Nature du toponyme. *{String}*\n * - **territory** : Code du territoire français où se situe le toponyme *{String}*\n * - **commune** : Ville du toponyme. *{String}*\n * - **department** : Département du toponyme. *{String}*\n * - **insee** : Code INSEE de la commune où se situe le toponyme. *{Number}*\n * - **municipality** : Municipalité du toponyme. *{String}*\n */\n\n this.attributesList = [\"bbox\", \"importance\", \"nature\", \"territory\", \"commune\", \"department\", \"insee\", \"municipality\"];\n\n this.serviceAttributes = [\"bbox\", \"Importance\", \"Nature\", \"Territoire\", \"Commune\", \"Departement\", \"INSEE\", \"Municipality\"];\n}\n\n/**\n * @lends module:PositionOfInterest#\n */\nPositionOfInterest.prototype = Object.create(GeocodeLocation.prototype);\n\n/**\n * Constructeur (alias)\n */\nPositionOfInterest.prototype.constructor = PositionOfInterest;\n\nexport default PositionOfInterest;\n" - }, - { - "id": 74, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/model/CadastralParcel.js", - "name": "./src/Services/Geocode/Request/model/CadastralParcel.js", - "index": 64, - "index2": 59, - "size": 2168, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "issuerId": 64, - "issuerName": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "profile": { - "factory": 60, - "building": 945, - "dependencies": 50 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 64, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "module": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "moduleName": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "type": "harmony import", - "userRequest": "../Request/model/CadastralParcel", - "loc": "15:0-63" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "\nimport GeocodeLocation from \"../GeocodeLocation\";\n\n/**\n * @classdesc\n * Format des attributs d'un filtre de géocodage de type CadastralParcel.\n *\n * @constructor\n * @alias Gp.Services.Geocode.Request.CadastralParcel\n * @private\n */\nfunction CadastralParcel () {\n if (!(this instanceof CadastralParcel)) {\n throw new TypeError(\"CadastralParcel constructor cannot be called as a function.\");\n }\n\n // INFO\n // appel du constructeur de la classe mère\n // avec passage de param.\n GeocodeLocation.apply(this, arguments);\n\n /**\n * Nom de la classe (heritage)\n */\n this.CLASSNAME = \"CadastralParcel\";\n\n /**\n * Liste des attributs possibles pour une GeocodeLocation de type CadastralParcel\n * - **absorbedCity** : Code commune absorbée de la parcelle :\n * lorsqu'une parcelle est issue p d'une ancienne commune qui a fusionné avec une autre.\n * Sinon, le code vaut '000'. *{String}*\n * - **sheet** : Feuille de la parcelle (ex 1). *{String}*\n * - **number** : Numéro de la parcelle (ex. 0041) *{String}*\n * - **section** : Section de la parcelle (ex 0D). *{String}*\n * - **commune** : Ville du filtre. *{String}*\n * - **department** : Département du filtre. *{String}*\n * - **insee** : Code INSEE du filtre. *{Number}*\n * - **municipality** : Municipalité du filtre. *{String}*\n * - **origin** : L'origine de l'objet parcellaire renvoyé\n * (correspond à l'attribut \"type\" dans la réponse XML)\n * Pour plus d'informations : http://api.ign.fr/tech-docs-js/fr/developpeur/search.html#Recherche_par_parcelles_cadastrales *{Number}*\n *\n */\n\n this.attributesList = [\"absorbedCity\", \"sheet\", \"number\", \"section\", \"commune\", \"department\", \"insee\", \"municipality\", \"origin\"];\n\n this.serviceAttributes = [\"CommuneAbsorbee\", \"Feuille\", \"Numero\", \"Section\", \"Commune\", \"Departement\", \"INSEE\", \"Municipality\", \"Type\"];\n}\n\n/**\n * @lends module:CadastralParcel#\n */\nCadastralParcel.prototype = Object.create(GeocodeLocation.prototype);\n\n/**\n * Constructeur (alias)\n */\nCadastralParcel.prototype.constructor = CadastralParcel;\n\nexport default CadastralParcel;\n" - }, - { - "id": 75, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/model/Administratif.js", - "name": "./src/Services/Geocode/Request/model/Administratif.js", - "index": 65, - "index2": 60, - "size": 1597, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "issuerId": 64, - "issuerName": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "profile": { - "factory": 61, - "building": 981, - "dependencies": 13 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 64, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "module": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "moduleName": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "type": "harmony import", - "userRequest": "../Request/model/Administratif", - "loc": "16:0-59" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "\nimport GeocodeLocation from \"../GeocodeLocation\";\n\n/**\n * @classdesc\n * Format des attributs d'un filtre de géocodage de type Administratif.\n * @constructor\n * @alias Gp.Services.Geocode.Request.Administratif\n * @private\n */\nfunction Administratif () {\n if (!(this instanceof Administratif)) {\n throw new TypeError(\"Administratif constructor cannot be called as a function.\");\n }\n\n // INFO\n // appel du constructeur de la classe mère\n // avec passage de param.\n GeocodeLocation.apply(this, arguments);\n\n /**\n * Nom de la classe (heritage)\n * @type {String}\n */\n this.CLASSNAME = \"Administratif\";\n\n /**\n * Liste des attributs possibles pour une GeocodedLocation de type Administratif\n * - **bbox** : Emprise de l'unité administrative dans le système de coordonnées demandé *{left, right, top, bottom}*\n * - **prefecture** - Nom de la préfécture de la région ou du département *{String}*\n * - **inseeRegion** - Numéro INSEE de la région *{String}*\n * - **inseeDepartment** - Numéro INSEE du département *{String}*\n * - **municipality** - Nom de l'unité administrative *{String}*\n *\n */\n\n this.attributesList = [\"bbox\", \"prefecture\", \"inseeRegion\", \"inseeDepartment\", \"municipality\"];\n\n this.serviceAttributes = [\"bbox\", \"Prefecture\", \"InseeRegion\", \"InseeDepartement\", \"Municipality\"];\n}\n\n/**\n * @lends module:Administratif#\n */\nAdministratif.prototype = Object.create(GeocodeLocation.prototype);\n\n/**\n * Constructeur (alias)\n */\nAdministratif.prototype.constructor = Administratif;\n\nexport default Administratif;\n" - }, - { - "id": 76, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Response/DirectGeocodeResponseFactory.js", - "name": "./src/Services/Geocode/Response/DirectGeocodeResponseFactory.js", - "index": 66, - "index2": 66, - "size": 3319, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Geocode.js", - "issuerId": 63, - "issuerName": "./src/Services/Geocode/Geocode.js", - "profile": { - "factory": 218, - "building": 227, - "dependencies": 318 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 63, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Geocode.js", - "module": "./src/Services/Geocode/Geocode.js", - "moduleName": "./src/Services/Geocode/Geocode.js", - "type": "harmony import", - "userRequest": "./Response/DirectGeocodeResponseFactory", - "loc": "7:0-83" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 4, - "source": "/**\n * Factory pour générer une reponse JSON à partir d'un XML\n * ou d'un JSON encapsulant du XML\n * (Factory)\n *\n * @module GeocodeResponseFactory\n * @alias Gp.Services.Geocode.Response.GeocodeResponseFactory\n * @todo La reponse JSON peut encapsuler un XML !\n * @private\n */\n// import Logger from \"../../../Utils/LoggerByDefault\";\nimport ErrorService from \"../../../Exceptions/ErrorService\";\nimport MRes from \"../../../Utils/MessagesResources\";\nimport XML from \"../../../Formats/XML\";\nimport DirectGeocodeResponseReader from \"../Formats/DirectGeocodeResponseReader\";\n\nvar DirectGeocodeReponseFactory = {\n\n /**\n * interface unique\n *\n * @method build\n * @static\n * @param {Object} options - options definies dans le composant Geocode\n *\n * @example\n * var options = {\n * response :\n * rawResponse :\n * scope :\n * onSuccess :\n * onError :\n * };\n *\n */\n build : function (options) {\n // data de type GeocodeResponse\n var data = null;\n\n if (options.response) {\n if (options.rawResponse) {\n data = options.response;\n } else {\n try {\n var p = new XML({\n reader : DirectGeocodeResponseReader\n });\n\n if (typeof options.response === \"string\") {\n p.setXMLString(options.response);\n } else {\n p.setXMLDoc(options.response);\n }\n\n data = p.parse();\n\n if (!data) {\n throw new Error(\"L'analyse de la réponse du service !?\");\n }\n } catch (e) {\n var message = e.message;\n if (typeof options.response === \"string\") {\n message += \"('\" + options.response + \"')\";\n } else {\n message += \"('\" + options.response.documentElement.innerHTML + \"')\";\n }\n options.onError.call(options.scope, new ErrorService({\n message : MRes.getMessage(\"SERVICE_RESPONSE_ANALYSE\", message),\n type : ErrorService.TYPE_UNKERR,\n status : -1\n }));\n return;\n }\n\n // Si la réponse contenait une exception renvoyée par le service\n if (data.exceptionReport) {\n options.onError.call(options.scope, new ErrorService({\n message : MRes.getMessage(\"SERVICE_RESPONSE_EXCEPTION\", data.exceptionReport),\n type : ErrorService.TYPE_SRVERR,\n status : 200 // FIXME : 200 ?\n }));\n return;\n }\n }\n } else {\n options.onError.call(options.scope, new ErrorService({\n message : MRes.getMessage(\"SERVICE_RESPONSE_EMPTY\"),\n type : ErrorService.TYPE_SRVERR,\n status : -1 // FIXME : status response\n }));\n return;\n }\n\n options.onSuccess.call(options.scope, data);\n }\n};\n\nexport default DirectGeocodeReponseFactory;\n" - }, - { - "id": 77, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Formats/DirectGeocodeResponseReader.js", - "name": "./src/Services/Geocode/Formats/DirectGeocodeResponseReader.js", - "index": 67, - "index2": 65, - "size": 17612, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Response/DirectGeocodeResponseFactory.js", - "issuerId": 76, - "issuerName": "./src/Services/Geocode/Response/DirectGeocodeResponseFactory.js", - "profile": { - "factory": 320, - "building": 686, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 1, - "reasons": [ - { - "moduleId": 76, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Response/DirectGeocodeResponseFactory.js", - "module": "./src/Services/Geocode/Response/DirectGeocodeResponseFactory.js", - "moduleName": "./src/Services/Geocode/Response/DirectGeocodeResponseFactory.js", - "type": "harmony import", - "userRequest": "../Formats/DirectGeocodeResponseReader", - "loc": "15:0-81" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "\n/**\n * Fonction retournant un objet contenant des clés de lecture (readers)\n * qui permettent de parser des réponses XML du service de géocodage direct du Géoportail\n * afin de récupérer les résultats retournés.\n * @module DirectGeocodeResponseReader\n * @alias Gp.Services.Geocode.Formats.DirectGeocodeResponseReader\n * @private\n */\n\n// import Logger from \"../../../Utils/LoggerByDefault\";\nimport MR from \"../../../Utils/MessagesResources\";\nimport ErrSrv from \"../../../Exceptions/ErrorService\";\nimport GeocodeResponse from \"../Response/model/GeocodeResponse\";\nimport DirectGeocodedLocation from \"../Response/model/DirectGeocodedLocation\";\n\n/**\n * @member DirectGeocodeResponseReader\n */\nvar DirectGeocodeResponseReader = {};\n\n/**\n * @property {String} DirectGeocodeResponseReader.VERSION - version du service de géocodage\n */\nDirectGeocodeResponseReader.VERSION = \"1.2\";\n\n/**\n * Objet stockant les différents namespaces et les URI associées\n */\nDirectGeocodeResponseReader.NAMESPACES = {\n xmlns : \"http://www.opengis.net/xls\",\n gml : \"http://www.opengis.net/gml\",\n xls : \"http://www.opengis.net/xls\",\n xlsext : \"http://www.opengis.net/xlsext\",\n xsi : \"http://www.w3.org/2001/XMLSchema-instance\"\n};\n\n/**\n * Localisation (URL) du schema de définition du XML (XSD)\n */\nDirectGeocodeResponseReader.SCHEMALOCATION = \"http://wxs.ign.fr/schemas/olsAll.xsd\";\n\n/**\n * Namespace par défaut du format\n */\nDirectGeocodeResponseReader.DEFAULTPREFIX = \"xls\";\n\n/**\n * Objet contenant des fonctions de lecture, appelées \"READERS\"\n * dont chaque clé correspond au nom d'un tag du XML que l'on souhaite lire\n * et la valeur associée est une fonction (node, data)\n * où node est un noeud du document DOM\n * et data est un objet où l'on stocke les informations lues dans le XML.\n */\nDirectGeocodeResponseReader.READERS = {\n\n xls : {\n\n /** TODO : jsdoc block */\n XLS : function (root) {\n var geocodeResponse = new GeocodeResponse();\n\n // vérification de la version du service, et des namespaces de l'en-tête\n __checkServiceAttributes(root);\n\n // puis lancement de la lecture de l'ensemble des noeuds, en bouclant sur les childNodes\n __getChildNodes(root, geocodeResponse);\n\n return geocodeResponse;\n },\n\n /** TODO : jsdoc block */\n GeocodedAddress : function (node, geocodeResponse) {\n var geocodedLocation = new DirectGeocodedLocation();\n\n __getChildNodes(node, geocodedLocation);\n\n // Ajout du résultat au tableau geocodedLocations de geocodeReponse\n if (geocodeResponse && Array.isArray(geocodeResponse.locations)) {\n geocodeResponse.locations.push(geocodedLocation);\n }\n },\n\n /** TODO : jsdoc block */\n GeocodeMatchCode : function (node, geocodedLocation) {\n var acc = node.getAttribute(\"accuracy\");\n if (acc && geocodedLocation) {\n geocodedLocation.accuracy = parseFloat(acc);\n }\n var matchType = node.getAttribute(\"matchType\");\n if (matchType && geocodedLocation) {\n geocodedLocation.matchType = matchType;\n }\n },\n\n /** TODO : jsdoc block */\n Address : function (node, geocodedLocation) {\n var countrycode = node.getAttribute(\"countryCode\");\n if (geocodedLocation && countrycode) {\n geocodedLocation.type = countrycode;\n }\n // on va récupérer les autres informations (StreetAddress, place, postalCode...)\n __getChildNodes(node, geocodedLocation);\n },\n\n /** TODO : jsdoc block */\n freeFormAddress : function (node, geocodedLocation) {\n if (geocodedLocation && geocodedLocation.hasOwnProperty(\"placeAttributes\")) {\n geocodedLocation.placeAttributes.freeform = __getChildValue(node);\n }\n },\n\n /** TODO : jsdoc block */\n Building : function (node, geocodedLocation) {\n var num = node.getAttribute(\"number\");\n if (geocodedLocation && geocodedLocation.hasOwnProperty(\"placeAttributes\")) {\n if (num) {\n geocodedLocation.placeAttributes.number = num;\n } else if (node.getAttribute(\"buildingName\")) {\n geocodedLocation.placeAttributes.number = node.getAttribute(\"buildingName\");\n } else if (node.getAttribute(\"subdivision\")) {\n geocodedLocation.placeAttributes.number = node.getAttribute(\"subdivision\");\n }\n }\n },\n\n /** TODO : jsdoc block */\n Street : function (node, geocodedLocation) {\n if (geocodedLocation && geocodedLocation.hasOwnProperty(\"placeAttributes\")) {\n // in case of a streetAddress result : street represents the street name\n if (geocodedLocation.type === \"StreetAddress\") {\n geocodedLocation.placeAttributes.street = __getChildValue(node);\n\n // in case of a cadastral parcel result : street represents the cadastral parcel identifier\n } else if (geocodedLocation.type === \"CadastralParcel\") {\n geocodedLocation.placeAttributes.cadastralParcel = __getChildValue(node);\n }\n }\n },\n\n /** TODO : jsdoc block */\n Place : function (node, geocodedLocation) {\n var placeType = node.getAttribute(\"type\");\n var placeName = __getChildValue(node);\n\n if (geocodedLocation && geocodedLocation.hasOwnProperty(\"placeAttributes\")) {\n if (placeType === \"Municipality\") {\n geocodedLocation.placeAttributes.municipality = placeName;\n } else if (placeType === \"Bbox\") {\n var values = placeName.split(\";\");\n if (values.length === 4) {\n geocodedLocation.placeAttributes.bbox = {\n left : parseFloat(values[0]),\n right : parseFloat(values[2]),\n top : parseFloat(values[1]),\n bottom : parseFloat(values[3])\n };\n }\n } else if (placeType === \"Commune\") {\n geocodedLocation.placeAttributes.commune = placeName;\n } else if (placeType === \"Departement\") {\n geocodedLocation.placeAttributes.department = placeName;\n } else if (placeType === \"INSEE\") {\n geocodedLocation.placeAttributes.insee = placeName;\n } else if (placeType === \"Qualite\") {\n geocodedLocation.placeAttributes.quality = placeName;\n } else if (placeType === \"Territoire\") {\n geocodedLocation.placeAttributes.territory = placeName;\n } else if (placeType === \"ID\") {\n geocodedLocation.placeAttributes.ID = placeName;\n } else if (placeType === \"ID_TR\") {\n geocodedLocation.placeAttributes.IDTR = placeName;\n } else if (placeType === \"Importance\") {\n geocodedLocation.placeAttributes.importance = parseInt(placeName, 10);\n } else if (placeType === \"Nature\") {\n geocodedLocation.placeAttributes.nature = placeName;\n } else if (placeType === \"Numero\") {\n geocodedLocation.placeAttributes.number = placeName;\n } else if (placeType === \"Feuille\") {\n geocodedLocation.placeAttributes.sheet = placeName;\n } else if (placeType === \"Section\") {\n geocodedLocation.placeAttributes.section = placeName;\n } else if (placeType === \"CommuneAbsorbee\") {\n geocodedLocation.placeAttributes.absorbedCity = placeName;\n } else if (placeType === \"Arrondissement\") {\n if (placeName) {\n geocodedLocation.placeAttributes.arrondissement = placeName;\n }\n } else if (placeType === \"Type\") {\n geocodedLocation.placeAttributes.origin = placeName;\n } else if (placeType === \"Prefecture\") {\n geocodedLocation.placeAttributes.prefecture = placeName;\n } else if (placeType === \"InseeRegion\") {\n geocodedLocation.placeAttributes.inseeRegion = placeName;\n } else if (placeType === \"InseeDepartment\") {\n geocodedLocation.placeAttributes.inseeDepartment = placeName;\n }\n }\n },\n\n /** TODO : jsdoc block */\n PostalCode : function (node, geocodedLocation) {\n if (geocodedLocation && geocodedLocation.hasOwnProperty(\"placeAttributes\")) {\n geocodedLocation.placeAttributes.postalCode = __getChildValue(node);\n }\n },\n\n /** TODO : jsdoc block */\n Error : function (node) {\n // on imagine qu'on a une balise ainsi :\n // \n var srvMess = node.getAttribute(\"message\");\n var errorCode = node.getAttribute(\"errorCode\");\n var message = MR.getMessage(\"SERVICE_RESPONSE_EXCEPTION\",\n \"(\" + errorCode + \") : \" + srvMess);\n throw new ErrSrv({\n message : message,\n type : ErrSrv.TYPE_SRVERR\n });\n }\n },\n\n gml : {\n\n /** TODO : jsdoc block */\n pos : function (node, geocodedLocation) {\n var pos = __getChildValue(node);\n if (geocodedLocation && pos) {\n geocodedLocation.position = {\n x : parseFloat(pos.split(\" \")[0]),\n y : parseFloat(pos.split(\" \")[1])\n };\n }\n }\n },\n\n /** TODO : jsdoc block */\n ExceptionReport : function (node) {\n var response = {};\n if (node.hasChildNodes()) {\n var children = node.childNodes;\n var child;\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n if (child.nodeName === \"Exception\") {\n response.exceptionReport = DirectGeocodeResponseReader.READERS[\"Exception\"](child);\n }\n }\n }\n return response;\n },\n\n /** TODO : jsdoc block */\n Exception : function (node) {\n var exceptionReport = {};\n\n // get exception code\n var exceptionCode = node.getAttribute(\"exceptionCode\");\n if (exceptionCode) {\n exceptionReport.exceptionCode = exceptionCode;\n }\n\n // get exception message\n var textNode = node.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n exceptionReport.exception = textNode.nodeValue;\n }\n\n return exceptionReport;\n }\n\n};\n\n/**\n * Méthode permettant de lancer la lecture d'une réponse XML du service de géocodage,\n * à l'aide des READERS de la classe.\n *\n * @method DirectGeocodeResponseReader.read\n * @param {DOMElement} root - racine de la réponse XML à lire\n * @return {Object} geocodeResponse|exceptionReport : l'objet contenant les informations de la réponse XML,\n * sous la forme d'un objet GeocodeResponse, ou un objet littéral exceptionReport si le service a renvoyé une exception.\n * @static\n * @memberof DirectGeocodeResponseReader\n */\nDirectGeocodeResponseReader.read = function (root) {\n if (root.nodeName === \"XLS\") {\n var nsPrefix = root.prefix;\n if (!nsPrefix) {\n nsPrefix = DirectGeocodeResponseReader.DEFAULTPREFIX;\n }\n var geocodeResponse = DirectGeocodeResponseReader.READERS[nsPrefix][root.nodeName](root);\n return geocodeResponse;\n } else if (root.nodeName === \"ExceptionReport\") {\n var exceptionReport = DirectGeocodeResponseReader.READERS[root.nodeName](root);\n return exceptionReport;\n } else {\n var mess = MR.getMessage(\"SERVICE_RESPONSE_ANALYSE\", root.nodeName);\n throw new ErrSrv({\n message : mess,\n type : ErrSrv.TYPE_UNKERR,\n status : 200\n });\n }\n};\n\n/**\n * Récupération des attributs d'un noeud élément\n *\n * @private\n * @memberof DirectGeocodeResponseReader\n * @method __getAttributes\n * @param {DOMElement} node - noeud contenant l'attribut recherché\n * @return {Object} nodeAttributes - objet contenant les noms et valeurs des différents attributs\n */\nfunction __getAttributes (node) {\n if (node.attributes.length > 0) {\n var nodeAttributes = {};\n var attributes = node.attributes;\n for (var i = 0; i < attributes.length; i++) {\n var attribute = attributes[i];\n nodeAttributes[attribute.nodeName] = attribute.nodeValue;\n }\n return nodeAttributes;\n }\n}\n\n/**\n * Récupération des noeuds enfants à partir d'un noeud donné, pour lecture (readNode).\n *\n * @private\n * @memberof DirectGeocodeResponseReader\n * @method __getChildNodes\n * @param {DOMElement} node - a DOM node\n * @param {Array|Object} [data] - an object to be filled with node data\n */\nfunction __getChildNodes (node, data) {\n if (node.hasChildNodes()) {\n var children = node.childNodes;\n var child;\n var childName;\n var childPrefix;\n\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n\n if (child.nodeType === 1) { // 1 === node.ELEMENT_NODE\n childName = child.localName || child.baseName || child.nodeName;\n childPrefix = child.prefix || DirectGeocodeResponseReader.DEFAULTPREFIX;\n\n if (DirectGeocodeResponseReader.READERS[childPrefix][childName]) {\n var reader = DirectGeocodeResponseReader.READERS[childPrefix][childName];\n reader(child, data);\n } else {\n __getChildNodes(child, data);\n }\n }\n }\n }\n}\n\n/**\n * Lecture de la valeur du premier child d'un noeud, si elle existe.\n *\n * @private\n * @memberof DirectGeocodeResponseReader\n * @method __getChildValue\n * @param {DOMElement} node - a DOM node\n * @return {String} value - valeur du firstChild du noeud en entrée, ou chaîne vide.\n */\nfunction __getChildValue (node) {\n var textNode;\n var value = \"\";\n\n if (node.hasChildNodes()) {\n textNode = node.firstChild;\n if (textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n value = textNode.nodeValue;\n }\n }\n return value;\n}\n\n/**\n * Vérification des attributs du service, dans la balise XLS de la réponse :\n * version, namespaces, et namespace par défaut doivent correspondre à ceux attendus.\n *\n * @private\n * @memberof DirectGeocodeResponseReader\n * @method __checkServiceAttributes\n * @param {DOMElement} XLSNode - a DOM node, corresponding to XLS first tag.\n */\nfunction __checkServiceAttributes (XLSNode) {\n if (XLSNode.attributes.length > 0) {\n // on récupère et parcourt les attributs de la balise XLS de la réponse\n var xlsAttributes = __getAttributes(XLSNode);\n for (var att in xlsAttributes) {\n if (xlsAttributes.hasOwnProperty(att)) {\n // vérification de la version\n if (att === \"version\") {\n if (xlsAttributes[\"version\"] !== DirectGeocodeResponseReader.VERSION) {\n console.log(\"[DirectGeocodeResponseReader] geocode version is not the expected one : there may be errors in parsing\");\n return;\n }\n }\n\n // on vérifie que l'uri du namespace par défaut est bien celle que l'on attend\n if (att === \"xmlns\") {\n if (xlsAttributes[att] !== DirectGeocodeResponseReader.NAMESPACES[DirectGeocodeResponseReader.DEFAULTPREFIX]) {\n console.log(\"[DirectGeocodeResponseReader] geocode response default namespace is not the expected one\");\n return;\n }\n continue;\n }\n\n var prefix = att.split(\":\")[0];\n var ns = att.split(\":\")[1];\n\n // si on a un autre xmlns, on vérifie aussi les URI\n if (prefix === \"xmlns\" && ns) {\n // si l'attribut correspond à un namespace défini dans le reader\n if (DirectGeocodeResponseReader.NAMESPACES[ns]) {\n // il faut que les URI correspondent aussi.\n if (DirectGeocodeResponseReader.NAMESPACES[ns] !== xlsAttributes[att]) {\n console.log(\"[DirectGeocodeResponseReader] geocode response \" + att + \" namespace is not the expected one\");\n return;\n }\n }\n }\n\n // pour finir on vérifie la localisation du schema XSD du service\n if (ns === \"schemaLocation\") {\n if (DirectGeocodeResponseReader.SCHEMALOCATION !== xlsAttributes[att]) {\n console.log(\"[DirectGeocodeResponseReader] geocode response schema location is not the expected one\");\n return;\n }\n }\n }\n }\n }\n}\n\nexport default DirectGeocodeResponseReader;\n" - }, - { - "id": 78, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/ReverseGeocode.js", - "name": "./src/Services/Geocode/ReverseGeocode.js", - "index": 71, - "index2": 72, - "size": 10870, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Services.js", - "issuerId": 45, - "issuerName": "./src/Services/Services.js", - "profile": { - "factory": 513, - "building": 154, - "dependencies": 262 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 45, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Services.js", - "module": "./src/Services/Services.js", - "moduleName": "./src/Services/Services.js", - "type": "harmony import", - "userRequest": "./Geocode/ReverseGeocode", - "loc": "12:0-54" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 3, - "source": "\nimport Logger from \"../../Utils/LoggerByDefault\";\nimport _ from \"../../Utils/MessagesResources\";\nimport ErrorService from \"../../Exceptions/ErrorService\";\nimport CommonService from \"../CommonService\";\nimport ReverseGeocodeRequestFactory from \"./Request/ReverseGeocodeRequestFactory\";\nimport ReverseGeocodeResponseFactory from \"./Response/ReverseGeocodeResponseFactory\";\n\n/**\n * @classdesc\n * Appel du service de géocodage inverse du Géoportail :\n * envoi de la requête construite selon les paramètres en options,\n * éventuellement parsing et analyse de la réponse,\n * retour d'une réponse en paramètre de la fonction onSuccess.\n * @constructor\n * @extends {Gp.Services.CommonService}\n * @alias Gp.Services.ReverseGeocode\n *\n * @param {Object} options - options spécifiques au service (+ les options heritées)\n *\n * @param {Object} options.position - Position du point de référence pour le calcul de proximité exprimée dans le système de référence spécifié par le srs.\n * @param {Float} options.position.x - Abcisse du point de référence pour le calcul de proximité exprimée dans le système de référence spécifié par le srs. (= longitude si srs = \"CRS:84\", latitude si srs = \"EPSG:4326\")\n * @param {Float} options.position.y - Ordonnée du point de référence pour le calcul de proximité exprimée dans le système de référence spécifié par le srs. (= latitude si srs = \"CRS:84\", longitude si srs = \"EPSG:4326\")\n *\n * @param {Object} [options.filterOptions] - Les propriétés possibles de cet objet sont décrites ci-après.\n * @param {Object} [options.filterOptions.bbox] - Emprise dans laquelle on souhaite effectuer la recherche.\n * Les propriétés possibles de cet objet sont décrites ci-après.\n * @param {Float} options.filterOptions.bbox.left - Abscisse du côté gauche de la BBOX\n * @param {Float} options.filterOptions.bbox.right - Abscisse du côté droit de la BBOX\n * @param {Float} options.filterOptions.bbox.top - Ordonnée supérieure de la BBOX\n * @param {Float} options.filterOptions.bbox.bottom - Ordonnée inférieure de la BBOX\n *\n * @param {Object} [options.filterOptions.circle] - Cercle dans lequel on souhaite effectuer la recherche.\n * Les propriétés possibles de cet objet sont décrites ci-après.\n * @param {Float} options.filterOptions.circle.x - Abscisse du centre du cercle de recherche.\n * @param {Float} options.filterOptions.circle.y - Ordonnée du centre du cercle de recherche.\n * @param {Float} options.filterOptions.circle.radius - Rayon du cercle de recherche.\n *\n * @param {Array.} [options.filterOptions.polygon] - Polygone dans lequel on souhaite effectuer la recherche.\n * Liste des couples x et y pour chaque point constituant le polygone.\n *\n * @param {Array.} [options.filterOptions.type = \"StreetAddress\"] - Type de l'objet recherché.\n * Le service de géocodage du Géoportail permet de rechercher des 'PostionOfInterest' pour des toponymes, des 'StreetAddress'\n * pour des adresses postales et/ou des 'CadastralParcel' pour des parcelles cadastrales.\n * D'autres types pourront être rajoutés selon l'évolution du service.\n * Par défaut, type = ['StreetAddress'].\n *\n * @param {Number} [options.maximumResponses] - Nombre de réponses maximal que l'on souhaite recevoir.\n * Pas de valeur par défaut. Si le serveur consulté est celui du Géoportail, la valeur par défaut sera donc celle du service : 25.\n *\n * @param {String} [options.srs = CRS:84] - Système de coordonnées dans lequel les paramètres géographiques en entrée et la réponse du service sont exprimés.\n * Pas de valeur par défaut.\n * Si le serveur consulté est celui du Géoportail, la valeur par défaut est : \"CRS:84\".\n *\n * @example\n * var options = {\n * apiKey : null,\n * serverUrl : 'http://localhost/service/',\n * protocol : 'JSONP', // JSONP|XHR\n * proxyURL : null,\n * httpMethod : 'GET', // GET|POST\n * timeOut : 10000, // ms\n * rawResponse : false, // true|false\n * scope : null, // this\n * onSuccess : function (response) {},\n * onFailure : function (error) {},\n * // spécifique au service\n * position : {x:0 , y:0},\n * filterOptions :{\n * bbox : {left : 0, right : 1, top : 1, bottom : 0},\n * [circle : {\n * x : 0,\n * y : 0,\n * radius : 100\n * }]\n * [polygon : [{x:0,y:0}, {x:1,y:1}, {x:2,y:2}, {x:3,y:2}, {x:4,y:1}, {x:0,y:0}]]\n * type : ['StreetAddress']\n * },\n * maximumResponses : 25,\n * srs : 'EPSG:4326'\n * };\n *\n * @private\n */\nfunction ReverseGeocode (options) {\n if (!(this instanceof ReverseGeocode)) {\n throw new TypeError(_.getMessage(\"CLASS_CONSTRUCTOR\", \"ReverseGeocode\"));\n }\n\n /**\n * Nom de la classe (heritage)\n * FIXME instance ou classe ?\n */\n this.CLASSNAME = \"ReverseGeocode\";\n\n // appel du constructeur par heritage\n CommonService.apply(this, arguments);\n\n this.logger = Logger.getLogger(\"Gp.Services.ReverseGeocode\");\n this.logger.trace(\"[Constructeur ReverseGeocode (options)]\");\n\n if (!options.position) {\n throw new Error(_.getMessage(\"PARAM_MISSING\", \"position\"));\n }\n\n // on lance une exception afin d'eviter au service de le faire...\n if (options.position.x === null) {\n throw new Error(_.getMessage(\"PARAM_MISSING\", \"position.x\"));\n }\n\n if (options.position.y === null) {\n throw new Error(_.getMessage(\"PARAM_MISSING\", \"position.y\"));\n }\n\n // ajout des options spécifiques au service\n this.options.position = options.position;\n\n // on definit des filtres par defaut\n if (!options.filterOptions || typeof options.filterOptions !== \"object\") {\n this.options.filterOptions = options.filterOptions = {\n type : [\"StreetAddress\"]\n };\n }\n\n // FIXME ECMAScript 5 support (valable pour un objet uniquement !)\n // ceci permet de tester le cas où : object = {}\n if (Object.keys(options.filterOptions).length === 0) {\n this.options.filterOptions = {\n type : [\"StreetAddress\"]\n };\n }\n\n // on teste pour chaque filtre, les conditions suivantes : null ou vide !\n var filter = Object.keys(options.filterOptions);\n for (var i = 0; i < filter.length; i++) {\n var key = filter[i];\n if (!options.filterOptions[key] || Object.keys(options.filterOptions[key]).length === 0) {\n delete this.options.filterOptions[key];\n }\n }\n\n this.options.filterOptions.type = options.filterOptions.type || [\"StreetAddress\"];\n // on vérifie que le type est bien dans un tableau\n if (!Array.isArray(this.options.filterOptions.type)) {\n throw new Error(_.getMessage(\"PARAM_TYPE\", \"filterOptions.type\"));\n }\n\n this.options.maximumResponses = options.maximumResponses || 25;\n\n // FIXME : cet attribut (returnFreeForm) n'est pas spécifié dans la doc du constructeur ?\n // Il est inutile en effet, mais présent dans les specs...\n this.options.returnFreeForm = options.returnFreeForm || false;\n // info : en réalité le service ne reconnait que EPSG:4326. this.options.srs permet essentiellement de différencier EPSG:4326 (lat,lon) et CRS:84 (lon,lat)\n this.options.srs = options.srs || \"CRS:84\";\n\n // si on n'a pas un systeme de coordonnées EPSG géographique, il faut inverser les coordonnées\n // (car elles sont en lon, lat alors que le service attend une position en lat, lon).\n // dans le cas d'EPSG:4326 par exemple, les coordonnées sont bien en lat, lon donc on ne fait rien.\n if (ReverseGeocode.geoEPSG.indexOf(this.options.srs) === -1) {\n // pour la position\n this.options.position = {\n x : this.options.position.y,\n y : this.options.position.x\n };\n // pour les filtres spatiaux s'ils sont spécifiés\n if (this.options.filterOptions && this.options.filterOptions.circle) {\n var circle = this.options.filterOptions.circle;\n this.options.filterOptions.circle = {\n x : circle.y,\n y : circle.x,\n radius : circle.radius\n };\n }\n if (this.options.filterOptions && this.options.filterOptions.polygon) {\n var polygon = this.options.filterOptions.polygon;\n for (i = 0; i < polygon.length; i++) {\n var coords = polygon[i];\n this.options.filterOptions.polygon[i] = {\n x : coords.y,\n y : coords.x\n };\n }\n }\n }\n\n // attributs d'instances\n\n /**\n * Format forcé de la réponse du service : \"xml\"\n * sauf si l'on souhaite une reponse brute (options.rawResponse)\n */\n this.options.outputFormat = (this.options.rawResponse) ? \"\" : \"xml\";\n}\n\n/**\n * @lends module:ReverseGeocode#\n */\nReverseGeocode.prototype = Object.create(CommonService.prototype, {\n // todo\n // getter/setter\n});\n\n/*\n * Constructeur (alias)\n */\nReverseGeocode.prototype.constructor = ReverseGeocode;\n\n/**\n * (overwrite)\n * Création de la requête\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nReverseGeocode.prototype.buildRequest = function (error, success) {\n var options = {\n httpMethod : this.options.httpMethod,\n // options specifiques du service\n position : this.options.position,\n returnFreeForm : this.options.returnFreeForm,\n filterOptions : this.options.filterOptions,\n srs : \"EPSG:4326\", // info : en réalité le service ne reconnait que EPSG:4326. this.options.srs permet essentiellement de différencier EPSG:4326 (lat,lon) et CRS:84 (lon,lat)\n maximumResponses : this.options.maximumResponses\n };\n\n this.request = ReverseGeocodeRequestFactory.build(options);\n\n // on teste si la requete a bien été construite !\n (!this.request)\n ? error.call(this, new ErrorService(_.getMessage(\"SERVICE_REQUEST_BUILD\")))\n : success.call(this, this.request);\n};\n\n/**\n * (overwrite)\n * Analyse de la reponse\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nReverseGeocode.prototype.analyzeResponse = function (error, success) {\n if (this.response) {\n var options = {\n response : this.response,\n rawResponse : this.options.rawResponse,\n onError : error,\n onSuccess : success,\n scope : this\n };\n\n ReverseGeocodeResponseFactory.build(options);\n } else {\n error.call(this, new ErrorService(_.getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n }\n};\n\n/**\n * Codes EPSG géographiques (lat/lon). Utiles car les coordonnées doivent être inversées.\n */\nReverseGeocode.geoEPSG = [\"EPSG:4326\"];\n\nexport default ReverseGeocode;\n" - }, - { - "id": 79, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/ReverseGeocodeRequestFactory.js", - "name": "./src/Services/Geocode/Request/ReverseGeocodeRequestFactory.js", - "index": 72, - "index2": 68, - "size": 2539, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/ReverseGeocode.js", - "issuerId": 78, - "issuerName": "./src/Services/Geocode/ReverseGeocode.js", - "profile": { - "factory": 266, - "building": 448, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 78, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/ReverseGeocode.js", - "module": "./src/Services/Geocode/ReverseGeocode.js", - "moduleName": "./src/Services/Geocode/ReverseGeocode.js", - "type": "harmony import", - "userRequest": "./Request/ReverseGeocodeRequestFactory", - "loc": "6:0-82" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 4, - "source": "/**\n * Creation d'une requête OpenLS en mode POST ou GET\n * (Factory)\n *\n * @module ReverseGeocodeRequestFactory\n * @alias Gp.Services.Geocode.Request.ReverseGeocodeRequestFactory\n * @private\n */\nimport Logger from \"../../../Utils/LoggerByDefault\";\nimport XLS from \"../../../Formats/XLS\";\nimport LocationUtilityService from \"../../../Formats/XLS/LocationUtilityService\";\n\nvar ReverseGeocodeRequestFactory = {\n\n /**\n * interface unique\n *\n * @method build\n * @static\n * @param {Object} options - options definies dans le composant Geocode\n *\n * @example\n * var options = {\n * httpMethod :\n * // options specifiques du service\n * position :\n * returnFreeForm :\n * filterOptions :\n * srs :\n * maximumResponses :\n * };\n * var result = ReverseGeocodeRequestFactory.build(options);\n * if (!result) {\n * // error...\n * }\n * @returns {String} request\n */\n build : function (options) {\n // logger\n var logger = Logger.getLogger(\"ReverseGeocodeRequestFactory\");\n logger.trace([\"ReverseGeocodeRequestFactory::build()\"]);\n\n // options non definies\n var settings = options || {};\n\n var request = null;\n\n // objet LUS\n var oLUS = new LocationUtilityService({\n position : settings.position,\n returnFreeForm : settings.returnFreeForm,\n filterOptions : settings.filterOptions\n });\n\n // Format XLS\n var oXLS = new XLS({\n srsName : settings.srs,\n maximumResponses : settings.maximumResponses\n });\n oXLS.namespace = true;\n oXLS.setService(oLUS);\n\n // request brute !\n request = oXLS.build();\n\n // en mode GET, la requête est encodée\n // et le param. 'qxml' est ajouté\n if (settings.httpMethod === \"GET\") {\n var myRequest = \"qxml=\" +\n encodeURIComponent(request)\n .replace(/-/g, \"%2D\")\n .replace(/_/g, \"%5F\")\n .replace(/\\./g, \"%2E\")\n .replace(/!/g, \"%21\")\n .replace(/~/g, \"%7E\")\n .replace(/\\*/g, \"%2A\")\n .replace(/'/g, \"%27\")\n .replace(/\\(/g, \"%28\")\n .replace(/\\)/g, \"%29\");\n request = myRequest;\n }\n\n logger.trace(request);\n\n return request;\n }\n};\n\nexport default ReverseGeocodeRequestFactory;\n" - }, - { - "id": 80, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Response/ReverseGeocodeResponseFactory.js", - "name": "./src/Services/Geocode/Response/ReverseGeocodeResponseFactory.js", - "index": 73, - "index2": 71, - "size": 3947, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/ReverseGeocode.js", - "issuerId": 78, - "issuerName": "./src/Services/Geocode/ReverseGeocode.js", - "profile": { - "factory": 264, - "building": 206, - "dependencies": 339 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 78, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/ReverseGeocode.js", - "module": "./src/Services/Geocode/ReverseGeocode.js", - "moduleName": "./src/Services/Geocode/ReverseGeocode.js", - "type": "harmony import", - "userRequest": "./Response/ReverseGeocodeResponseFactory", - "loc": "7:0-85" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 4, - "source": "/**\n * Factory pour générer une reponse JSON à partir d'un XML\n * ou d'un JSON encapsulant du XML\n * (Factory)\n *\n * @module ReverseGeocodeResponseFactory\n * @alias Gp.Services.ReverseGeocode.Response.ReverseGeocodeResponseFactory\n * @todo La reponse JSON peut encapsuler un XML !\n * @private\n */\n\nimport MRes from \"../../../Utils/MessagesResources\";\nimport ErrorService from \"../../../Exceptions/ErrorService\";\nimport XML from \"../../../Formats/XML\";\nimport ReverseGeocodeResponseReader from \"../Formats/ReverseGeocodeResponseReader\";\n\nvar ReverseGeocodeReponseFactory = {\n\n /**\n * interface unique\n *\n * @method build\n * @static\n * @param {Object} options - options definies dans le composant ReverseGeocode\n *\n * @example\n * var options = {\n * response :\n * rawResponse :\n * scope :\n * onSuccess :\n * onError :\n * };\n *\n */\n build : function (options) {\n // data de type ReverseGeocodeResponse\n var data = null;\n\n if (options.response) {\n if (options.rawResponse) {\n data = options.response;\n } else {\n try {\n var p = new XML({\n reader : ReverseGeocodeResponseReader\n });\n\n if (typeof options.response === \"string\") {\n p.setXMLString(options.response);\n } else {\n p.setXMLDoc(options.response);\n }\n\n data = p.parse();\n\n if (!data) {\n throw new Error(\"L'analyse de la réponse du service !?\");\n }\n } catch (e) {\n // on relaye l'erreur reçue\n e.status = 200;\n options.onError.call(options.scope, e);\n return;\n }\n\n // Si la réponse contenait une exception renvoyée par le service\n // TODO : quand cela arrive-t-il ?\n if (data.exceptionReport) {\n options.onError.call(options.scope, new ErrorService({\n message : MRes.getMessage(\"SERVICE_RESPONSE_EXCEPTION\", data.exceptionReport),\n type : ErrorService.TYPE_SRVERR,\n status : 200\n }));\n return;\n }\n\n // dans le cas d'un srs non EPSG géographique, il faut réinverser les coordonnées (lat,lon => lon,lat)\n if (options.scope && options.scope.options && options.scope.options.srs && options.scope.options.srs !== \"EPSG:4326\") {\n var location;\n var pos;\n if (data || data.locations || data.locations.length) {\n for (var i = 0; i < data.locations.length; i++) {\n location = data.locations[i];\n if (location) {\n pos = location.position;\n if (pos) {\n // on inverse les 2 coordonnées\n location.position = {\n x : pos.y,\n y : pos.x\n };\n }\n }\n }\n }\n }\n }\n } else {\n options.onError.call(options.scope, new ErrorService({\n message : MRes.getMessage(\"SERVICE_RESPONSE_EMPTY\"),\n type : ErrorService.TYPE_SRVERR,\n status : -1 // FIXME : status response\n }));\n return;\n }\n\n options.onSuccess.call(options.scope, data);\n }\n};\n\nexport default ReverseGeocodeReponseFactory;\n" - }, - { - "id": 81, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Formats/ReverseGeocodeResponseReader.js", - "name": "./src/Services/Geocode/Formats/ReverseGeocodeResponseReader.js", - "index": 74, - "index2": 70, - "size": 18620, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Response/ReverseGeocodeResponseFactory.js", - "issuerId": 80, - "issuerName": "./src/Services/Geocode/Response/ReverseGeocodeResponseFactory.js", - "profile": { - "factory": 341, - "building": 607, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 1, - "reasons": [ - { - "moduleId": 80, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Response/ReverseGeocodeResponseFactory.js", - "module": "./src/Services/Geocode/Response/ReverseGeocodeResponseFactory.js", - "moduleName": "./src/Services/Geocode/Response/ReverseGeocodeResponseFactory.js", - "type": "harmony import", - "userRequest": "../Formats/ReverseGeocodeResponseReader", - "loc": "15:0-83" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "\n/**\n * Fonction retournant un objet contenant des clés de lecture (readers)\n * qui permettent de parser des réponses XML du service de géocodage inverse du Géoportail\n * afin de récupérer les résultats retournés.\n * @module ReverseGeocodeResponseReader\n * @alias Gp.Services.Geocode.Formats.ReverseGeocodeResponseReader\n * @private\n */\n\n// import Logger from \"../../../Utils/LoggerByDefault\";\nimport MR from \"../../../Utils/MessagesResources\";\nimport ErrSrv from \"../../../Exceptions/ErrorService\";\nimport ReverseGeocodeResponse from \"../Response/model/GeocodeResponse\";\nimport ReverseGeocodedLocation from \"../Response/model/ReverseGeocodedLocation\";\n\n/**\n * Objet ReverseGeocodeResponseReader\n * @member {Object} ReverseGeocodeResponseReader\n *\n * @property {String} ReverseGeocodeResponseReader.VERSION - Version du service de géocodage\n *\n * @property {Object} ReverseGeocodeResponseReader.NAMESPACES - Objet stockant les différents namespaces et les URI associées\n *\n * @property {String} ReverseGeocodeResponseReader.SCHEMALOCATION - Localisation (URL) du schema de définition du XML (XSD)\n *\n * @property {String} ReverseGeocodeResponseReader.DEFAULTPREFIX - Namespace par défaut du format\n *\n * @property {Object} ReverseGeocodeResponseReader.READERS - Objet contenant des fonctions de lecture, appelées \"READERS\"\n * dont chaque clé correspond au nom d'un tag du XML que l'on souhaite lire\n * et la valeur associée est une fonction (node, data)\n * où node est un noeud du document DOM\n * et data est un objet où l'on stocke les informations lues dans le XML.\n *\n * @property {Method} ReverseGeocodeResponseReader.read - Méthode permettant de lancer la lecture d'une réponse XML du service de géocodage,\n * à l'aide des READERS de la classe.\n *\n */\n\nvar ReverseGeocodeResponseReader = {};\n\n/**\n * version du service de géocodage\n */\nReverseGeocodeResponseReader.VERSION = \"1.2\";\n\n/**\n * Objet stockant les différents namespaces et les URI associées\n */\nReverseGeocodeResponseReader.NAMESPACES = {\n xmlns : \"http://www.opengis.net/xls\",\n gml : \"http://www.opengis.net/gml\",\n xls : \"http://www.opengis.net/xls\",\n xlsext : \"http://www.opengis.net/xlsext\",\n xsi : \"http://www.w3.org/2001/XMLSchema-instance\"\n};\n\n/**\n * Localisation (URL) du schema de définition du XML (XSD)\n */\nReverseGeocodeResponseReader.SCHEMALOCATION = \"http://wxs.ign.fr/schemas/olsAll.xsd\";\n\n/**\n * Namespace par défaut du format\n */\nReverseGeocodeResponseReader.DEFAULTPREFIX = \"xls\";\n\n/**\n * Objet contenant des fonctions de lecture, appelées \"READERS\"\n * dont chaque clé correspond au nom d'un tag du XML que l'on souhaite lire\n * et la valeur associée est une fonction (node, data)\n * où node est un noeud du document DOM\n * et data est un objet où l'on stocke les informations lues dans le XML.\n */\nReverseGeocodeResponseReader.READERS = {\n\n xls : {\n\n /** TODO : jsdoc block */\n XLS : function (root) {\n var reverseGeocodeResponse = new ReverseGeocodeResponse();\n\n // vérification de la version du service, et des namespaces de l'en-tête\n __checkServiceAttributes(root);\n\n // puis lancement de la lecture de l'ensemble des noeuds, en bouclant sur les childNodes\n __getChildNodes(root, reverseGeocodeResponse);\n\n return reverseGeocodeResponse;\n },\n\n /** TODO : jsdoc block */\n ReverseGeocodedLocation : function (node, reverseGeocodeResponse) {\n var reverseGeocodedLocation = new ReverseGeocodedLocation();\n\n __getChildNodes(node, reverseGeocodedLocation);\n\n // Ajout du résultat au tableau locations de reverseGeocodeResponse\n if (reverseGeocodeResponse && Array.isArray(reverseGeocodeResponse.locations)) {\n reverseGeocodeResponse.locations.push(reverseGeocodedLocation);\n }\n },\n\n /** TODO : jsdoc block */\n Address : function (node, reverseGeocodedLocation) {\n var countrycode = node.getAttribute(\"countryCode\");\n if (reverseGeocodedLocation && countrycode) {\n reverseGeocodedLocation.type = countrycode;\n }\n // on va récupérer les autres informations (StreetAddress, place, postalCode...)\n __getChildNodes(node, reverseGeocodedLocation);\n },\n\n /** TODO : jsdoc block */\n Building : function (node, reverseGeocodedLocation) {\n var num = node.getAttribute(\"number\");\n if (reverseGeocodedLocation && reverseGeocodedLocation.hasOwnProperty(\"placeAttributes\")) {\n if (num) {\n reverseGeocodedLocation.placeAttributes.number = num;\n } else if (node.getAttribute(\"buildingName\")) {\n reverseGeocodedLocation.placeAttributes.number = node.getAttribute(\"buildingName\");\n } else if (node.getAttribute(\"subdivision\")) {\n reverseGeocodedLocation.placeAttributes.number = node.getAttribute(\"subdivision\");\n }\n }\n },\n\n /** TODO : jsdoc block */\n Street : function (node, reverseGeocodedLocation) {\n // in case of a streetAddress result : street represents the street name\n if (reverseGeocodedLocation.type === \"StreetAddress\") {\n reverseGeocodedLocation.placeAttributes.street = __getChildValue(node);\n\n // in case of a cadastral parcel result : street represents the cadastral parcel identifier\n } else if (reverseGeocodedLocation.type === \"CadastralParcel\") {\n reverseGeocodedLocation.placeAttributes.cadastralParcel = __getChildValue(node);\n }\n },\n\n /** TODO : jsdoc block */\n Place : function (node, reverseGeocodedLocation) {\n var placeType = node.getAttribute(\"type\");\n var placeName = __getChildValue(node);\n\n if (reverseGeocodedLocation && reverseGeocodedLocation.hasOwnProperty(\"placeAttributes\")) {\n if (placeType === \"Municipality\") {\n reverseGeocodedLocation.placeAttributes.municipality = placeName;\n } else if (placeType === \"Bbox\") {\n var values = placeName.split(\";\");\n if (values.length === 4) {\n reverseGeocodedLocation.placeAttributes.bbox = {\n left : parseFloat(values[0]),\n right : parseFloat(values[2]),\n top : parseFloat(values[1]),\n bottom : parseFloat(values[3])\n };\n }\n } else if (placeType === \"Commune\") {\n reverseGeocodedLocation.placeAttributes.commune = placeName;\n } else if (placeType === \"Departement\") {\n reverseGeocodedLocation.placeAttributes.department = placeName;\n } else if (placeType === \"INSEE\") {\n reverseGeocodedLocation.placeAttributes.insee = placeName;\n } else if (placeType === \"Qualite\") {\n reverseGeocodedLocation.placeAttributes.quality = placeName;\n } else if (placeType === \"Territoire\") {\n reverseGeocodedLocation.placeAttributes.territory = placeName;\n } else if (placeType === \"ID\") {\n reverseGeocodedLocation.placeAttributes.ID = placeName;\n } else if (placeType === \"ID_TR\") {\n reverseGeocodedLocation.placeAttributes.IDTR = placeName;\n } else if (placeType === \"Importance\") {\n reverseGeocodedLocation.placeAttributes.importance = parseInt(placeName, 10);\n } else if (placeType === \"Nature\") {\n reverseGeocodedLocation.placeAttributes.nature = placeName;\n } else if (placeType === \"Numero\") {\n reverseGeocodedLocation.placeAttributes.number = placeName;\n } else if (placeType === \"Feuille\") {\n reverseGeocodedLocation.placeAttributes.sheet = placeName;\n } else if (placeType === \"Section\") {\n reverseGeocodedLocation.placeAttributes.section = placeName;\n } else if (placeType === \"CommuneAbsorbee\") {\n reverseGeocodedLocation.placeAttributes.absorbedCity = placeName;\n } else if (placeType === \"Arrondissement\") {\n if (placeName) {\n reverseGeocodedLocation.placeAttributes.arrondissement = placeName;\n }\n } else if (placeType === \"Type\") {\n reverseGeocodedLocation.placeAttributes.origin = placeName;\n } else if (placeType === \"Prefecture\") {\n reverseGeocodedLocation.placeAttributes.prefecture = placeName;\n } else if (placeType === \"InseeRegion\") {\n reverseGeocodedLocation.placeAttributes.inseeRegion = placeName;\n } else if (placeType === \"InseeDepartment\") {\n reverseGeocodedLocation.placeAttributes.inseeDepartment = placeName;\n }\n }\n },\n\n /** TODO : jsdoc block */\n PostalCode : function (node, reverseGeocodedLocation) {\n if (reverseGeocodedLocation && reverseGeocodedLocation.hasOwnProperty(\"placeAttributes\")) {\n reverseGeocodedLocation.placeAttributes.postalCode = __getChildValue(node);\n }\n },\n\n /** TODO : jsdoc block */\n SearchCentreDistance : function (node, reverseGeocodedLocation) {\n if (reverseGeocodedLocation) {\n reverseGeocodedLocation.searchCenterDistance = parseFloat(node.getAttribute(\"value\"));\n }\n },\n\n /** TODO : jsdoc block */\n Error : function (node) {\n // \n var srvMess = node.getAttribute(\"message\");\n var errorCode = node.getAttribute(\"errorCode\");\n var message = MR.getMessage(\"SERVICE_RESPONSE_EXCEPTION\",\n \"(\" + errorCode + \") : \" + srvMess);\n throw new ErrSrv({\n message : message,\n type : ErrSrv.TYPE_SRVERR\n });\n }\n },\n\n gml : {\n\n /** TODO : jsdoc block */\n pos : function (node, reverseGeocodedLocation) {\n var pos = __getChildValue(node);\n if (reverseGeocodedLocation && pos) {\n reverseGeocodedLocation.position = {\n x : parseFloat(pos.split(\" \")[0]),\n y : parseFloat(pos.split(\" \")[1])\n };\n }\n }\n },\n\n xlsext : {\n /** TODO : jsdoc block */\n ExtendedGeocodeMatchCode : function (node, reverseGeocodedLocation) {\n if (reverseGeocodedLocation) {\n reverseGeocodedLocation.matchType = __getChildValue(node);\n }\n }\n },\n\n /** TODO : jsdoc block */\n ExceptionReport : function (node) {\n var response = {};\n if (node.hasChildNodes()) {\n var children = node.childNodes;\n var child;\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n if (child.nodeName === \"Exception\") {\n response.exceptionReport = ReverseGeocodeResponseReader.READERS[\"Exception\"](child);\n }\n }\n }\n return response;\n },\n\n /** TODO : jsdoc block */\n Exception : function (node) {\n var exceptionReport = {};\n\n // get exception code\n var exceptionCode = node.getAttribute(\"exceptionCode\");\n if (exceptionCode) {\n exceptionReport.exceptionCode = exceptionCode;\n }\n\n // get exception message\n var textNode = node.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n exceptionReport.exception = textNode.nodeValue;\n }\n\n return exceptionReport;\n }\n\n};\n\n/**\n * Méthode permettant de lancer la lecture d'une réponse XML du service de géocodage,\n * à l'aide des READERS de la classe.\n *\n * @method ReverseGeocodeResponseReader.read\n * @param {DOMElement} root - racine de la réponse XML à lire\n * @return {Object} geocodeResponse|exceptionReport : l'objet contenant les informations de la réponse XML,\n * sous la forme d'un objet GeocodeResponse, ou un objet littéral exceptionReport si le service a renvoyé une exception.\n * @static\n * @memberof ReverseGeocodeResponseReader\n */\nReverseGeocodeResponseReader.read = function (root) {\n if (root.nodeName === \"XLS\") {\n var nsPrefix = root.prefix;\n if (!nsPrefix) {\n nsPrefix = ReverseGeocodeResponseReader.DEFAULTPREFIX;\n }\n var geocodeResponse = ReverseGeocodeResponseReader.READERS[nsPrefix][root.nodeName](root);\n return geocodeResponse;\n } else if (root.nodeName === \"ExceptionReport\") {\n var exceptionReport = ReverseGeocodeResponseReader.READERS[root.nodeName](root);\n return exceptionReport;\n } else {\n throw new Error(\"Erreur lors de la lecture de la réponse : elle n'est pas au format attendu.\");\n }\n};\n\n/**\n * Récupération des attributs d'un noeud élément\n *\n * @private\n * @memberof ReverseGeocodeResponseReader\n * @method __getAttributes\n * @param {DOMElement} node - noeud contenant l'attribut recherché\n * @return {Object} nodeAttributes - objet contenant les noms et valeurs des différents attributs\n */\nfunction __getAttributes (node) {\n if (node.attributes.length > 0) {\n var nodeAttributes = {};\n var attributes = node.attributes;\n for (var i = 0; i < attributes.length; i++) {\n var attribute = attributes[i];\n nodeAttributes[attribute.nodeName] = attribute.nodeValue;\n }\n return nodeAttributes;\n }\n}\n\n/**\n * Récupération des noeuds enfants à partir d'un noeud donné, pour lecture (readNode).\n *\n * @private\n * @memberof ReverseGeocodeResponseReader\n * @method __getChildNodes\n * @param {DOMElement} node - a DOM node\n * @param {Array|Object} [data] - an object to be filled with node data\n */\nfunction __getChildNodes (node, data) {\n if (node.hasChildNodes()) {\n var children = node.childNodes;\n var child;\n var childName;\n var childPrefix;\n\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n\n if (child.nodeType === 1) { // 1 === node.ELEMENT_NODE\n childName = child.localName || child.baseName || child.nodeName;\n childPrefix = child.prefix || ReverseGeocodeResponseReader.DEFAULTPREFIX;\n\n if (ReverseGeocodeResponseReader.READERS[childPrefix][childName]) {\n var reader = ReverseGeocodeResponseReader.READERS[childPrefix][childName];\n reader(child, data);\n } else {\n __getChildNodes(child, data);\n }\n }\n }\n }\n}\n\n/**\n * Lecture de la valeur du premier child d'un noeud, si elle existe.\n *\n * @private\n * @memberof ReverseGeocodeResponseReader\n * @method __getChildValue\n * @param {DOMElement} node - a DOM node\n * @return {String} value - valeur du firstChild du noeud en entrée, ou chaîne vide.\n */\nfunction __getChildValue (node) {\n var textNode;\n var value = \"\";\n\n if (node.hasChildNodes()) {\n textNode = node.firstChild;\n if (textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n value = textNode.nodeValue;\n }\n }\n return value;\n}\n\n/**\n * Vérification des attributs du service, dans la balise XLS de la réponse :\n * version, namespaces, et namespace par défaut doivent correspondre à ceux attendus.\n *\n * @private\n * @memberof ReverseGeocodeResponseReader\n * @method __checkServiceAttributes\n * @param {DOMElement} XLSNode - a DOM node, corresponding to XLS first tag.\n */\nfunction __checkServiceAttributes (XLSNode) {\n if (XLSNode.attributes.length > 0) {\n // on récupère et parcourt les attributs de la balise XLS de la réponse\n var xlsAttributes = __getAttributes(XLSNode);\n for (var att in xlsAttributes) {\n if (xlsAttributes.hasOwnProperty(att)) {\n // vérification de la version\n if (att === \"version\") {\n if (xlsAttributes[\"version\"] !== ReverseGeocodeResponseReader.VERSION) {\n console.log(\"[ReverseGeocodeResponseReader] geocode version is not the expected one : there may be errors in parsing\");\n return;\n }\n }\n\n // on vérifie que l'uri du namespace par défaut est bien celle que l'on attend\n if (att === \"xmlns\") {\n if (xlsAttributes[att] !== ReverseGeocodeResponseReader.NAMESPACES[ReverseGeocodeResponseReader.DEFAULTPREFIX]) {\n console.log(\"[ReverseGeocodeResponseReader] geocode response default namespace is not the expected one\");\n return;\n }\n continue;\n }\n\n var prefix = att.split(\":\")[0];\n var ns = att.split(\":\")[1];\n\n // si on a un autre xmlns, on vérifie aussi les URI\n if (prefix === \"xmlns\" && ns) {\n // si l'attribut correspond à un namespace défini dans le reader\n if (ReverseGeocodeResponseReader.NAMESPACES[ns]) {\n // il faut que les URI correspondent aussi.\n if (ReverseGeocodeResponseReader.NAMESPACES[ns] !== xlsAttributes[att]) {\n console.log(\"[ReverseGeocodeResponseReader] geocode response \" + att + \" namespace is not the expected one\");\n return;\n }\n }\n }\n\n // pour finir on vérifie la localisation du schema XSD du service\n if (ns === \"schemaLocation\") {\n if (ReverseGeocodeResponseReader.SCHEMALOCATION !== xlsAttributes[att]) {\n console.log(\"[ReverseGeocodeResponseReader] geocode response schema location is not the expected one\");\n return;\n }\n }\n }\n }\n }\n}\n\nexport default ReverseGeocodeResponseReader;\n" - }, - { - "id": 82, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoComplete/AutoComplete.js", - "name": "./src/Services/AutoComplete/AutoComplete.js", - "index": 76, - "index2": 76, - "size": 6987, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Services.js", - "issuerId": 45, - "issuerName": "./src/Services/Services.js", - "profile": { - "factory": 513, - "building": 234, - "dependencies": 182 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 45, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Services.js", - "module": "./src/Services/Services.js", - "moduleName": "./src/Services/Services.js", - "type": "harmony import", - "userRequest": "./AutoComplete/AutoComplete", - "loc": "13:0-55" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 3, - "source": "import CommonService from \"../CommonService\";\nimport AutoCompleteResponseFactory from \"./Response/AutoCompleteResponseFactory\";\nimport Logger from \"../../Utils/LoggerByDefault\";\nimport MR from \"../../Utils/MessagesResources\";\nimport Helper from \"../../Utils/Helper\";\nimport ErrorService from \"../../Exceptions/ErrorService\";\n\n/**\n * @classdesc\n * Appel du service d'autocomplétion du Géoportail :\n * envoi de la requête construite selon les paramètres en options,\n * éventuellement parsing et analyse de la réponse,\n * retour d'une réponse en paramètre de la fonction onSuccess.\n * @constructor\n * @extends {Gp.Services.CommonService}\n * @alias Gp.Services.AutoComplete\n *\n * @param {Object} options - options spécifiques au service (+ les options heritées)\n *\n * @param {String} options.text - La chaîne de caractère à compléter.\n * Cette chaîne n'est pas \"URL encodée\".\n * C'est l'API qui s'occupe de l'encoder pour l'inclure dans la requête.\n *\n * @param {Array.} [options.filterOptions.type = \"StreetAddress\"] - Type de l'objet recherché.\n * Le service d'autocomplétion du Géoportail permet de rechercher des toponymes 'PostionOfInterest' et/ou des adresses postales 'StreetAddress'.\n * D'autres types pourront être rajoutés selon l'évolution du service.\n * Par défaut, type = ['StreetAddress'].\n *\n * @param {Array.} [options.filterOptions.territory] - Limitation de la zone de recherche de localisants.\n * Le service d'autocomplétion du Géoportail permet de limiter la recherche à la métropole et la Corse : options.filterOptions.territory = ['METROPOLE'],\n * DOMS TOMS : options.filterOptions.territory = ['DOMTOM'], ou à une liste de départements : options.filterOptions.territory = ['31', '34']\n * Pas de valeur par défaut.\n * La valeur par défaut est donc celle du service.\n * Le service d'autocomplétion du Géoportail renvoie toutes les informations quand aucun territoire n'est spécifié.\n *\n * @param {Number} [options.maximumResponses = 10] - Nombre de réponses maximal que l'on souhaite recevoir.\n * Pas de valeur par défaut.\n * La valeur par défaut sera donc celle du service : 10.\n *\n * @example\n * var options = {\n * // options communes aux services\n * apiKey : null,\n * serverUrl : 'http://localhost/service/',\n * protocol : 'JSONP', // JSONP|XHR\n * proxyURL : null,\n * httpMethod : 'GET', // GET|POST\n * timeOut : 10000, // ms\n * rawResponse : false, // true|false\n * scope : null, // this\n * onSuccess : function (response) {},\n * onFailure : function (error) {},\n * // spécifique au service\n * text : \"\",\n * filterOptions : {\n * type : [\"StreetAddress\"],\n * territory : ['METROPOLE', 'DOMTOM', '31']\n * },\n * maximumResponses : 10\n * };\n * @private\n */\nfunction AutoComplete (options) {\n if (!(this instanceof AutoComplete)) {\n throw new TypeError(MR.getMessage(\"CLASS_CONSTRUCTOR\", \"AutoComplete\"));\n }\n\n /**\n * Nom de la classe (heritage)\n * FIXME instance ou classe ?\n */\n this.CLASSNAME = \"AutoComplete\";\n\n // appel du constructeur par heritage\n CommonService.apply(this, arguments);\n\n this.logger = Logger.getLogger(\"Gp.Services.AutoComplete\");\n this.logger.trace(\"[Constructeur AutoComplete (options)]\");\n\n if (!options.text) {\n throw new Error(MR.getMessage(\"PARAM_MISSING\", \"text\"));\n }\n\n // ajout des options spécifiques au service\n this.options.text = options.text;\n\n // on definit des filtres par defaut\n if (!options.filterOptions || typeof options.filterOptions !== \"object\") {\n this.options.filterOptions = options.filterOptions = {\n territory : [],\n type : [\"StreetAddress\"]\n };\n }\n\n // FIXME ECMAScript 5 support (valable pour un objet uniquement !)\n // ceci permet de tester le cas où : object = {}\n if (Object.keys(options.filterOptions).length === 0) {\n this.options.filterOptions = {\n territory : [],\n type : [\"StreetAddress\"]\n };\n }\n\n this.options.filterOptions.type = options.filterOptions.type || [\"StreetAddress\"];\n this.options.filterOptions.territory = options.filterOptions.territory || [];\n this.options.maximumResponses = options.maximumResponses || 10;\n\n // INFO\n // le service ne repond pas en mode POST (405 Method Not Allowed)\n if (this.options.protocol === \"XHR\" && this.options.httpMethod === \"POST\") {\n this.logger.warn(\"Le service ne gére pas le mode d'interrogation en POST, on bascule sur du GET !\");\n this.options.httpMethod = \"GET\"; // on surcharge !\n }\n\n // attributs d'instances\n\n /**\n * Format forcé de la réponse du service : \"json\"\n * sauf si l'on souhaite une reponse brute (options.rawResponse)\n */\n this.options.outputFormat = (this.options.rawResponse) ? \"\" : \"json\";\n}\n\n/**\n * @lends module:AutoComplete#\n */\n\nAutoComplete.prototype = Object.create(CommonService.prototype, {\n // todo\n // getter/setter\n});\n\n/*\n * Constructeur (alias)\n */\nAutoComplete.prototype.constructor = AutoComplete;\n\n/**\n * (overwrite)\n * Création de la requête\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nAutoComplete.prototype.buildRequest = function (error, success) {\n // ex.\n // http://wxs.ign.fr/CLEF/ols/apis/completion?\n // text=Brie-Comt&\n // type=StreetAddress,PositionOfInterest&\n // territory=METROPOLE&\n // maximumResponses=10\n\n // traitement des param KPV sous forme de tableau\n var territories = \"\";\n if (this.options.filterOptions.territory) {\n territories = this.options.filterOptions.territory.join(\";\");\n }\n\n var types = \"\";\n if (this.options.filterOptions.type) {\n types = this.options.filterOptions.type.join(\",\");\n }\n\n // normalisation de la requete avec param KPV\n this.request = Helper.normalyzeParameters({\n text : encodeURIComponent(this.options.text),\n type : types,\n terr : territories,\n maximumResponses : this.options.maximumResponses\n });\n\n (!this.request)\n ? error.call(this, new ErrorService(MR.getMessage(\"SERVICE_REQUEST_BUILD\")))\n : success.call(this, this.request);\n};\n\n/**\n * (overwrite)\n * Analyse de la reponse\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback de succès de l'analyse de la réponse\n */\nAutoComplete.prototype.analyzeResponse = function (error, success) {\n if (this.response) {\n var options = {\n response : this.response,\n rawResponse : this.options.rawResponse,\n onSuccess : success,\n onError : error,\n scope : this\n };\n\n AutoCompleteResponseFactory.build(options);\n } else {\n error.call(this, new ErrorService(MR.getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n }\n};\n\nexport default AutoComplete;\n" - }, - { - "id": 83, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoComplete/Response/AutoCompleteResponseFactory.js", - "name": "./src/Services/AutoComplete/Response/AutoCompleteResponseFactory.js", - "index": 77, - "index2": 75, - "size": 5903, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoComplete/AutoComplete.js", - "issuerId": 82, - "issuerName": "./src/Services/AutoComplete/AutoComplete.js", - "profile": { - "factory": 185, - "building": 257, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 82, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoComplete/AutoComplete.js", - "module": "./src/Services/AutoComplete/AutoComplete.js", - "moduleName": "./src/Services/AutoComplete/AutoComplete.js", - "type": "harmony import", - "userRequest": "./Response/AutoCompleteResponseFactory", - "loc": "2:0-81" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 4, - "source": "/**\n * Factory pour générer une reponse JSON à partir d'un XML ou d'un JSON\n * (Factory)\n *\n * @module AutoCompleteResponseFactory\n * @private\n * @alias Gp.Services.AutoComplete.Response.AutoCompleteResponseFactory\n */\nimport Logger from \"../../../Utils/LoggerByDefault\";\nimport MRes from \"../../../Utils/MessagesResources\";\nimport ErrorService from \"../../../Exceptions/ErrorService\";\nimport AutoCompleteResponse from \"./model/AutoCompleteResponse\";\nimport SuggestedLocation from \"./model/SuggestedLocation\";\n\nvar AutoCompleteResponseFactory = {\n\n /**\n * interface unique\n *\n * @method build\n * @static\n * @param {Object} options - options definies dans le composant Alti\n *\n * @example\n * var options = {\n * response :\n * outputFormat :\n * rawResponse :\n * scope :\n * onSuccess :\n * onError :\n * };\n *\n */\n build : function (options) {\n // logger\n var logger = Logger.getLogger(\"AutoCompleteResponseFactory\");\n logger.trace([\"AutoCompleteResponseFactory::build()\"]);\n\n var data = null;\n\n if (options.response) {\n if (options.rawResponse) {\n logger.trace(\"analyze response : raw\");\n data = options.response;\n } else {\n var JSONResponse;\n if (typeof options.response === \"string\") {\n JSONResponse = JSON.parse(options.response);\n } else {\n JSONResponse = options.response;\n }\n\n // analyse de la réponse\n if (JSONResponse) {\n // le service renvoie t il une erreur ?\n if (JSONResponse.error) {\n // ex. ?\n options.onError.call(options.scope, new ErrorService({\n message : MRes.getMessage(\"SERVICE_RESPONSE_EXCEPTION\", JSONResponse.error.description),\n status : JSONResponse.error.code,\n type : ErrorService.TYPE_SRVERR\n }));\n return;\n }\n\n // création de l'objet réponse\n data = new AutoCompleteResponse();\n\n // boucle sur les résultats de l'autocomplétion\n if (JSONResponse.results && Array.isArray(JSONResponse.results)) {\n var suggestedLocation;\n\n for (var i = 0; i < JSONResponse.results.length; i++) {\n var result = JSONResponse.results[i];\n suggestedLocation = new SuggestedLocation();\n\n if (suggestedLocation) {\n if (result && result.country === \"StreetAddress\") {\n suggestedLocation.street = result.street;\n suggestedLocation.type = \"StreetAddress\";\n } else if (result && result.country === \"PositionOfInterest\") {\n suggestedLocation.poi = result.street;\n suggestedLocation.kind = result.kind;\n suggestedLocation.type = \"PositionOfInterest\";\n }\n\n if (suggestedLocation.position) {\n suggestedLocation.position.x = result.x;\n suggestedLocation.position.y = result.y;\n }\n\n suggestedLocation.commune = result.city;\n suggestedLocation.fullText = result.fulltext;\n suggestedLocation.postalCode = result.zipcode;\n suggestedLocation.classification = result.classification;\n }\n // Ajout du résultat au tableau reverseGeocodedLocations de geocodedLocation\n data.suggestedLocations.push(suggestedLocation);\n }\n } else {\n options.onError.call(options.scope, new ErrorService(MRes.getMessage(\"SERVICE_RESPONSE_FORMAT_3\")));\n return;\n }\n\n if (!data.suggestedLocations.length) {\n options.onError.call(options.scope, new ErrorService(MRes.getMessage(\"SERVICE_RESPONSE_FORMAT_3\")));\n return;\n }\n }\n\n if (!data) {\n options.onError.call(options.scope, new ErrorService({\n message : MRes.getMessage(\"SERVICE_RESPONSE_ANALYSE_2\"),\n type : ErrorService.TYPE_UNKERR,\n status : -1\n }));\n return;\n }\n\n // Si la réponse contenait une exception renvoyée par le service\n if (data.exceptionReport) {\n options.onError.call(options.scope, new ErrorService({\n message : MRes.getMessage(\"SERVICE_RESPONSE_EXCEPTION\", data.exceptionReport),\n type : ErrorService.TYPE_SRVERR,\n status : 200\n }));\n return;\n }\n }\n } else {\n // si la réponse (xmlString) est vide, on appelle le callback d'erreur\n options.onError.call(options.scope, new ErrorService(MRes.getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n return;\n }\n\n // si tout s'est bien passé, on appelle le callback de succès\n options.onSuccess.call(options.scope, data);\n }\n};\n\nexport default AutoCompleteResponseFactory;\n" - }, - { - "id": 84, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Route.js", - "name": "./src/Services/Route/Route.js", - "index": 80, - "index2": 91, - "size": 11949, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Services.js", - "issuerId": 45, - "issuerName": "./src/Services/Services.js", - "profile": { - "factory": 513, - "building": 291, - "dependencies": 125 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 45, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Services.js", - "module": "./src/Services/Services.js", - "moduleName": "./src/Services/Services.js", - "type": "harmony import", - "userRequest": "./Route/Route", - "loc": "14:0-34" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 3, - "source": "\nimport Logger from \"../../Utils/LoggerByDefault\";\nimport _ from \"../../Utils/MessagesResources\";\nimport ErrorService from \"../../Exceptions/ErrorService\";\nimport CommonService from \"../CommonService\";\nimport DefaultUrlService from \"../DefaultUrlService\";\nimport RouteRequestFactory from \"./Request/RouteRequestFactory\";\nimport RouteResponseFactory from \"./Response/RouteResponseFactory\";\n\n/**\n * @classdesc\n * Appel du service d'itinéraire du Géoportail :\n * envoi de la requête construite selon les paramètres en options,\n * éventuellement parsing et analyse de la réponse,\n * retour d'une réponse en paramètre de la fonction onSuccess.\n *\n * @alias Gp.Services.Route\n * @constructor\n * @extends {Gp.Services.CommonService}\n * @param {Object} options - options spécifiques au service (+ les options heritées)\n *\n * @param {String} [options.api] - Manière d'accéder au service : 'REST' (via l'API REST) ou 'OLS' (via la norme XLS).\n * Par défaut, on utilise l'API REST.\n *\n * @param {String} options.outputFormat - Le format de la réponse du service itineraire : 'xml' ou 'json'.\n * Ce paramètre déterminera l'extension '.xml' ou '.json' du service dans le cas de l'API REST.\n * Nécessaire si serverUrl est renseigné, et qu'on souhaite passer par l'API REST,\n * pour connaître le format dans lequel sera fournie la réponse (pour son traitement).\n * Non nécessaire pour la norme OLS. Par défaut, ce paramètre vaut 'json'.\n *\n * @param {String} [options.routePreference = \"fastest\"] - Mode de calcul à utiliser :\n * - le plus rapide « fastest »\n * - le plus court « shortest »\n * Par défaut : « fastest ».\n *\n * @param {Object} options.startPoint - Point de départ du calcul. Coordonnées exprimées en longitudes, latitudes (EPSG:4326)\n * @param {Float} options.startPoint.x - Abcisse du point de départ du calcul d'itinéraire.\n * @param {Float} options.startPoint.y - Ordonnée du point de départ du calcul d'itinéraire.\n *\n * @param {Object} options.endPoint - Point d'arrivée du calcul. Coordonnées exprimées en longitudes, latitudes (EPSG:4326)\n * @param {Float} options.endPoint.x - Abcisse du point d'arrivée du calcul d'itinéraire.\n * @param {Float} options.endPoint.y - Ordonnée du point d'arrivée du calcul d'itinéraire.\n *\n * @param {Object[]} [options.viaPoints] - Liste de point ({x:Float,y:Float}) intermédaires que l'itinéraire doit emprunter dans l'ordre du tableau.\n * Coordonnées exprimées en longitudes, latitudes (EPSG:4326) :{x:float, y:float}\n *\n * @param {String} [options.graph = \"voiture\"] - Type de graphe utilisé : \"Voiture\" ou \"Pieton\".\n * Détermine le profil de vitesses utilisé pour le calcul ainsi que les tronçons autorisés ou non.\n * Par défaut, c'est la valeur \"Voiture\" qui sera utilisée.\n *\n * @param {String[]} [options.exclusions] - Critères d'exclusions à appliquer pour le calcul. (correspond au paramètre \"avoidFeature\" d'OpenLS)\n * On précise ici le type de tronçons que l'on ne veut pas que l'itinéraire emprunte\n * (valeurs possibles : « toll » (éviter les péages), « bridge », « tunnel »).\n *\n * @param {Boolean} [options.geometryInInstructions = false] - Indique si la géométrie de l'itinéraire doit être reprise morceau par morceau dans les instructions.\n * (correspond au paramètre \"provideGeometry\" d'OpenLS) Par défaut : false.\n *\n * @param {Boolean} [options.provideBbox = true] - Indique si les instructions doivent être localisées par une bbox dans la réponse.\n * Par défaut : true.\n *\n * @param {String} [options.distanceUnit = \"km\"] - Indique si la distance doit être exprimée en km ou m dans la réponse.\n * Par défaut : km.\n *\n * @param {String} [options.srs] - Système de coordonnées dans lequel les paramètres géographiques en entrée et la réponse du service sont exprimés.\n * Pas de valeur par défaut. Si le serveur consulté est celui du Géoportail, la valeur par défaut sera donc celle du service : 'EPSG:4326'.\n *\n * @example\n * var options = {\n * // options communes aux services\n * apiKey : null,\n * serverUrl : 'http://localhost/service/',\n * protocol : 'JSONP', // JSONP|XHR\n * proxyURL : null,\n * httpMethod : 'GET', // GET|POST\n * timeOut : 10000, // ms\n * rawResponse : false, // true|false\n * scope : null, // this\n * onSuccess : function (response) {},\n * onFailure : function (error) {},\n * // spécifique au service\n * api : 'OLS',\n * outputFormat : 'xml',\n * startPoint : {\n * x : 42.1121,\n * y : 1.5557\n * },\n * endPoint : {\n * x : 42.1121,\n * y : 1.5557\n * },\n * provideBbox : false,\n * exclusions : [\"Bridge\", \"Tunnel\", \"Toll\"],\n * distanceUnit : \"km\",\n * graph : \"Voiture\",\n * geometryInInstructions : false,\n * routePreference : \"fastest\"\n * };\n *\n * @private\n */\nfunction Route (options) {\n if (!(this instanceof Route)) {\n throw new TypeError(_.getMessage(\"CLASS_CONSTRUCTOR\", \"Route\"));\n }\n\n /**\n * Nom de la classe (heritage)\n * FIXME instance ou classe ?\n */\n this.CLASSNAME = \"Route\";\n\n // appel du constructeur par heritage\n CommonService.apply(this, arguments);\n\n this.logger = Logger.getLogger(\"Gp.Services.Route\");\n this.logger.trace(\"[Constructeur Route (options)]\");\n\n if (!options.startPoint) {\n throw new Error(_.getMessage(\"PARAM_MISSING\", \"startPoint\"));\n }\n\n // on lance une exception afin d'eviter au service de le faire...\n if (options.startPoint.x === null) {\n throw new Error(_.getMessage(\"PARAM_MISSING\", \"startPoint.x\"));\n }\n\n if (options.startPoint.y === null) {\n throw new Error(_.getMessage(\"PARAM_MISSING\", \"startPoint.y\"));\n }\n\n if (!options.endPoint) {\n throw new Error(_.getMessage(\"PARAM_MISSING\", \"endPoint\"));\n }\n\n // on lance une exception afin d'eviter au service de le faire...\n if (options.endPoint.x === null) {\n throw new Error(_.getMessage(\"PARAM_MISSING\", \"endPoint.x\"));\n }\n\n if (options.endPoint.y === null) {\n throw new Error(_.getMessage(\"PARAM_MISSING\", \"endPoint.y\"));\n }\n\n // options par defaut\n // on passe l'option api en majuscules afin d'éviter des exceptions.\n this.options.api = (typeof options.api === \"string\") ? options.api.toUpperCase() : \"REST\";\n\n // on passe l'option outputFormat en minuscules afin d'éviter des exceptions.\n this.options.outputFormat = (typeof options.outputFormat === \"string\") ? options.outputFormat.toLowerCase() : \"json\";\n\n this.options.startPoint = options.startPoint;\n this.options.endPoint = options.endPoint;\n this.options.viaPoints = options.viaPoints || null; // INFO mapping viaPoints <=> xls:viaPoint\n this.options.exclusions = options.exclusions || null; // INFO mapping exclusions <=> xls:avoidFeature\n this.options.routePreference = options.routePreference || \"fastest\";\n this.options.graph = options.graph || \"Voiture\";\n this.options.geometryInInstructions = options.geometryInInstructions || false; // INFO mapping geometryInInstructions <=> xls:provideGeometry\n this.options.provideBbox = options.provideBbox || true; // INFO mapping provideBbox <=> xls:provideBoundingBox\n this.options.distanceUnit = options.distanceUnit || \"km\";\n this.options.expectedStartTime = null; // FIXME not yet implemented !\n this.options.srs = options.srs || \"EPSG:4326\";\n\n // FIXME : les readers OLS ne sont pas implémentés. on utilise donc l'API REST.\n this.options.api = \"REST\";\n this.logger.warn(\"FIXME : Surcharge option 'api' : REST\");\n if (this.options.protocol === \"XHR\") {\n this.options.httpMethod = \"GET\";\n this.logger.trace(\"Surcharge option 'HttpMethod' : \" + this.options.httpMethod);\n }\n\n // gestion de l'url du service par defaut\n // si l'url n'est pas renseignée, il faut utiliser les urls par defaut\n // en fonction du type d'api, REST ou OLS\n if (!this.options.serverUrl) {\n var lstUrlByDefault = DefaultUrlService.Route.url(this.options.apiKey);\n var urlFound = null;\n switch (this.options.api) {\n case \"OLS\":\n urlFound = lstUrlByDefault.ols;\n break;\n case \"REST\":\n var key = \"route\" + \"-\" + this.options.outputFormat;\n urlFound = lstUrlByDefault[key];\n break;\n default:\n throw new Error(_.getMessage(\"PARAM_UNKNOWN\", \"api\"));\n }\n\n if (!urlFound) {\n throw new Error(\"Url by default not found !\");\n }\n this.options.serverUrl = urlFound;\n this.logger.trace(\"Serveur URL par defaut : \" + this.options.serverUrl);\n }\n\n // gestion du type de service\n // si l'extension de l'url est .json ou .xml, on surcharge le format de sortie (outputFormat)\n var idx = this.options.serverUrl.lastIndexOf(\".\");\n if (idx !== -1) {\n var extension = this.options.serverUrl.substring(idx + 1);\n if (extension && extension.length < 5) { // FIXME extension de moins de 4 car. ...\n this.logger.trace(\"Serveur Extension URL : \" + extension);\n switch (extension.toLowerCase()) {\n case \"json\":\n case \"xml\":\n this.options.outputFormat = extension.toLowerCase();\n break;\n default:\n throw new Error(\"type of service : unknown or unsupported (json or xml) !\");\n }\n }\n }\n}\n\n/**\n * @lends module:Route#\n */\nRoute.prototype = Object.create(CommonService.prototype, {\n // todo\n // getter/setter\n});\n\n/*\n * Constructeur (alias)\n */\nRoute.prototype.constructor = Route;\n\n/**\n * (overwrite)\n * Création de la requête\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nRoute.prototype.buildRequest = function (error, success) {\n var options = {\n // spécifique au service\n api : this.options.api,\n startPoint : this.options.startPoint,\n endPoint : this.options.endPoint,\n viaPoints : this.options.viaPoints,\n provideBbox : this.options.provideBbox,\n exclusions : this.options.exclusions,\n distanceUnit : this.options.distanceUnit,\n graph : this.options.graph,\n geometryInInstructions : this.options.geometryInInstructions,\n routePreference : this.options.routePreference,\n srs : this.options.srs\n };\n\n this.request = RouteRequestFactory.build(options);\n\n // on teste si la requete a bien été construite !\n if (!this.request) {\n error.call(this, new ErrorService(_.getMessage(\"SERVICE_REQUEST_BUILD\")));\n } else {\n success.call(this, this.request);\n }\n};\n\n/**\n * (overwrite)\n * Analyse de la reponse\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nRoute.prototype.analyzeResponse = function (error, success) {\n // INFO\n // Factory pour masquer la complexité du retour du service qui renvoie soit\n // - une 'string' qui contient du XML ou JSON natif en mode XHR\n // - un objet JSON qui est natif ou encapsulé\n\n if (this.response) {\n var options = {\n distanceUnit : this.options.distanceUnit, // FIXME ce parametre nous permet de choisir le type d'unité dans la reponse !\n response : this.response,\n outputFormat : this.options.outputFormat, // utile pour parser la string en mode XHR : JSON ou XML !\n api : this.options.api, // utile de connaitre le type d'API car la reponse est differente !\n rawResponse : this.options.rawResponse,\n onError : error,\n onSuccess : success,\n scope : this\n };\n\n RouteResponseFactory.build(options);\n } else {\n error.call(this, new ErrorService(_.getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n }\n};\n\nexport default Route;\n" - }, - { - "id": 85, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Request/RouteRequestFactory.js", - "name": "./src/Services/Route/Request/RouteRequestFactory.js", - "index": 81, - "index2": 84, - "size": 3550, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Route.js", - "issuerId": 84, - "issuerName": "./src/Services/Route/Route.js", - "profile": { - "factory": 129, - "building": 469, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 84, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Route.js", - "module": "./src/Services/Route/Route.js", - "moduleName": "./src/Services/Route/Route.js", - "type": "harmony import", - "userRequest": "./Request/RouteRequestFactory", - "loc": "7:0-64" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 4, - "source": "/**\n * Creation d'une requête OpenLS ou REST en mode POST ou GET\n * (Factory)\n *\n * @module RouteRequestFactory\n * @alias Gp.Services.Route.Request.RouteRequestFactory\n * @private\n */\nimport Logger from \"../../../Utils/LoggerByDefault\";\nimport ErrorService from \"../../../Exceptions/ErrorService\";\nimport RouteRequestOLS from \"./RouteRequestOLS\";\nimport RouteRequestREST from \"./RouteRequestREST\";\n\nvar RouteRequestFactory = {\n\n /**\n * interface unique\n *\n * @method build\n * @static\n * @param {Object} options - options definies dans le composant Route\n *\n * @example\n * // utilisation avec les callback\n * var options = {\n * (...)\n * onSuccess : function (response) {},\n * onError : function (error) {},\n * // spécifique au service\n * api : 'OLS',\n * startPoint : {\n * x : 42.1121,\n * y : 1.5557\n * },\n * endPoint : {\n * x : 42.1121,\n * y : 1.5557\n * },\n * provideBbox : false,\n * exclusions : [\"Bridge\", \"Tunnel\", \"Toll\"],\n * distanceUnit : \"km\",\n * graph : \"Voiture\",\n * geometryInInstructions : false,\n * routePreference : \"fastest\"\n * };\n * RouteRequestFactory.build(options);\n *\n * // utilisation sans callback\n * var options = {...};\n * try {\n * var result = RouteRequestFactory.build(options);\n * if (! result) { throw new Error(\"...\"):}\n * } catch (e) {\n * // todo\n * }\n * @returns {String} request\n */\n build : function (options) {\n // logger\n var logger = Logger.getLogger(\"RouteRequestFactory\");\n logger.trace([\"RouteRequestFactory::build()\"]);\n\n var request = null;\n\n var settings = options || {};\n\n // gestion des callback\n var bOnError = !!((options.onError !== null && typeof options.onError === \"function\"));\n\n var message = null;\n // choix entre les 2 types d'API pour consulter le service\n switch (options.api) {\n case \"REST\":\n // FIXME les exceptions ne sont pas 'catchées' sur le constructeur !\n var myReq = new RouteRequestREST(settings);\n if (!myReq.processRequestString()) {\n message = \"Error process request (rest) !\";\n if (bOnError) {\n options.onError.call(options.scope, new ErrorService(message));\n return;\n }\n throw new Error(message);\n }\n request = myReq.requestString;\n break;\n case \"OLS\":\n request = RouteRequestOLS.build(settings);\n if (!request) {\n message = \"Error process request (ols) !\";\n if (bOnError) {\n options.onError.call(options.scope, new ErrorService(message));\n return;\n }\n throw new Error(message);\n }\n break;\n default:\n message = \"Type of API is not supported by service (REST or OLS) !\";\n if (bOnError) {\n options.onError.call(options.scope, new ErrorService(message));\n return;\n }\n throw new Error(message);\n }\n\n return request;\n }\n};\n\nexport default RouteRequestFactory;\n" - }, - { - "id": 86, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Request/RouteRequestOLS.js", - "name": "./src/Services/Route/Request/RouteRequestOLS.js", - "index": 82, - "index2": 81, - "size": 2555, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Request/RouteRequestFactory.js", - "issuerId": 85, - "issuerName": "./src/Services/Route/Request/RouteRequestFactory.js", - "profile": { - "factory": 76, - "building": 708, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 85, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Request/RouteRequestFactory.js", - "module": "./src/Services/Route/Request/RouteRequestFactory.js", - "moduleName": "./src/Services/Route/Request/RouteRequestFactory.js", - "type": "harmony import", - "userRequest": "./RouteRequestOLS", - "loc": "11:0-48" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "/**\n * Creation d'une requête OpenLS en mode POST ou GET\n * (Factory)\n *\n * @module RouteRequestOLS\n * @alias Gp.Services.Route.Request.RouteRequestOLS\n * @private\n */\nimport Logger from \"../../../Utils/LoggerByDefault\";\nimport XLS from \"../../../Formats/XLS\";\nimport RouteService from \"../../../Formats/XLS/RouteService\";\n\nvar RouteRequestOLS = {\n\n /**\n * interface unique\n *\n * @method build\n * @static\n * @param {Object} options - options definies dans le composant Route\n *\n * @example\n * var options = {\n * (...)\n * };\n *\n * @returns {String} request\n */\n build : function (options) {\n // logger\n var logger = Logger.getLogger(\"RouteRequestOLS\");\n logger.trace([\"RouteRequestOLS::build()\"]);\n\n var request = null;\n\n // spécifique au service\n var settings = {\n startPoint : options.startPoint,\n endPoint : options.endPoint,\n viaPoint : options.viaPoints, // mapping OLS et options\n provideBoundingBox : options.provideBbox, // mapping OLS et options\n avoidFeature : options.exclusions, // mapping OLS et options\n expectedStartTime : options.expectedStartTime, // TODO format ?\n distanceUnit : options.distanceUnit,\n graph : options.graph,\n provideGeometry : options.geometryInInstructions, // mapping OLS et options\n routePreference : options.routePreference\n };\n\n // objet RouteService\n var oRS = new RouteService(settings);\n\n // Format XLS\n var oXLS = new XLS({\n srsName : options.srs,\n maximumResponses : options.maximumResponses\n });\n oXLS.namespace = true;\n oXLS.setService(oRS);\n\n // request brute !\n request = oXLS.build();\n\n // en mode GET, la requête est encodée\n // et le param. 'qxml' est ajouté\n if (options.httpMethod === \"GET\") {\n var myRequest = \"qxml=\" +\n encodeURIComponent(request)\n .replace(/-/g, \"%2D\")\n .replace(/_/g, \"%5F\")\n .replace(/\\./g, \"%2E\")\n .replace(/!/g, \"%21\")\n .replace(/~/g, \"%7E\")\n .replace(/\\*/g, \"%2A\")\n .replace(/'/g, \"%27\")\n .replace(/\\(/g, \"%28\")\n .replace(/\\)/g, \"%29\");\n request = myRequest;\n }\n\n return request;\n }\n};\n\nexport default RouteRequestOLS;\n" - }, - { - "id": 87, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/RouteService.js", - "name": "./src/Formats/XLS/RouteService.js", - "index": 83, - "index2": 80, - "size": 10347, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Request/RouteRequestOLS.js", - "issuerId": 86, - "issuerName": "./src/Services/Route/Request/RouteRequestOLS.js", - "profile": { - "factory": 289, - "building": 200, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 86, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Request/RouteRequestOLS.js", - "module": "./src/Services/Route/Request/RouteRequestOLS.js", - "moduleName": "./src/Services/Route/Request/RouteRequestOLS.js", - "type": "harmony import", - "userRequest": "../../../Formats/XLS/RouteService", - "loc": "11:0-61" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 6, - "source": "import Logger from \"../../Utils/LoggerByDefault\";\nimport AbstractService from \"./AbstractService\";\nimport DetermineRouteRequest from \"./RouteService/DetermineRouteRequest\";\nimport RouteRequestExtension from \"./RouteService/RouteRequestExtension\";\n\n/**\n * @classdesc\n *\n * Requête de type RouteService\n * (Factory)\n *\n * XSD :\n * ----\n * [] => non implementé !\n *\n * ```\n * element name=\"DetermineRouteRequest\"\n * [attribute name=\"provideRouteHandle\" default=\"false\"]\n * attribute name=\"distanceUnit\" default=\"M\"\n * [element ref=\"xls:RouteHandle\" || element ref=\"xls:RoutePlan\"]\n * element ref=\"xls:RoutePlan\"\n * element ref=\"xls:RouteInstructionsRequest\"\n * [element ref=\"xls:RouteGeometryRequest\"]\n * [element ref=\"xls:RouteMapRequest\"]\n * ```\n * ```\n * element name=\"RoutePlan\"\n * [attribute name=\"useRealTimeTraffic\" default=\"false\"]\n * [attribute name=\"expectedStartTime\" type=\"dateTime\"]\n * [attribute name=\"expectedEndTime\" type=\"dateTime\"]\n * element ref=\"xls:RoutePreference\"\n * element ref=\"xls:WayPointList\"\n * element ref=\"xls:AvoidList\"\n * ```\n * ```\n * element name=\"RoutePreference\" => value = Fastest | Shortest | Pedestrian\n * ```\n * ```\n * element name=\"WayPointList\"\n * element ref=\"xls:StartPoint\"\n * element ref=\"xls:ViaPoint\" minOccurs=\"0\"\n * element ref=\"xls:EndPoint\"\n * ```\n * ```\n * element name=\"StartPoint\"\n * [element name=\"GeocodeMatchCode\"]\n * [attribute name=\"accuracy\"]\n * [attribute name=\"matchType\"] => value = City, Street, Street number, Street enhanced, ...\n * element name=\"Position\"\n * element ref=\"gml:Point\"\n * ```\n * ```\n * element name=\"ViaPoint\"\n * [element name=\"GeocodeMatchCode\"]\n * [attribute name=\"accuracy\"]\n * [attribute name=\"matchType\"] => value = City, Street, Street number, Street enhanced, ...\n * element name=\"Position\"\n * element ref=\"gml:Point\"\n * ```\n * ```\n * element name=\"EndPoint\"\n * [element name=\"GeocodeMatchCode\"]\n * [attribute name=\"accuracy\"]\n * [attribute name=\"matchType\"] => value = City, Street, Street number, Street enhanced, ...\n * element name=\"Position\"\n * element ref=\"gml:Point\"\n * ```\n * ```\n * element name=\"AvoidList\"\n * [element ref=\"xls:AOI\"]\n * [element ref=\"xls:_Location\"] (cf. element name=\"Position\")\n * element ref=\"xls:AvoidFeature\"\n * ```\n * ```\n * [element name=\"AOI\"]\n * [element ref=\"gml:CircleByCenterPoint\" || element ref=\"gml:Polygon\" || element ref=\"gml:Envelope\"]\n * ```\n * ```\n * element name=\"AvoidFeature\" => value = highway | tollway | tunnel | bridge\n * ```\n * ```\n * [element name=\"RouteMapRequest\"]\n * [element name=\"Output\"]\n * attribute name=\"width\"\n * attribute name=\"height\"\n * attribute name=\"format\"\n * attribute name=\"BGcolor\"\n * attribute name=\"transparent\"\n * attribute name=\"style\" => value = Overview | Maneuver\n * element name=\"BBoxContext\" type=\"gml:EnvelopeType\"\n * ```\n * ```\n * element name=\"RouteInstructionsRequest\"\n * [attribute name=\"format\"] default=\"text/plain\"\n * attribute name=\"provideGeometry\" default=\"false\"\n * attribute name=\"provideBoundingBox\" default=\"false\"\n * ```\n * ```\n * [element name=\"RouteGeometryRequest\"]\n * [attribute name=\"scale\"] default=\"1\"\n * [attribute name=\"provideStartingPortion\"] default=\"false\"\n * [attribute name=\"maxPoints\"] default=\"100\"\n * [element name=\"BoundingBox\" type=\"gml:EnvelopeType\" ]\n * ```\n *\n * --------\n * Requête :\n * --------\n * ```\n * \n * \n * \n * \n * \n * \n * Fastest\n * \n * \n * \n * 2.29993 48.87228\n * \n * \n * -1.53604 47.21548\n * \n * \n * \n * \n * \n * \n * \n * non implementé !\n *\n * ```\n * element name=\"DetermineRouteRequest\"\n * [attribute name=\"provideRouteHandle\" default=\"false\"]\n * attribute name=\"distanceUnit\" default=\"M\"\n * [element ref=\"xls:RouteHandle\" || element ref=\"xls:RoutePlan\"]\n * element ref=\"xls:RoutePlan\"\n * element ref=\"xls:RouteInstructionsRequest\"\n * [element ref=\"xls:RouteGeometryRequest\"]\n * [element ref=\"xls:RouteMapRequest\"]\n * ```\n * ```\n * element name=\"RouteInstructionsRequest\"\n * [attribute name=\"format\"] default=\"text/plain\"\n * attribute name=\"provideGeometry\" default=\"false\"\n * attribute name=\"provideBoundingBox\" default=\"false\"\n * ```\n * ```\n * element name=\"RouteGeometryRequest\"\n * [attribute name=\"scale\"] default=\"1\"\n * [attribute name=\"provideStartingPortion\"] default=\"false\"\n * [attribute name=\"maxPoints\"] default=\"100\"\n * [element name=\"BoundingBox\" type=\"gml:EnvelopeType\" ]\n * ```\n * ```\n * [element name=\"RouteMapRequest\"]\n * [element name=\"Output\"]\n * [attribute name=\"width\"]\n * [attribute name=\"height\"]\n * [attribute name=\"format\"]\n * [attribute name=\"BGcolor\"]\n * [attribute name=\"transparent\"]\n * [attribute name=\"style\"] => value = Overview | Maneuver\n * [element name=\"BBoxContext\" type=\"gml:EnvelopeType\"]\n * ```\n *\n * --------\n * Requête :\n * --------\n * ```\n * \n * \n * Fastest\n * \n * \n * \n * 2.29993 48.87228\n * \n * \n * -1.53604 47.21548\n * \n * \n * \n * \n * \n * \n * ```\n *\n * @constructor\n * @alias Gp.Formats.XLS.RouteService.DetermineRouteRequest\n * @param {Object} options - options\n * @param {Object} options.route.routePreference - « fastest », « shortest » ou « pedestrian »\n * @param {String} options.route.startPoint - Point de départ (coordonnées exprimées en WGS84G)\n * @param {String} options.route.viaPoint - Liste de points intermédiaires\n * @param {String} options.route.endPoint - Point d'arrivée (coordonnées)\n * @param {Object} options.route.avoidFeature - « highway », « tollway », « tunnel » ou « bridge »\n * @param {Object} options.route.vehicle - « car »\n * @param {Object} options.route.expectedStartTime - Date et heure de départ\n * @param {Object} options.provideGeometry - true | false\n * @param {Object} options.provideBoundingBox - true | false\n * @param {Object} options.distanceUnit - Unité dans lesquelles la distance est exprimée (« m » ou « km »)\n * @param {Function} options.onsuccess - function callback success (TODO)\n * @param {Function} options.onerror - function callback error (TODO)\n *\n * @private\n */\nfunction DetermineRouteRequest (options) {\n this.logger = Logger.getLogger();\n this.logger.trace(\"[Constructeur DetermineRouteRequest ()]\");\n\n if (!(this instanceof DetermineRouteRequest)) {\n throw new TypeError(\"DetermineRouteRequest constructor cannot be called as a function.\");\n }\n\n // options par defaut\n this.options = options || {};\n\n // et on ajoute les options en paramètre aux options par défaut\n for (var opt in options) {\n if (options.hasOwnProperty(opt)) {\n this.options[opt] = options[opt];\n }\n }\n\n /**\n * Nom de la classe (heritage)\n */\n this.CLASSNAME = \"DetermineRouteRequest\";\n}\n\nDetermineRouteRequest.prototype = {\n\n /**\n * @lends module:DetermineRouteRequest#\n */\n\n /**\n * request (out)\n * @type {String}\n */\n strRequest : null,\n\n /**\n * RoutePlan\n * @type {Address}\n */\n oRoutePlan : null,\n\n /**\n * Template de la requête.\n * substitution des valeurs suivantes :\n * __DISTANCEUNIT__,\n * __ROUTEPLAN__, __ROUTEINSTRUCTIONREQUEST__, __ROUTEGEOMETRYREQUEST__, __ROUTEMAPREQUEST__\n * __PROVIDEGEOMETRY__, __PROVIDEBBOX__\n */\n template : {\n determineRouteRequest : \"\" +\n \"__ROUTEPLAN__\" +\n \"__ROUTEINSTRUCTIONREQUEST__\" +\n \"__ROUTEGEOMETRYREQUEST__\" +\n \"__ROUTEMAPREQUEST__\" +\n \"\",\n routeInstructionRequest : \"\",\n routeGeometryRequest : \"\",\n routeMapRequest : \"\" // FIXME not yet implemented !\n },\n\n /**\n * Ajout d'un objet de type RoutePlan\n *\n * @param {Object} oRoutePlan - RoutePlan\n */\n addRoute : function (oRoutePlan) {\n if (oRoutePlan instanceof RoutePlan) {\n this.oRoutePlan = oRoutePlan;\n }\n },\n\n /**\n * Constructeur (alias)\n */\n constructor : DetermineRouteRequest,\n\n /**\n * toString\n *\n * @returns {String} requête\n */\n toString : function () {\n var template = \"\";\n template = this.template.determineRouteRequest;\n template = template.replace(/__DISTANCEUNIT__/g, this.options.distanceUnit || \"KM\");\n\n // soit on a déjà un objet RoutePlan instancié,\n // sinon, on le fabrique via les options\n if (!this.oRoutePlan) {\n var settings = this.options.route;\n\n this.oRoutePlan = new RoutePlan(settings);\n if (!this.oRoutePlan) {\n throw new Error(\"La construction du calcul d'initineraire n'est pas correctement definie !?\");\n }\n }\n\n // routeplan\n template = template.replace(/__ROUTEPLAN__/g, this.oRoutePlan.toString());\n\n // instruction\n var tmplInstruction = this.template.routeInstructionRequest;\n tmplInstruction = tmplInstruction.replace(/__PROVIDEGEOMETRY__/g, this.options.provideGeometry || false);\n tmplInstruction = tmplInstruction.replace(/__PROVIDEBBOX__/g, this.options.provideBoundingBox || false);\n template = template.replace(/__ROUTEINSTRUCTIONREQUEST__/g, tmplInstruction);\n\n // geometry\n var tmplGeometry = this.template.routeGeometryRequest;\n template = template.replace(/__ROUTEGEOMETRYREQUEST__/g, tmplGeometry);\n\n // map\n var tmplMap = this.template.routeMapRequest;\n template = template.replace(/__ROUTEMAPREQUEST__/g, tmplMap);\n\n this.strRequest = template;\n return this.strRequest;\n }\n};\n\nexport default DetermineRouteRequest;\n" - }, - { - "id": 89, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/RouteService/model/RoutePlan.js", - "name": "./src/Formats/XLS/RouteService/model/RoutePlan.js", - "index": 85, - "index2": 77, - "size": 9112, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/RouteService/DetermineRouteRequest.js", - "issuerId": 88, - "issuerName": "./src/Formats/XLS/RouteService/DetermineRouteRequest.js", - "profile": { - "factory": 110, - "building": 38, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 88, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/RouteService/DetermineRouteRequest.js", - "module": "./src/Formats/XLS/RouteService/DetermineRouteRequest.js", - "moduleName": "./src/Formats/XLS/RouteService/DetermineRouteRequest.js", - "type": "harmony import", - "userRequest": "./model/RoutePlan", - "loc": "2:0-42" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 8, - "source": "import Logger from \"../../../../Utils/LoggerByDefault\";\n\n/**\n * @classdesc\n * * Élément regroupant l'ensemble des données et paramètres pour le calcul d'itinéraire : points de navigation, configuration.\n *\n * ----\n * XSD :\n * ----\n * [] => non implementé !\n *\n * ```\n * element name=\"RoutePlan\"\n * [attribute name=\"useRealTimeTraffic\" default=\"false\"]\n * [attribute name=\"expectedStartTime\" type=\"dateTime\"]\n * [attribute name=\"expectedEndTime\" type=\"dateTime\"]\n * element ref=\"xls:RoutePreference\"\n * element ref=\"xls:WayPointList\"\n * element ref=\"xls:AvoidList\"\n * ```\n * ```\n * element name=\"RoutePreference\"\n * => value = fastest | shortest | pedestrian\n * ```\n * ```\n * element name=\"WayPointList\"\n * element ref=\"xls:StartPoint\"\n * element ref=\"xls:ViaPoint\" minOccurs=\"0\"\n * element ref=\"xls:EndPoint\"\n * ```\n * ```\n * element name=\"StartPoint\"\n * [element name=\"GeocodeMatchCode\"]\n * [attribute name=\"accuracy\"]\n * [attribute name=\"matchType\"] => value = City, Street, Street number, Street enhanced, ...\n * element name=\"Position\"\n * element ref=\"gml:Point\"\n * ```\n * ```\n * element name=\"ViaPoint\"\n * [element name=\"GeocodeMatchCode\"]\n * [attribute name=\"accuracy\"]\n * [attribute name=\"matchType\"] => value = City, Street, Street number, Street enhanced, ...\n * element name=\"Position\"\n * element ref=\"gml:Point\"\n * ```\n * ```\n * element name=\"EndPoint\"\n * [element name=\"GeocodeMatchCode\"]\n * [attribute name=\"accuracy\"]\n * [attribute name=\"matchType\"] => value = City, Street, Street number, Street enhanced, ...\n * element name=\"Position\"\n * element ref=\"gml:Point\"\n * ```\n * ```\n * element name=\"AvoidList\"\n * [element ref=\"xls:AOI\"]\n * [element ref=\"xls:_Location\"] (cf. element name=\"Position\")\n * element ref=\"xls:AvoidFeature\"\n * ```\n * ```\n * [element name=\"AOI\"]\n * [element ref=\"gml:CircleByCenterPoint\" || element ref=\"gml:Polygon\" || element ref=\"gml:Envelope\"]\n * ```\n * ```\n * element name=\"AvoidFeature\" => value = highway | tollway | tunnel | bridge\n * ```\n *\n * --------\n * Requête :\n * --------\n * ```\n * \n * Fastest\n * \n * \n * \n * 2.29993 48.87228\n * \n * \n * -1.53604 47.21548\n * \n * \n * \n * highway\n * tollway\n * tunnel\n * \n * \n * ```\n * @constructor\n * @alias Gp.Formats.XLS.RouteService.RoutePlan\n * @param {Object} options - options\n *\n * @private\n */\nfunction RoutePlan (options) {\n this.logger = Logger.getLogger(\"RoutePlan\");\n this.logger.trace(\"[Constructeur RoutePlan ()]\");\n\n if (!(this instanceof RoutePlan)) {\n throw new TypeError(\"RoutePlan constructor cannot be called as a function.\");\n }\n\n // param par defaut\n this.options = options || {};\n\n // param obligatoire\n if (!options.startPoint) {\n throw new Error(\"l'option 'startPoint' n'est pas renseignée !\");\n }\n\n if (!options.endPoint) {\n throw new Error(\"l'option 'endPoint' n'est pas renseignée !\");\n }\n\n // et on ajoute les options en paramètre aux options par défaut\n for (var opt in options) {\n if (options.hasOwnProperty(opt)) {\n this.options[opt] = options[opt];\n }\n }\n}\n\nRoutePlan.prototype = {\n\n /**\n * Constructeur (alias)\n */\n constructor : RoutePlan,\n\n /**\n * request (out)\n * @type {String}\n */\n requestString : null,\n\n /**\n * Template de la requête.\n * substitution des valeurs suivantes :\n * - __ROUTEPREFERENCE__, __VALUEROUTEPREFERENCE__\n * - __GRAPH__, __VALUEGRAPH__\n * - __WAYPOINTLIST__ (lst?), __STARTPOINT__, __VIAPOINT__, __ENDPOINT__, __POINT__, __X__, __Y__\n * - __AVOIDLIST__ (lst!), __AVOIDFEATURE__, __VALUEAVOIDFEATURE__\n */\n template : {\n routePlan : \"\" +\n \"__ROUTEPREFERENCE__\" +\n \"__GRAPH__\" +\n \"__WAYPOINTLIST__\" +\n \"__AVOIDLIST__\" +\n \"\",\n routePreference : \"__VALUEROUTEPREFERENCE__\",\n graph : \"\",\n wayPointList : {\n container : \"\" +\n \"__STARTPOINT__\" +\n \"__VIAPOINT__\" +\n \"__ENDPOINT__\" +\n \"\",\n point : \"__X__ __Y__\",\n startPoint : \"\" +\n \"__POINT__\" +\n \"\",\n endPoint : \"\" +\n \"__POINT__\" +\n \"\",\n viaPoint : \"\" +\n \"__POINT__\" +\n \"\" // implémentation de plusieurs étapes...\n },\n avoidList : {\n container : \"\" +\n \"__AVOIDFEATURE__\" +\n \"\",\n avoidFeature : \"__VALUEAVOIDFEATURE__\"\n }\n },\n\n /**\n * toString\n *\n * @returns {String} requête\n */\n toString : function () {\n var template = \"\";\n template = this.template.routePlan;\n\n // preference\n if (this.options.routePreference) {\n var tmplPreference = this.template.routePreference;\n tmplPreference = tmplPreference.replace(/__VALUEROUTEPREFERENCE__/, this.options.routePreference);\n template = template.replace(/__ROUTEPREFERENCE__/g, tmplPreference);\n }\n // clean preference\n template = template.replace(/__ROUTEPREFERENCE__/g, \"\");\n\n // exclusions\n if (this.options.avoidFeature) {\n var tmplAvoidList = this.template.avoidList.container;\n var avoidFeatures = [];\n for (var i = 0; i < this.options.avoidFeature.length; i++) {\n var tmplAvoidFeature = this.template.avoidList.avoidFeature;\n tmplAvoidFeature = tmplAvoidFeature.replace(/__VALUEAVOIDFEATURE__/, this.options.avoidFeature[i]);\n avoidFeatures.push(tmplAvoidFeature);\n }\n tmplAvoidList = tmplAvoidList.replace(/__AVOIDFEATURE__/, avoidFeatures.join(\"\\n\"));\n template = template.replace(/__AVOIDLIST__/g, tmplAvoidList);\n }\n // clean exclusions\n template = template.replace(/__AVOIDLIST__/g, \"\");\n\n // graph\n if (this.options.graph) {\n var tmplVehicle = this.template.graph;\n tmplVehicle = tmplVehicle.replace(/__VALUEGRAPH__/, this.options.graph);\n template = template.replace(/__GRAPH__/g, tmplVehicle);\n }\n // clean vehicle\n template = template.replace(/__GRAPH__/g, \"\");\n\n // points\n var tmplWayPointList = this.template.wayPointList.container;\n var tmplPoint = \"\";\n // start\n tmplPoint = this.template.wayPointList.point;\n tmplPoint = tmplPoint.replace(/__X__/, this.options.startPoint.x);\n tmplPoint = tmplPoint.replace(/__Y__/, this.options.startPoint.y);\n tmplWayPointList = tmplWayPointList.replace(/__STARTPOINT__/,\n this.template.wayPointList.startPoint.replace(/__POINT__/, tmplPoint));\n // end\n tmplPoint = this.template.wayPointList.point;\n tmplPoint = tmplPoint.replace(/__X__/, this.options.endPoint.x);\n tmplPoint = tmplPoint.replace(/__Y__/, this.options.endPoint.y);\n tmplWayPointList = tmplWayPointList.replace(/__ENDPOINT__/,\n this.template.wayPointList.endPoint.replace(/__POINT__/, tmplPoint));\n // via\n if (this.options.viaPoint) {\n var points = [];\n for (var j = 0; j < this.options.viaPoint.length; j++) {\n var p = this.options.viaPoint[j];\n tmplPoint = this.template.wayPointList.point;\n tmplPoint = tmplPoint.replace(/__X__/, p.x);\n tmplPoint = tmplPoint.replace(/__Y__/, p.y);\n points.push(tmplPoint);\n }\n\n tmplWayPointList = tmplWayPointList.replace(/__VIAPOINT__/,\n this.template.wayPointList.viaPoint.replace(/__POINT__/, points.join(\"\\n\")));\n } else {\n // clean viaPoint\n tmplWayPointList = tmplWayPointList.replace(/__VIAPOINT__/, \"\");\n }\n\n template = template.replace(/__WAYPOINTLIST__/g, tmplWayPointList);\n\n this.requestString = template;\n return this.requestString;\n }\n};\n\nexport default RoutePlan;\n" - }, - { - "id": 90, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/RouteService/RouteRequestExtension.js", - "name": "./src/Formats/XLS/RouteService/RouteRequestExtension.js", - "index": 86, - "index2": 79, - "size": 307, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/RouteService.js", - "issuerId": 87, - "issuerName": "./src/Formats/XLS/RouteService.js", - "profile": { - "factory": 71, - "building": 6 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 87, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/RouteService.js", - "module": "./src/Formats/XLS/RouteService.js", - "moduleName": "./src/Formats/XLS/RouteService.js", - "type": "harmony import", - "userRequest": "./RouteService/RouteRequestExtension", - "loc": "4:0-73" - } - ], - "usedExports": [ - "default" - ], - "providedExports": null, - "optimizationBailout": [], - "depth": 7, - "source": "/**\n * not implemented !\n *\n * Extension de type 'graphName' de l'objet RoutePlan'\n *\n * FIXME L'extension 'graphName' est intégré comme étant du standard OLS.\n * La balise viendrait surcharger le comportement de RoutePreference...\n *\n * ex. \n */\n" - }, - { - "id": 91, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Request/RouteRequestREST.js", - "name": "./src/Services/Route/Request/RouteRequestREST.js", - "index": 87, - "index2": 83, - "size": 2617, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Request/RouteRequestFactory.js", - "issuerId": 85, - "issuerName": "./src/Services/Route/Request/RouteRequestFactory.js", - "profile": { - "factory": 77, - "building": 768, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 85, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Request/RouteRequestFactory.js", - "module": "./src/Services/Route/Request/RouteRequestFactory.js", - "moduleName": "./src/Services/Route/Request/RouteRequestFactory.js", - "type": "harmony import", - "userRequest": "./RouteRequestREST", - "loc": "12:0-50" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "\nimport Logger from \"../../../Utils/LoggerByDefault\";\nimport _ from \"../../../Utils/MessagesResources\";\nimport RouteParamREST from \"./model/RouteParamREST\";\n\n/**\n * @classdesc\n * Classe de gestion des requêtes de type REST sur le service de calcul d'itineraire\n * (uniquement en GET)\n *\n * @constructor\n * @alias Gp.Services.Route.Request.RouteRequestREST\n * @param {Object} options - options definies dans le composant Route\n *\n * @example\n * var options = {\n * (...)\n * };\n *\n * @private\n */\nfunction RouteRequestREST (options) {\n this.logger = Logger.getLogger(\"RouteRequestREST\");\n this.logger.trace(\"[Constructeur RouteRequestREST ()]\");\n\n if (!(this instanceof RouteRequestREST)) {\n throw new TypeError(\"RouteRequestREST constructor cannot be called as a function.\");\n }\n\n // existance des options\n if (!options) {\n throw new Error(_.getMessage(\"PARAM_EMPTY\", \"options\"));\n }\n\n /** liste des options */\n this.settings = options;\n}\n\nRouteRequestREST.prototype = {\n\n /**\n * @lends module:RouteRequestREST#\n */\n\n /**\n * request\n * @type {String}\n */\n requestString : null,\n\n /**\n * Constructeur (alias)\n */\n constructor : RouteRequestREST,\n\n /**\n * Construction de la requête.\n *\n * @example\n * // GET out : origin=2.416907353809513,48.8465772142297&destination=2.4248037771493673,48.84591353161838\n * // POST out : Not yet supported method POST !\n * @returns {String} request\n */\n processRequestString : function () {\n // INFO\n // construction simple sans template...,\n // mais en attendant que les services soient fixés, on taggue ce composant en mode PROTOTYPE !\n this.logger.warn(\"FIXME : PROTOTYPE !\");\n\n // Mapping des options avec le service de l'API REST\n var oParams = new RouteParamREST(this.settings);\n var params = oParams.getParams();\n\n var request = \"\";\n for (var i = 0; i < params.length; i++) {\n var o = params[i];\n if (request) {\n request += \"&\";\n }\n request += o.k + \"=\" + o.v;\n }\n\n // Exemple :\n // http://wxs.ign.fr/KEY/itineraire/rest/route.json?\n // origin=&\n // destination=&\n // waypoints=&\n // method=DISTANCE&\n // graph=Pieton&\n // graphName=Pieton&\n // exclusions=&\n // tolerance=10&\n // srs=\n\n this.logger.trace(request);\n this.requestString = request;\n\n return this.requestString;\n }\n};\n\nexport default RouteRequestREST;\n" - }, - { - "id": 92, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Request/model/RouteParamREST.js", - "name": "./src/Services/Route/Request/model/RouteParamREST.js", - "index": 88, - "index2": 82, - "size": 4922, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Request/RouteRequestREST.js", - "issuerId": 91, - "issuerName": "./src/Services/Route/Request/RouteRequestREST.js", - "profile": { - "factory": 228, - "building": 267, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 91, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Request/RouteRequestREST.js", - "module": "./src/Services/Route/Request/RouteRequestREST.js", - "moduleName": "./src/Services/Route/Request/RouteRequestREST.js", - "type": "harmony import", - "userRequest": "./model/RouteParamREST", - "loc": "4:0-52" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 6, - "source": "\nimport Logger from \"../../../../Utils/LoggerByDefault\";\n\n/**\n * @classdesc\n * Classe de gestion des param. des requêtes du service de calcul d'itineraire (REST).\n * Permet le mapping avec les options du service.\n * @constructor\n * @alias Gp.Services.Route.Request.RouteParamREST\n * @param {Object} options - options\n *\n * @private\n */\nfunction RouteParamREST (options) {\n if (!(this instanceof RouteParamREST)) {\n throw new TypeError(\"RouteParamREST constructor cannot be called as a function.\");\n }\n\n this.logger = Logger.getLogger();\n this.logger.trace(\"[Constructeur RouteParamREST ()]\");\n\n /**\n * Options en paramêtres du constructeur.\n */\n this.options = options || {};\n\n // mapping des options avec l'API REST\n\n /** Coordonnées du point de départ. */\n this.origin = this.options.startPoint.x + \",\" + this.options.startPoint.y;\n\n /** Coordonnées du point d’arrivée. */\n this.destination = this.options.endPoint.x + \",\" + this.options.endPoint.y;\n\n /** Coordonnées des étapes point de départ. */\n this.waypoints = this.options.viaPoints || null;\n\n /** Date et heure de départ */\n this.startDateTime = this.options.expectedStartTime || null; // TODO format !?\n\n /** Nom du graphe à utiliser */\n this.graphName = this.options.graph;\n\n /** projection (code EPSG comme epsg:4326 ou wgs84) */\n this.srs = this.options.srs;\n\n /** Liste des règles de restrictions à utiliser, séparés pas le caractère , ou ; (Exemple : Toll, Tunnel, Bridge) */\n this.exclusions = this.options.exclusions;\n\n /**\n * itinéraire le plus court (DISTANCE) ou le plus rapide (TIME)\n * Par defaut, DISTANCE...\n * cf. mapping ci dessous\n */\n this.method = \"TIME\";\n\n // mapping particulier sur l'option 'routePreference'\n if (this.options.routePreference) {\n var value = this.options.routePreference;\n switch (value) {\n case \"fastest\":\n this.method = \"TIME\";\n break;\n case \"shortest\":\n this.method = \"DISTANCE\";\n break;\n default:\n this.logger.warn(\"Par defaut, on prend l'itinéraire le plus rapide !\");\n this.method = \"TIME\";\n }\n }\n\n /** Format de sortie (résumé de l’itinéraire) */\n this.format = (this.options.geometryInInstructions) ? \"STANDARDEXT\" : \"STANDARD\";\n\n // y'a t-il d'autres options à ajouter (par defaut) ?\n\n /** Distance de tolérance (en mètre) de simplification de la géométrie. */\n this.tolerance = 10;\n\n /** identifiant du véhicule (enregistré dans les profils de véhicule) à utiliser */\n this.profileId = null;\n\n /** Profil du véhicule (enregistré dans les profils de véhicule) à utiliser */\n this.profileName = null;\n\n // options dont le mapping n'est pas possible :\n // - distanceUnit\n // - provideBoundingBox\n}\n\n/**\n * CLASSNAME\n */\nRouteParamREST.CLASSNAME = \"RouteParamREST\";\n\nRouteParamREST.prototype = {\n\n /**\n * @lends module:RouteParamREST#\n */\n\n /**\n * Constructeur (alias)\n */\n constructor : RouteParamREST,\n\n /**\n * Retourne une liste de points\n * @returns {Array} une liste de points (sep ';')\n */\n getWaypoints : function () {\n if (!this.waypoints) {\n return;\n }\n var array = [];\n for (var i = 0; i < this.waypoints.length; i++) {\n var obj = this.waypoints[i];\n array.push(obj.x + \",\" + obj.y);\n }\n\n return array.join(\";\");\n },\n\n /**\n * Retourne la liste des exclusions\n * @returns {Array} une liste d'exclusions (sep ';')\n */\n getExclusions : function () {\n return this.exclusions.join(\";\");\n }\n};\n\n/**\n * Tableau de clefs/valeurs pour param.\n *\n * @returns {Array} liste de paramêtres\n */\nRouteParamREST.prototype.getParams = function () {\n var map = [];\n\n map.push({\n k : \"origin\",\n v : this.origin\n });\n\n map.push({\n k : \"destination\",\n v : this.destination\n });\n\n map.push({\n k : \"method\",\n v : this.method\n });\n\n if (this.waypoints) {\n map.push({\n k : \"waypoints\",\n v : this.getWaypoints()\n });\n }\n\n if (this.startDateTime) {\n map.push({\n k : \"startDateTime\",\n v : this.startDateTime\n });\n }\n\n if (this.graphName) {\n map.push({\n k : \"graphName\",\n v : this.graphName\n });\n }\n\n if (this.exclusions) {\n map.push({\n k : \"exclusions\",\n v : this.getExclusions()\n });\n }\n\n if (this.srs) {\n map.push({\n k : \"srs\",\n v : this.srs\n });\n }\n\n if (this.format) {\n map.push({\n k : \"format\",\n v : this.format\n });\n }\n\n return map;\n};\n\nexport default RouteParamREST;\n" - }, - { - "id": 93, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Response/RouteResponseFactory.js", - "name": "./src/Services/Route/Response/RouteResponseFactory.js", - "index": 89, - "index2": 90, - "size": 14710, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Route.js", - "issuerId": 84, - "issuerName": "./src/Services/Route/Route.js", - "profile": { - "factory": 128, - "building": 329, - "dependencies": 215 - }, - "failed": false, - "errors": 0, - "warnings": 1, - "reasons": [ - { - "moduleId": 84, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Route.js", - "module": "./src/Services/Route/Route.js", - "moduleName": "./src/Services/Route/Route.js", - "type": "harmony import", - "userRequest": "./Response/RouteResponseFactory", - "loc": "8:0-67" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 4, - "source": "/**\n * Factory pour générer une reponse JSON à partir d'un XML ou d'un JSON\n * (Factory)\n *\n * @module RouteResponseFactory\n * @alias Gp.Services.Route.Response.RouteResponseFactory\n * @private\n */\nimport Logger from \"../../../Utils/LoggerByDefault\";\nimport MRes from \"../../../Utils/MessagesResources\";\nimport ErrorService from \"../../../Exceptions/ErrorService\";\nimport XML from \"../../../Formats/XML\";\nimport WKT from \"../../../Formats/WKT\";\nimport RouteResponseRESTReader from \"../Formats/RouteResponseRESTReader\";\nimport RouteResponseOLSReader from \"../Formats/RouteResponseOLSReader\";\nimport RouteResponse from \"./model/RouteResponse\";\nimport RouteInstruction from \"./model/RouteInstruction\";\n\nvar RouteResponseFactory = {\n\n /**\n * interface unique\n *\n * @method build\n * @static\n * @param {Object} options - options definies dans le composant Alti\n *\n * @example\n * var options = {\n * response :\n * outputFormat :\n * rawResponse :\n * scope :\n * onSuccess :\n * onError :\n * };\n *\n */\n build : function (options) {\n // logger\n var logger = Logger.getLogger(\"RouteResponseFactory\");\n logger.trace(\"RouteResponseFactory::build()\");\n\n var data = null;\n\n if (options.response) {\n if (options.rawResponse) {\n logger.trace(\"analyze response : raw\");\n data = options.response;\n } else {\n switch (options.outputFormat) {\n case \"xml\":\n logger.trace(\"analyze response : xml\");\n\n // type de reader en fonction de l'API\n var routeReader = options.api === \"REST\" ? RouteResponseRESTReader : RouteResponseOLSReader;\n\n try {\n var p = new XML({\n reader : routeReader\n });\n\n // FIXME : mode XHR ne retourne que des string ? JSONP aussi à ce niveau ?\n if (typeof options.response === \"string\") {\n p.setXMLString(options.response);\n } else {\n p.setXMLDoc(options.response);\n }\n\n data = p.parse();\n\n if (!data) {\n throw new ErrorService(MRes.getMessage(\"SERVICE_RESPONSE_FORMAT\", \"xml\"));\n }\n } catch (e) {\n options.onError.call(options.scope, new ErrorService(MRes.getMessage(\"SERVICE_RESPONSE_ANALYSE\", options.response)));\n return;\n }\n\n break;\n\n case \"json\":\n logger.trace(\"analyze response : json\");\n\n var JSONResponse;\n if (typeof options.response === \"string\") {\n JSONResponse = JSON.parse(options.response);\n } else {\n JSONResponse = options.response;\n }\n\n // le service renvoie t il une erreur ?\n if (JSONResponse.message) {\n // ex. {\"message\":\"message not null\", \"status\":\"ERROR\"}\n options.onError.call(options.scope, new ErrorService(MRes.getMessage(\"SERVICE_RESPONSE_EXCEPTION\", JSONResponse.message)));\n return;\n }\n\n // construction de l'objet réponse JSON\n if (JSONResponse) {\n var legs = [];\n var legSteps = [];\n var steps = [];\n\n data = new RouteResponse();\n\n if (data.hasOwnProperty(\"totalTime\")) {\n // info : il y a aussi JSONResponse.duration, qui donne la durée en hh:mm:ss.\n data.totalTime = parseFloat(JSONResponse.durationSeconds);\n }\n if (data.hasOwnProperty(\"totalDistance\")) {\n data.totalDistance = (options.distanceUnit === \"m\") ? JSONResponse.distanceMeters : JSONResponse.distance;\n }\n\n if (data.hasOwnProperty(\"bbox\")) {\n var coords = JSONResponse.bounds.split(/[,;]/);\n data.bbox.left = parseFloat(coords[0]);\n data.bbox.bottom = parseFloat(coords[1]);\n data.bbox.right = parseFloat(coords[2]);\n data.bbox.top = parseFloat(coords[3]);\n }\n /**\n * callback success\n * @param {Object} json - json\n * @private\n */\n var onWKTSuccess = function (json) {\n data.routeGeometry = json;\n };\n /**\n * callback failed\n * @param {Object} e - event\n * @private\n */\n var onWKTError = function (e) {\n console.log(e);\n options.onError.call(options.scope, new ErrorService(MRes.getMessage(\"PARAM_FORMAT\", [\"geometryWkt\"])));\n };\n\n if (data.hasOwnProperty(\"routeGeometry\")) {\n var geometry = JSONResponse.geometryWkt || JSONResponse.simplifiedWkt;\n if (geometry) {\n WKT.toJson(geometry, onWKTSuccess, onWKTError);\n if (!data.routeGeometry) {\n return;\n }\n }\n }\n\n if (data.hasOwnProperty(\"routeInstructions\")) {\n var legList = JSONResponse.legs;\n var i;\n if (Array.isArray(legList) && legList.length) {\n for (i = 0; i < legList.length; i++) {\n legs.push(legList[i]);\n }\n }\n if (Array.isArray(legs) && legs.length) {\n for (i = 0; i < legs.length; i++) {\n legSteps.push(legs[i].steps);\n }\n }\n if (Array.isArray(legSteps) && legSteps.length) {\n for (i = 0; i < legSteps.length; i++) {\n steps = steps.concat(legSteps[i]);\n }\n }\n\n steps.forEach(function (step) {\n data.routeInstructions.push(new RouteInstruction());\n data.routeInstructions[data.routeInstructions.length - 1].duration = step.durationSeconds;\n data.routeInstructions[data.routeInstructions.length - 1].distance = (options.distanceUnit === \"m\") ? step.distanceMeters : step.distance;\n data.routeInstructions[data.routeInstructions.length - 1].code = step.navInstruction;\n // geometrie en geojson\n var points = [];\n for (var i = 0; i < step.points.length; i++) {\n var point = step.points[i].split(\",\");\n if (point) {\n points.push(point);\n }\n }\n if (points && points.length !== 0) {\n data.routeInstructions[data.routeInstructions.length - 1].geometry = {\n coordinates : points,\n type : \"LineString\"\n };\n } else {\n data.routeInstructions[data.routeInstructions.length - 1].geometry = null;\n }\n\n /*\n Traduction du code en instruction\n * - F : tout droit\n * - B : demi-tour\n * - L : tourner à gauche\n * - R : tourner à droite\n * - BL : tourner très à gauche\n * - BR : tourner très à droite\n * - FL : tourner légèrement à gauche\n * - FR : tourner légèrement à droite\n * - round_about_entry : entrée rond-point\n * - round_about_exit : sortie rond-point\n */\n\n // on ne souhaite pas de ce type de valeur...\n if (step.name === \"Valeur non renseignée\") {\n step.name = \"\";\n }\n\n switch (step.navInstruction) {\n case \"F\":\n if (step.name) {\n data.routeInstructions[data.routeInstructions.length - 1].instruction = \"Tout droit \" + step.name;\n } else {\n data.routeInstructions[data.routeInstructions.length - 1].instruction = \"Continuer tout droit \";\n }\n break;\n case \"B\":\n data.routeInstructions[data.routeInstructions.length - 1].instruction = \"Demi-tour \" + step.name;\n break;\n case \"L\":\n data.routeInstructions[data.routeInstructions.length - 1].instruction = \"Tourner à gauche \" + step.name;\n break;\n case \"R\":\n data.routeInstructions[data.routeInstructions.length - 1].instruction = \"Tourner à droite \" + step.name;\n break;\n case \"BL\":\n data.routeInstructions[data.routeInstructions.length - 1].instruction = \"Tourner très à gauche \" + step.name;\n break;\n case \"BR\":\n data.routeInstructions[data.routeInstructions.length - 1].instruction = \"Tourner très à droite \" + step.name;\n break;\n case \"FL\":\n data.routeInstructions[data.routeInstructions.length - 1].instruction = \"Tourner légèrement à gauche \" + step.name;\n break;\n case \"FR\":\n data.routeInstructions[data.routeInstructions.length - 1].instruction = \"Tourner légèrement à droite \" + step.name;\n break;\n case \"round_about_entry\":\n data.routeInstructions[data.routeInstructions.length - 1].instruction = \"Entrée rond-point \" + step.name;\n break;\n case \"round_about_exit\":\n data.routeInstructions[data.routeInstructions.length - 1].instruction = \"Sortie rond-point \" + step.name;\n break;\n case null:\n data.routeInstructions[data.routeInstructions.length - 1].instruction = \"Prendre tout droit \" + step.name;\n break;\n default:\n data.routeInstructions[data.routeInstructions.length - 1].instruction = \"?\" + step.navInstruction + \"? \" + step.name;\n break;\n }\n });\n }\n }\n\n if (!data) {\n options.onError.call(options.scope, new ErrorService(MRes.getMessage(\"SERVICE_RESPONSE_ANALYSE\", \"json\")));\n return;\n }\n break;\n\n default:\n options.onError.call(options.scope, new ErrorService(MRes.getMessage(\"SERVICE_RESPONSE_FORMAT\", \"json\", \"xml\")));\n return;\n }\n\n // Si la réponse contenait une exception renvoyée par le service\n if (data && data.exceptionReport) {\n options.onError.call(options.scope, new ErrorService(MRes.getMessage(\"SERVICE_RESPONSE_EXCEPTION_2\")));\n return;\n }\n }\n } else {\n options.onError.call(options.scope, new ErrorService(MRes.getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n return;\n }\n\n options.onSuccess.call(options.scope, data);\n }\n};\n\nexport default RouteResponseFactory;\n" - }, - { - "id": 94, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Formats/RouteResponseRESTReader.js", - "name": "./src/Services/Route/Formats/RouteResponseRESTReader.js", - "index": 91, - "index2": 88, - "size": 10082, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Response/RouteResponseFactory.js", - "issuerId": 93, - "issuerName": "./src/Services/Route/Response/RouteResponseFactory.js", - "profile": { - "factory": 218, - "building": 848, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 93, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Response/RouteResponseFactory.js", - "module": "./src/Services/Route/Response/RouteResponseFactory.js", - "moduleName": "./src/Services/Route/Response/RouteResponseFactory.js", - "type": "harmony import", - "userRequest": "../Formats/RouteResponseRESTReader", - "loc": "14:0-73" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "/**\n * Analyse de la reponse REST\n *\n * @module RouteResponseRESTReader\n * @alias Gp.Services.Route.Formats.RouteResponseRESTReader\n * @todo not yet implemented !\n * @private\n */\n\n// import Logger from \"../../../Utils/LoggerByDefault\";\nimport MessagesResources from \"../../../Utils/MessagesResources\";\nimport WKT from \"../../../Formats/WKT\";\nimport ErrSrv from \"../../../Exceptions/ErrorService\";\nimport RouteResponse from \"../Response/model/RouteResponse\";\nimport RouteInstruction from \"../Response/model/RouteInstruction\";\n\n/**\n * Objet RouteResponseRestReader\n * @member {Object} RouteResponseRestReader\n *\n * @property {Object} RouteResponseRestReader.READERS - Objet contenant des fonctions de lecture, appelées \"readers\"\n * dont chaque clé correspond au nom d'un tag du XML que l'on souhaite lire\n * et la valeur associée est une fonction (node, data)\n * où node est un noeud du document DOM\n * et data est un objet où l'on stocke les informations lues dans le XML.\n *\n * @property {Method} RouteResponseRestReader.read - Méthode permettant de lancer la lecture d'une réponse XML du\n * service de calcul d'itineraire, à l'aide des readers de la classe.\n *\n */\n\nvar RouteResponseRESTReader = {};\n\nRouteResponseRESTReader.READERS = {\n\n /**\n * Route response\n * @param {Object} node - node\n * @returns {Object} response\n */\n routeResult : function (node) {\n var response = new RouteResponse();\n\n // on boucle sur les balises \"enfant\" de la réponse :\n // status, distance, duration, distanceMeters, durationSeconds, bounds, geometryWkt, simplifiedWkt, leg\n __getChildNodes(node, response);\n\n if (response.status === \"error\") {\n var message = MessagesResources.getMessage(\"SERVICE_RESPONSE_EXCEPTION\",\n response.message);\n throw new ErrSrv({\n message : message,\n type : ErrSrv.TYPE_SRVERR\n });\n }\n\n return response;\n },\n\n /**\n * Route status\n * @param {Object} node - node\n * @param {Object} response - response\n */\n status : function (node, response) {\n var status = __getChildValue(node);\n if (status === \"ERROR\" || status === \"error\") {\n if (response) {\n response.status = \"error\";\n }\n }\n },\n\n /**\n * Route message\n * @param {Object} node - node\n * @param {Object} response - response\n */\n message : function (node, response) {\n if (response) {\n response.message = __getChildValue(node);\n }\n },\n\n /**\n * Route distance\n * @param {Object} node - node\n * @param {Object} response - response\n */\n distance : function (node, response) {\n if (response) {\n response.totalDistance = __getChildValue(node);\n }\n },\n\n /**\n * Route duration\n * @param {Object} node - node\n * @param {Object} response - response\n */\n durationSeconds : function (node, response) {\n if (response) {\n response.totalTime = parseFloat(__getChildValue(node));\n }\n },\n\n /**\n * Route bounds\n * @param {Object} node - node\n * @param {Object} response - response\n */\n bounds : function (node, response) {\n // get value et split et parseFloat\n if (response && response.bbox) {\n var coords = __getChildValue(node).split(/[,;]/);\n response.bbox.left = parseFloat(coords[0]);\n response.bbox.bottom = parseFloat(coords[1]);\n response.bbox.right = parseFloat(coords[2]);\n response.bbox.top = parseFloat(coords[3]);\n }\n },\n\n /**\n * Route geometry\n * @param {Object} node - node\n * @param {Object} response - response\n */\n geometryWkt : function (node, response) {\n if (response) {\n var geomWkt = node.innerHTML;\n\n var onWKTSuccess = function (json) {\n response.routeGeometry = json;\n };\n\n var onWKTError = function () {\n var msg = MessagesResources.getMessage(\"PARAM_FORMAT\", [\"geometryWkt\"]);\n throw new Error(msg);\n };\n // get WKT Geometry from string\n WKT.toJson(geomWkt, onWKTSuccess, onWKTError);\n }\n },\n\n /**\n * Route step\n * @param {Object} node - node\n * @param {Object} response - response\n */\n step : function (node, response) {\n // création d'une nouvelle instruction\n var routeInstruction = new RouteInstruction();\n var name;\n\n // lecture des informations de l'instruction (balises enfants)\n if (node.hasChildNodes) {\n var children = node.childNodes;\n var child;\n var childName;\n\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n\n if (child.nodeType === 1) { // 1 === node.ELEMENT_NODE\n childName = child.localName || child.baseName || child.nodeName;\n\n if (childName === \"durationSeconds\") {\n routeInstruction.duration = __getChildValue(child);\n } else if (childName === \"distance\") {\n routeInstruction.distance = __getChildValue(child);\n } else if (childName === \"navInstruction\") {\n routeInstruction.code = __getChildValue(child);\n } else if (childName === \"name\") {\n name = __getChildValue(child);\n }\n }\n }\n }\n\n // on teste le code de l'instruction pour y ajouter la bonne description\n if (routeInstruction.code) {\n switch (routeInstruction.code) {\n case \"F\":\n if (name !== \"Valeur non renseignée\") {\n routeInstruction.instruction = \"Tout droit \" + name;\n } else {\n routeInstruction.instruction = \"Continuer tout droit \";\n }\n break;\n case \"B\":\n routeInstruction.instruction = \"Demi-tour \" + name;\n break;\n case \"L\":\n routeInstruction.instruction = \"Tourner à gauche \" + name;\n break;\n case \"R\":\n routeInstruction.instruction = \"Tourner à droite \" + name;\n break;\n case \"BL\":\n routeInstruction.instruction = \"Tourner très à gauche \" + name;\n break;\n case \"BR\":\n routeInstruction.instruction = \"Tourner très à droite \" + name;\n break;\n case \"FL\":\n routeInstruction.instruction = \"Tourner légèrement à gauche \" + name;\n break;\n case \"FR\":\n routeInstruction.instruction = \"Tourner légèrement à droite \" + name;\n break;\n case \"round_about_entry\":\n routeInstruction.instruction = \"Entrée rond-point \" + name;\n break;\n case \"round_about_exit\":\n routeInstruction.instruction = \"Sortie rond-point \" + name;\n break;\n case null:\n routeInstruction.instruction = \"Prendre \" + name;\n break;\n default:\n routeInstruction.instruction = \"?\" + routeInstruction.code + \"? \" + name;\n break;\n }\n }\n\n if (Array.isArray(response.routeInstructions)) {\n response.routeInstructions.push(routeInstruction);\n }\n }\n\n};\n\n/**\n * Méthode permettant de lancer la lecture d'une réponse XML du service de calcul d'itineraire,\n * à l'aide des readers de la classe.\n *\n * @method RouteResponseRESTReader.read\n * @param {DOMElement} root - racine de la réponse XML à lire\n * @static\n * @memberof RouteResponseRESTReader\n * @returns {DOMElement} response\n */\nRouteResponseRESTReader.read = function (root) {\n var response;\n\n if (root.nodeName === \"routeResult\") {\n response = RouteResponseRESTReader.READERS[\"routeResult\"](root);\n return response;\n } else {\n throw new Error(\"Erreur lors de la lecture de la réponse : elle n'est pas au format attendu.\");\n }\n};\n\n/**\n * Lecture de la valeur du premier child d'un noeud, si elle existe.\n *\n * @private\n * @memberof RouteResponseRESTReader\n * @method __getChildValue\n * @param {DOMElement} node - a DOM node\n * @return {String} value - valeur du firstChild du noeud en entrée, ou chaîne vide.\n */\nfunction __getChildValue (node) {\n var textNode;\n var value = \"\";\n\n if (node.hasChildNodes()) {\n textNode = node.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n value = textNode.nodeValue;\n }\n }\n return value;\n}\n\n/**\n * Récupération des noeuds enfants à partir d'un noeud donné, pour lecture (readNode).\n *\n * @private\n * @memberof RouteResponseRESTReader\n * @method __getChildNodes\n * @param {DOMElement} node - a DOM node\n * @param {Array|Object} [data] - an object to be filled with node data\n */\nfunction __getChildNodes (node, data) {\n if (node.hasChildNodes()) {\n var children = node.childNodes;\n var child;\n var childName;\n\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n\n if (child.nodeType === 1) { // 1 === node.ELEMENT_NODE\n childName = child.localName || child.baseName || child.nodeName;\n\n if (RouteResponseRESTReader.READERS[childName]) {\n var reader = RouteResponseRESTReader.READERS[childName];\n reader(child, data);\n } else {\n __getChildNodes(child, data);\n }\n }\n }\n }\n}\n\nexport default RouteResponseRESTReader;\n" - }, - { - "id": 95, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Formats/RouteResponseOLSReader.js", - "name": "./src/Services/Route/Formats/RouteResponseOLSReader.js", - "index": 94, - "index2": 89, - "size": 3128, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Response/RouteResponseFactory.js", - "issuerId": 93, - "issuerName": "./src/Services/Route/Response/RouteResponseFactory.js", - "profile": { - "factory": 218, - "building": 861, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 93, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Response/RouteResponseFactory.js", - "module": "./src/Services/Route/Response/RouteResponseFactory.js", - "moduleName": "./src/Services/Route/Response/RouteResponseFactory.js", - "type": "harmony import", - "userRequest": "../Formats/RouteResponseOLSReader", - "loc": "15:0-71" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "/**\n * Analyse de la reponse OLS\n *\n * @module RouteResponseOLSReader\n * @alias Gp.Services.Route.Formats.RouteResponseOLSReader\n * @todo not yet implemented !\n * @private\n */\n\nimport Logger from \"../../../Utils/LoggerByDefault\";\n\n/**\n * Objet RouteResponseOLSReader\n * @member {Object} RouteResponseOLSReader\n *\n * @property {Object} RouteResponseOLSReader.READERS - Objet contenant des fonctions de lecture, appelées \"readers\"\n * dont chaque clé correspond au nom d'un tag du XML que l'on souhaite lire\n * et la valeur associée est une fonction (node, data)\n * où node est un noeud du document DOM\n * et data est un objet où l'on stocke les informations lues dans le XML.\n *\n * @property {Method} RouteResponseOLSReader.read - Méthode permettant de lancer la lecture d'une réponse\n * XML du service de calcul d'itineraire, à l'aide des readers de la classe.\n */\nvar RouteResponseOLSReader = {};\n\n/**\n * Objet contenant des fonctions de lecture, appelées \"readers\"\n * dont chaque clé correspond au nom d'un tag du XML que l'on souhaite lire\n * et la valeur associée est une fonction (node, data)\n * où node est un noeud du document DOM\n * et data est un objet où l'on stocke les informations lues dans le XML.\n * @static\n * @memberof RouteResponseOLSReader\n */\nRouteResponseOLSReader.READERS = {\n /*\n // INFO\n // pas de reponse en JSON pour l'API OLS, uniquement du XML !\n\n // INFO\n // Exemple d'erreur du service\n // \n // \n // \n // \n // \n // \n // \n // \n // \n\n // INFO\n // Exemple d'erreur NGinx\n // Resource parameter not found\n */\n};\n\n/**\n * Méthode permettant de lancer la lecture d'une réponse XML du service de calcul d'itineraire,\n * à l'aide des readers de la classe.\n *\n * @method RouteResponseOLSReader.read\n * @param {DOMElement} root - racine de la réponse XML à lire\n * @static\n * @memberof RouteResponseOLSReader\n */\nRouteResponseOLSReader.read = function (root) {\n // logger\n var logger = Logger.getLogger(\"RouteResponseOLSReader\");\n logger.error(\"not yet implemented !\");\n};\n\nexport default RouteResponseOLSReader;\n" - }, - { - "id": 96, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "name": "./src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "index": 95, - "index2": 97, - "size": 10279, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Services.js", - "issuerId": 45, - "issuerName": "./src/Services/Services.js", - "profile": { - "factory": 513, - "building": 339, - "dependencies": 77 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 45, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Services.js", - "module": "./src/Services/Services.js", - "moduleName": "./src/Services/Services.js", - "type": "harmony import", - "userRequest": "./ProcessIsoCurve/ProcessIsoCurve", - "loc": "15:0-64" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 3, - "source": "\nimport Logger from \"../../Utils/LoggerByDefault\";\nimport _ from \"../../Utils/MessagesResources\";\nimport ErrorService from \"../../Exceptions/ErrorService\";\nimport CommonService from \"../CommonService\";\nimport DefaultUrlService from \"../DefaultUrlService\";\nimport ProcessIsoCurveRequest from \"./Request/ProcessIsoCurveRequest\";\nimport ProcessIsoCurveResponseFactory from \"./Response/ProcessIsoCurveResponseFactory\";\n\n/**\n * @classdesc\n * Appel du service d'isochrone/distance du Géoportail :\n * envoi de la requête construite selon les paramètres en options,\n * éventuellement parsing et analyse de la réponse,\n * retour d'une réponse en paramètre de la fonction onSuccess.\n * @constructor\n * @extends {Gp.Services.CommonService}\n * @alias Gp.Services.ProcessIsoCurve\n * @param {Object} options - options spécifiques au service (+ les options heritées)\n *\n * @param {String} options.outputFormat - Le format de la réponse du service iso : 'xml' ou 'json'.\n * Ce paramètre déterminera l'extension '.xml' ou '.json' du service.\n * Nécessaire si serverUrl est renseigné pour connaître le format dans lequel sera fournie la réponse (pour son traitement).\n * Par défaut, ce paramètre vaut 'json'.\n *\n * @param {Object} options.position - Point de départ du calcul.\n * Coordonnées exprimées en longitudes, latitudes (EPSG:4326)\n * @param {Float} options.position.x - Abcisse du point de départ du calcul d'isochrone/distance.\n * @param {Float} options.position.y - Ordonnée du point de départ du calcul d'isochrone/distance.\n *\n * @param {String} options.srs - Projection.\n * Système de coordonnées dans lequel les coordonnées du point « location » sont exprimées et\n * dans lequel la géométrie de la courbe résultante sera exprimée.\n * Par défaut, le système de coordonnées utilisé sera « EPSG:4326 ».\n *\n * @param {String} [options.graph = \"voiture\"] - Nom du graphe à utiliser pour le calcul (« Pieton » ou « Voiture »).\n * La valeur par défaut est : «voiture»\n *\n * @param {Array.} [options.exclusions] - Critères d'exclusions à appliquer pour le calcul.\n * On précise ici le type de tronçons que l'on ne veut pas que l'isochrone/distance emprunte\n * (valeurs possibles : « toll » (éviter les péages), « bridge », « tunnel »).\n *\n * @param {String} [options.method = \"time\"] - Méthode utilisée pour le calcul de la courbe iso.\n * Les valeurs possible sont \"time\" pour un calcul d'isochrone, \"distance\" pour un calcul d'isodistance.\n * Pas de valeur spécifié équivaut à un calcul d'isochrone.\n *\n * @param {Float} options.time - Durée maximum (exprimée en secondes) à utiliser pour le calcul de la courbe à partir du ou jusqu'au point « location ».\n * Ce paramètre doit être renseigné si l'option \"méthod\" a la valeur \"time\".\n * Si l'option method n'est pas renseignée, ce paramètre doit être renseigné.\n *\n * @param {Float} options.distance - Distance maximum (exprimée en metres) à utiliser pour le calcul de la courbe à partir du ou j'usqu'au point « location ».\n * Ce paramètre doit être renseigné si l'option \"méthod\" a la valeur \"DISTANCE\".\n * Si l'option \"method\" n'est pas renseignée, ce paramètre sera ignoré.\n *\n * @param {Boolean} [options.reverse = false] - Indique si la géométrie résultante doit être lissée (« true ») pour ne pas avoir d'effet d'escalier.\n * Par défaut, la valeur « false » est appliquée.\n *\n * @param {Boolean} [options.smoothing = false] - Indique si la géométrie résultante doit être lissée (« true ») pour ne pas avoir d'effet d'escalier.\n * Par défaut, la valeur « false » est appliquée.\n *\n * @param {Boolean} [options.holes = false] - Indique si la géométrie résultante (surface) doit être retournée avec des trous (« true »).\n * Par défaut, la valeur « false » est appliquée.\n *\n * @example\n * var options = {\n * // options communes aux services\n * apiKey : null,\n * serverUrl : 'http://localhost/service/',\n * protocol : 'JSONP', // JSONP|XHR\n * proxyURL : null,\n * httpMethod : 'GET', // GET|POST\n * timeOut : 10000, // ms\n * rawResponse : false, // true|false\n * scope : null, // this\n * onSuccess : function (response) {},\n * onFailure : function (error) {},\n * // spécifique au service\n * position : {\n * x : 2.3242664298058053,\n * y : 48.86118017324745\n * },\n * distance : 200,\n * [time : ]\n * method : \"distance\",\n * exclusions : [\"Bridge\", \"Tunnel\", \"Toll\"],\n * graph : \"voiture\",\n * reverse : false,\n * smoothing : false,\n * holes : false\n * };\n * @private\n */\n\nfunction ProcessIsoCurve (options) {\n if (!(this instanceof ProcessIsoCurve)) {\n throw new TypeError(_.getMessage(\"CLASS_CONSTRUCTOR\", \"ProcessIsoCurve\"));\n }\n\n /**\n * Nom de la classe (heritage)\n * FIXME instance ou classe ?\n */\n this.CLASSNAME = \"ProcessIsoCurve\";\n\n // appel du constructeur par heritage\n CommonService.apply(this, arguments);\n\n this.logger = Logger.getLogger(\"Gp.Services.ProcessIsoCurve\");\n this.logger.trace(\"[Constructeur ProcessIsoCurve (options)]\");\n\n if (!options.position) {\n throw new Error(_.getMessage(\"PARAM_MISSING\", \"position\"));\n }\n\n // on lance une exception afin d'eviter au service de le faire...\n if (options.position.x === null) {\n throw new Error(_.getMessage(\"PARAM_MISSING\", \"position.x\"));\n }\n\n if (options.position.y === null) {\n throw new Error(_.getMessage(\"PARAM_MISSING\", \"position.y\"));\n }\n\n if (!options.time && !options.distance) {\n throw new Error(\"Parameter (s) 'distance' missing. Parameter time to calculate an isochrone, parameter distance for an isodistance\");\n }\n\n // si on a que le paramètre \"distance\" en entrée, on calcule une isodistance.\n // Le paramètre \"méthode\" doit pour avoir une réponse du service, être passé à \"distance\"\n if (!options.time && options.distance) {\n this.options.method = \"distance\";\n // on supprime l'éventuel attribut time, résidu d'un appel antérieur\n if (this.options.time) {\n delete this.options.time;\n }\n }\n\n // si on a que le paramètre \"time\" en entrée, on calcule une isochrone.\n // Le paramètre \"méthode\" doit pour avoir une réponse du service, être passé à \"time\"\n if (options.time && !options.distance) {\n this.options.method = \"time\";\n // on supprime l'éventuel attribut time, résidu d'un appel antérieur\n if (this.options.distance) {\n delete this.options.distance;\n }\n }\n\n // au cas où on a ni l'un, ni l'autre...\n this.options.method = this.options.method || \"time\";\n\n // options par defaut du service\n this.options.exclusions = options.exclusions || null;\n this.options.graph = options.graph || \"Voiture\"; // TODO test de la valeur à faire !\n this.options.reverse = options.reverse || false;\n this.options.smoothing = options.smoothing || false;\n this.options.holes = options.holes || false;\n this.options.srs = options.srs || \"EPSG:4326\";\n\n // on passe l'option outputFormat en minuscules afin d'éviter des exceptions.\n this.options.outputFormat = (typeof options.outputFormat === \"string\") ? options.outputFormat.toLowerCase() : \"json\";\n\n // gestion de l'url du service par defaut\n // si l'url n'est pas renseignée, il faut utiliser les urls par defaut\n if (!this.options.serverUrl) {\n var lstUrlByDefault = DefaultUrlService.ProcessIsoCurve.url(this.options.apiKey);\n\n var urlFound = lstUrlByDefault[\"iso\" + \"-\" + this.options.outputFormat];\n if (!urlFound) {\n throw new Error(\"Url by default not found !\");\n }\n this.options.serverUrl = urlFound;\n this.logger.trace(\"Serveur URL par defaut : \" + this.options.serverUrl);\n }\n\n // gestion du type de service\n // si l'extension de l'url est .json ou .xml, on surcharge le format de sortie (outputFormat)\n var idx = this.options.serverUrl.lastIndexOf(\".\");\n if (idx !== -1) {\n var extension = this.options.serverUrl.substring(idx + 1);\n if (extension && extension.length < 5) { // FIXME extension de moins de 4 car. ...\n this.logger.trace(\"Serveur Extension URL : \" + extension);\n switch (extension.toLowerCase()) {\n case \"json\":\n case \"xml\":\n this.options.outputFormat = extension.toLowerCase();\n break;\n default:\n throw new Error(\"type of service : unknown or unsupported (json or xml) !\");\n }\n }\n }\n}\n\n/**\n * @lends module:ProcessIsoCurve#\n */\nProcessIsoCurve.prototype = Object.create(CommonService.prototype, {\n // todo\n // getter/setter\n});\n\n/*\n * Constructeur (alias)\n */\nProcessIsoCurve.prototype.constructor = ProcessIsoCurve;\n\n/**\n * Création de la requête (overwrite)\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nProcessIsoCurve.prototype.buildRequest = function (error, success) {\n try {\n var oIsoCurve = new ProcessIsoCurveRequest(this.options);\n if (!oIsoCurve.processRequestString()) {\n throw new Error(_.getMessage(\"SERVICE_REQUEST_BUILD\"));\n }\n\n this.request = oIsoCurve.requestString;\n } catch (e) {\n error.call(this, new ErrorService(e.message));\n return;\n }\n\n success.call(this, this.request);\n};\n\n/**\n * (overwrite)\n * Analyse de la reponse\n *\n * @param {Function} onError - callback des erreurs\n * @param {Function} onSuccess - callback de succès de l'analyse de la réponse\n */\nProcessIsoCurve.prototype.analyzeResponse = function (onError, onSuccess) {\n if (this.response) {\n var options = {\n response : this.response,\n outputFormat : this.options.outputFormat,\n rawResponse : this.options.rawResponse,\n onSuccess : onSuccess,\n onError : onError,\n scope : this\n };\n\n ProcessIsoCurveResponseFactory.build(options);\n } else {\n onError.call(this, new ErrorService(_.getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n }\n};\n\nexport default ProcessIsoCurve;\n" - }, - { - "id": 97, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Request/ProcessIsoCurveRequest.js", - "name": "./src/Services/ProcessIsoCurve/Request/ProcessIsoCurveRequest.js", - "index": 96, - "index2": 93, - "size": 9054, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "issuerId": 96, - "issuerName": "./src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "profile": { - "factory": 82, - "building": 534, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 96, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "module": "./src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "moduleName": "./src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "type": "harmony import", - "userRequest": "./Request/ProcessIsoCurveRequest", - "loc": "7:0-70" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 4, - "source": "\nimport Logger from \"../../../Utils/LoggerByDefault\";\nimport _ from \"../../../Utils/MessagesResources\";\nimport ProcessIsoCurveParam from \"./model/ProcessIsoCurveParam\";\n\n/**\n * @classdesc\n * Classe de gestion des requêtes sur le service de calcul d'isoschrone/isodistance.\n * Les requêtes peuvent être en mode GET ou POST,\n * et le format de sorti est en JSON ou en XML.\n *\n * @constructor\n * @alias Gp.Services.ProcessIsoCurve.Request.ProcessIsoCurveRequest\n * @param {Object} options - options\n *\n * @example\n * var options = {\n * httpMethod : 'GET', // GET|POST\n * // spécifique au service\n * exclusions : ['Bridge', 'Tunnel'],\n * position : {\n * x : 2.3242664298058053,\n * y : 48.86118017324745\n * },\n * graph : \"Voiture\",\n * method : 'time',\n * time : 1000, //distance : 200\n * reverse : false,\n * smoothing : false,\n * holes : false,\n * srs : 'EPSG:4326'\n * };\n *\n * try {\n *\n * var oIsoCurve = new ProcessIsoCurveRequest (options);\n * if (!oIsoCurve.processRequestString ()) {\n * // error\n * }\n *\n * var request = oIsoCurve.requestString;\n *\n * } catch (e) {\n * // error\n * }\n * @private\n */\nfunction ProcessIsoCurveRequest (options) {\n this.logger = Logger.getLogger(\"ProcessIsoCurveRequest\");\n this.logger.trace(\"[Constructeur ProcessIsoCurveRequest ()]\");\n\n if (!(this instanceof ProcessIsoCurveRequest)) {\n throw new TypeError(\"ProcessIsoCurveRequest constructor cannot be called as a function.\");\n }\n\n // existance des options\n if (!options) {\n throw new Error(_.getMessage(\"PARAM_EMPTY\", \"options\"));\n }\n\n /**\n * Liste des options\n */\n this.settings = options;\n\n /**\n * Mode HTPP.\n * Par defaut, \"GET\".\n * @type {String}\n */\n this.mode = this.settings.httpMethod || \"GET\";\n}\n\nProcessIsoCurveRequest.prototype = {\n\n /**\n * @lends module:ProcessIsoCurveRequest#\n */\n\n /**\n * Requête\n * @type {String}\n */\n requestString : null,\n\n /**\n * Constructeur (alias)\n */\n constructor : ProcessIsoCurveRequest,\n\n /**\n * Template de la requête (POST)\n * * __X__ __Y__ __SRS__ __GRAPHNAME__ __METHOD__ (obligatoire)\n * * __REVERSE__ __SMOOTHING__ __HOLES__ (par defaut)\n * * __TIME__ __TIMEVALUE__ (choix)\n * * __DISTANCE__ __DISTANCEVALUE__ (choix)\n * * __EXCLUSIONS__ __EXCLUSIONFEATURE__ __EXCLUSIONVALUE__ (optionnel)\n * * __PROFIL__ __PROFILID__ __PROFILNAME__ (très optionnel)\n * * __ID__ __IDVALUE__ (très optionnel)\n */\n template : {\n container : \"\\n\" +\n \"\\n\" +\n \"__ID__\" +\n \"\\t\\n\" +\n \"\\t\\t__X__\\n\" +\n \"\\t\\t__Y__\\n\" +\n \"\\t\\n\" +\n \"\\t__SRS__\\n\" +\n \"\\t__GRAPHNAME__\\n\" +\n \"__PROFIL__\" +\n \"__EXCLUSIONS__\" +\n \"\\t__METHOD__\\n\" +\n \"__TIME__\" +\n \"__DISTANCE__\" +\n \"\\t__REVERSE__\\n\" +\n \"\\t__SMOOTHING__\\n\" +\n \"\\t__HOLES__\\n\" +\n \"\",\n id : \"\\t__IDVALUE__\\n\",\n profil : \"\\t__PROFILID__\\n\" + \"\\t__PROFILNAME__\\n\",\n exclusions : {\n container : \"\\t\\n\" +\n \"__EXCLUSIONFEATURE__\\n\" +\n \"\\t\\n\",\n feature : \"\\t\\t__EXCLUSIONVALUE__\"\n },\n time : \"\\t\\n\",\n distance : \"\\t__DISTANCEVALUE__\\n\"\n },\n\n /**\n * Construction de la requête.\n *\n * @example\n * // GET out :\n * // (http://wxs.ign.fr/KEY/isochrone/isochrone.json?)\n * // location=&\n * // time=& ou distance=&\n * // method=\"DISTANCE|TIME\"&\n * // graph=Pieton&\n * // graphName=Pieton&\n * // exclusions=&\n * // reverse=10&\n * // smoothing=&\n * // holes=&\n * // srs=\n *\n * // POST out :\n * // \n * // \n * // 1\n * // \n * // -1.557189\n * // 47.217122\n * // \n * // \n * // \n * // \n * // \n * // \n * // \n * // \n * // \n * // \n * // \n * // \n * // \n * // \n * // \n * // \n *\n * @returns {String} request\n */\n processRequestString : function () {\n var request = \"\";\n var i = 0;\n\n switch (this.mode) {\n case \"GET\":\n this.logger.trace(\"Process GET Request\");\n\n // Mapping des options avec le service de l'API REST\n var oParams = new ProcessIsoCurveParam(this.settings);\n var params = oParams.getParams();\n\n for (i = 0; i < params.length; i++) {\n var o = params[i];\n if (request) {\n request += \"&\";\n }\n request += o.k + \"=\" + o.v;\n }\n\n break;\n\n case \"POST\":\n this.logger.trace(\"Process POST Request\");\n\n request = this.template.container;\n\n // options non prises en compte car non implémentées !\n // clean : id\n request = request.replace(/__ID__/g, \"\");\n // clean : profil\n request = request.replace(/__PROFIL__/g, \"\");\n\n // options obligatoires\n request = request.replace(/__X__/g, this.settings.position.x);\n request = request.replace(/__Y__/g, this.settings.position.y);\n request = request.replace(/__GRAPHNAME__/g, this.settings.graph);\n\n // options par defaut\n request = request.replace(/__SRS__/g, this.settings.srs);\n request = request.replace(/__SMOOTHING__/g, this.settings.smoothing);\n request = request.replace(/__HOLES__/g, this.settings.holes);\n request = request.replace(/__REVERSE__/g, this.settings.reverse);\n\n // options conditionnelles\n\n // exclusions\n if (this.settings.exclusions) {\n var tmplExclusions = this.template.exclusions.container;\n var exclusions = [];\n for (i = 0; i < this.settings.exclusions.length; i++) {\n var tmplFeature = this.template.exclusions.feature;\n tmplFeature = tmplFeature.replace(/__EXCLUSIONVALUE__/, this.settings.exclusions[i]);\n exclusions.push(tmplFeature);\n }\n tmplExclusions = tmplExclusions.replace(/__EXCLUSIONFEATURE__/, exclusions.join(\"\\n\"));\n request = request.replace(/__EXCLUSIONS__/g, tmplExclusions);\n }\n // clean exclusions\n request = request.replace(/__EXCLUSIONS__/g, \"\");\n\n // distance\n if (this.settings.distance) {\n var tmplDistance = this.template.distance;\n tmplDistance = tmplDistance.replace(/__DISTANCEVALUE__/g, this.settings.distance);\n request = request.replace(/__DISTANCE__/g, tmplDistance);\n // method\n request = request.replace(/__METHOD__/g, \"distance\");\n }\n // clean\n request = request.replace(/__DISTANCE__/g, \"\");\n\n // time\n if (this.settings.time) {\n var tmplTime = this.template.time;\n tmplTime = tmplTime.replace(/__TIMEVALUE__/g, this.settings.time);\n request = request.replace(/__TIME__/g, tmplTime);\n // method\n request = request.replace(/__METHOD__/g, \"time\");\n }\n // clean\n request = request.replace(/__TIME__/g, \"\");\n break;\n\n default:\n this.logger.error(\"No other HTTP method supported by the service !\");\n }\n\n this.logger.trace(request);\n this.requestString = request;\n\n return this.requestString;\n }\n};\n\nexport default ProcessIsoCurveRequest;\n" - }, - { - "id": 98, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Request/model/ProcessIsoCurveParam.js", - "name": "./src/Services/ProcessIsoCurve/Request/model/ProcessIsoCurveParam.js", - "index": 97, - "index2": 92, - "size": 3921, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Request/ProcessIsoCurveRequest.js", - "issuerId": 97, - "issuerName": "./src/Services/ProcessIsoCurve/Request/ProcessIsoCurveRequest.js", - "profile": { - "factory": 14, - "building": 967, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 97, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Request/ProcessIsoCurveRequest.js", - "module": "./src/Services/ProcessIsoCurve/Request/ProcessIsoCurveRequest.js", - "moduleName": "./src/Services/ProcessIsoCurve/Request/ProcessIsoCurveRequest.js", - "type": "harmony import", - "userRequest": "./model/ProcessIsoCurveParam", - "loc": "4:0-64" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "\nimport Logger from \"../../../../Utils/LoggerByDefault\";\n\n/**\n * @classdesc\n *\n * Classe de gestion des param. des requêtes du service de calcul des iso.\n * Permet le mapping avec les options du service.\n *\n * @constructor\n * @alias Gp.Services.ProcessIsoCurve.Request.ProcessIsoCurveParam\n * @param {Object} options - options\n * @private\n *\n */\nfunction ProcessIsoCurveParam (options) {\n if (!(this instanceof ProcessIsoCurveParam)) {\n throw new TypeError(\"ProcessIsoCurveParam constructor cannot be called as a function.\");\n }\n\n this.logger = Logger.getLogger();\n this.logger.trace(\"[Constructeur ProcessIsoCurveParam ()]\");\n\n /**\n * Options en paramêtres du constructeur.\n */\n this.options = options || {};\n\n // mapping des options avec l'API REST\n\n /** Identifiant de l’isochrone */\n this.id = this.options.id;\n\n /** Coordonnées de départ (ou arrivée si le reverse est à true). */\n this.location = this.options.position;\n\n /** projection (code EPSG comme epsg:4326 ou wgs84) */\n this.srs = this.options.srs;\n\n /**\n * Profil de véhicule à utiliser pour le calcul.\n * Voiture ou Pieton\n */\n this.graphName = this.options.graph;\n\n /**\n * Identifiant et nom du véhicule\n * FIXME non utilisé\n */\n this.profileId = this.options.profileId || null; // TODO !\n this.profileName = this.options.profileName || null; // TODO !\n\n /** Liste des règles de restrictions à utiliser */\n this.exclusions = this.options.exclusions;\n\n this.reverse = this.options.reverse;\n this.smoothing = this.options.smoothing;\n this.holes = this.options.holes;\n\n /**\n * \"time\" pour isochrone ou \"distance\" for isodistance.\n * Par defaut, time...\n */\n var value = this.options.method;\n switch (value) {\n case \"time\":\n this.method = \"time\";\n this.time = this.options.time;\n break;\n case \"distance\":\n this.method = \"distance\";\n this.distance = this.options.distance;\n break;\n default:\n this.logger.warn(\"Par defaut, on calcule un isochrone !\");\n this.method = \"time\";\n }\n}\n\n/**\n * CLASSNAME\n */\nProcessIsoCurveParam.CLASSNAME = \"ProcessIsoCurveParam\";\n\nProcessIsoCurveParam.prototype = {\n\n /**\n * @lends module:ProcessIsoCurveParam#\n */\n\n /**\n * Constructeur (alias)\n */\n constructor : ProcessIsoCurveParam,\n\n /**\n * Retourne la liste des exclusions\n * @returns {String} x,y\n */\n getLocation : function () {\n return this.location.x + \",\" + this.location.y;\n },\n\n /**\n * Retourne la liste des exclusions\n * @returns {String} exclusions\n */\n getExclusions : function () {\n return this.exclusions.join(\";\");\n }\n};\n\n/**\n * Tableau de clefs/valeurs pour param.\n *\n * @returns {Object[]} KVP\n */\nProcessIsoCurveParam.prototype.getParams = function () {\n var map = [];\n\n map.push({\n k : \"location\",\n v : this.getLocation()\n });\n\n map.push({\n k : \"smoothing\",\n v : this.smoothing\n });\n\n map.push({\n k : \"holes\",\n v : this.holes\n });\n\n map.push({\n k : \"reverse\",\n v : this.reverse\n });\n\n map.push({\n k : \"method\",\n v : this.method\n });\n\n if (this.time) {\n map.push({\n k : \"time\",\n v : this.time\n });\n }\n\n if (this.distance) {\n map.push({\n k : \"distance\",\n v : this.distance\n });\n }\n\n map.push({\n k : \"graphName\",\n v : this.graphName\n });\n\n if (this.exclusions) {\n map.push({\n k : \"exclusions\",\n v : this.getExclusions()\n });\n }\n\n if (this.srs) {\n map.push({\n k : \"srs\",\n v : this.srs\n });\n }\n\n return map;\n};\n\nexport default ProcessIsoCurveParam;\n" - }, - { - "id": 99, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "name": "./src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "index": 98, - "index2": 96, - "size": 7549, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "issuerId": 96, - "issuerName": "./src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "profile": { - "factory": 80, - "building": 378, - "dependencies": 166 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 96, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "module": "./src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "moduleName": "./src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "type": "harmony import", - "userRequest": "./Response/ProcessIsoCurveResponseFactory", - "loc": "8:0-87" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 4, - "source": "/**\n * Factory pour générer une reponse JSON à partir d'un XML ou d'un JSON\n * (Factory)\n *\n * @module ProcessIsoCurveResponseFactory\n * @alias Gp.Services.ProcessIsoCurve.Response.ProcessIsoCurveResponseFactory\n * @private\n */\nimport Logger from \"../../../Utils/LoggerByDefault\";\nimport MRes from \"../../../Utils/MessagesResources\";\nimport ErrorService from \"../../../Exceptions/ErrorService\";\nimport XML from \"../../../Formats/XML\";\nimport WKT from \"../../../Formats/WKT\";\nimport ProcessIsoCurveResponseReader from \"../Formats/ProcessIsoCurveResponseReader\";\nimport ProcessIsoCurveResponse from \"./model/ProcessIsoCurveResponse\";\n\nvar ProcessIsoCurveResponseFactory = {\n\n /**\n * interface unique\n *\n * @method build\n * @static\n * @param {Object} options - options definies dans le composant ProcessIsoCurve\n *\n * @example\n * var options = {\n * response :\n * outputFormat :\n * rawResponse :\n * scope :\n * onSuccess :\n * onError :\n * };\n *\n */\n build : function (options) {\n // logger\n var logger = Logger.getLogger(\"ProcessIsoCurveResponseFactory\");\n logger.trace([\"ProcessIsoCurveResponseFactory::build()\"]);\n\n var data = null;\n\n if (options.response) {\n if (options.rawResponse) {\n logger.trace(\"analyze response : raw\");\n data = options.response;\n } else {\n switch (options.outputFormat) {\n case \"xml\":\n logger.trace(\"analyze response : xml\");\n\n try {\n var p = new XML({\n reader : ProcessIsoCurveResponseReader\n });\n\n // FIXME : mode XHR ne retourne que des string ? JSONP aussi à ce niveau ?\n if (typeof options.response === \"string\") {\n p.setXMLString(options.response);\n } else {\n p.setXMLDoc(options.response);\n }\n\n data = p.parse();\n\n if (!data) {\n throw new Error(MRes.getMessage(\"SERVICE_RESPONSE_EXCEPTION_2\"));\n }\n } catch (e) {\n var message = e.message;\n message += \"\\n (raw response service : '\" + options.response + \"')\";\n options.onError.call(options.scope, new ErrorService({\n message : MRes.getMessage(\"SERVICE_RESPONSE_EXCEPTION\", message),\n status : 200,\n type : ErrorService.TYPE_SRVERR\n }));\n return;\n }\n\n break;\n\n case \"json\":\n logger.trace(\"analyze response : json\");\n\n var JSONResponse;\n if (typeof options.response === \"string\") {\n JSONResponse = JSON.parse(options.response);\n } else {\n JSONResponse = options.response;\n }\n\n // analyse de la reponse\n if (JSONResponse.status === \"OK\" || JSONResponse.status === \"ok\") {\n // création de l'objet de réponse\n data = new ProcessIsoCurveResponse();\n\n // remplissage de l'objet créé avec les attribtuts de la réponse du service\n if (data) {\n data.time = JSONResponse.time;\n data.distance = JSONResponse.distance;\n data.message = JSONResponse.message;\n data.id = JSONResponse.id;\n data.srs = JSONResponse.srs;\n // callback de la reponse\n var onWKTSuccess = function (json) {\n data.geometry = json;\n };\n // callback d'erreur\n var onWKTError = function () {\n options.onError.call(options.scope, new ErrorService({\n message : MRes.getMessage(\"PARAM_FORMAT\", \"wktGeometry\")\n }));\n };\n if (data.hasOwnProperty(\"geometry\")) {\n WKT.toJson(JSONResponse.wktGeometry, onWKTSuccess, onWKTError);\n if (!data.geometry) {\n return;\n }\n }\n var coords = JSONResponse.location.split(\",\");\n if (data.location) {\n data.location.x = coords[0];\n data.location.y = coords[1];\n }\n } else {\n options.onError.call(options.scope, new ErrorService(MRes.getMessage(\"SERVICE_RESPONSE_ANALYSE\", options.response)));\n return;\n }\n } else if (JSONResponse.status === \"ERROR\" || JSONResponse.status === \"error\") {\n // JSHint bug if var message is used !?\n var mess = JSONResponse.message;\n mess += \"\\n (raw response service : '\" + JSONResponse + \"')\";\n options.onError.call(options.scope, new ErrorService(MRes.getMessage(\"SERVICE_RESPONSE_EXCEPTION\", mess)));\n return;\n }\n break;\n\n default:\n options.onError.call(options.scope, new ErrorService(MRes.getMessage(\"SERVICE_RESPONSE_FORMAT\", \"json\", \"xml\")));\n return;\n }\n\n // info : en cas de problèmes de droits (clé invalide ou autre), la réponse est au format XML !!\n // ex. Key does not exist or has expired\n // mais le statut est 403, l'erreur est donc remontée plus tôt.\n if (data && data.exceptionReport) {\n options.onError.call(options.scope, new ErrorService({\n message : MRes.getMessage(\"SERVICE_RESPONSE_EXCEPTION\", data.exceptionReport),\n type : ErrorService.TYPE_SRVERR,\n status : 200\n }));\n return;\n }\n }\n } else {\n // si la réponse est vide, on appelle le callback d'erreur\n options.onError.call(options.scope, new ErrorService(MRes.getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n return;\n }\n\n // si tout s'est bien passé, on appelle le callback de succès\n options.onSuccess.call(options.scope, data);\n }\n};\n\nexport default ProcessIsoCurveResponseFactory;\n" - }, - { - "id": 100, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Formats/ProcessIsoCurveResponseReader.js", - "name": "./src/Services/ProcessIsoCurve/Formats/ProcessIsoCurveResponseReader.js", - "index": 99, - "index2": 95, - "size": 9051, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "issuerId": 99, - "issuerName": "./src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "profile": { - "factory": 170, - "building": 912, - "dependencies": 2 - }, - "failed": false, - "errors": 0, - "warnings": 1, - "reasons": [ - { - "moduleId": 99, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "module": "./src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "moduleName": "./src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "type": "harmony import", - "userRequest": "../Formats/ProcessIsoCurveResponseReader", - "loc": "14:0-85" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "/**\n * Analyse de la reponse XML\n *\n * @module ProcessIsoCurveResponseReader\n * @alias Gp.Services.ProcessIsoCurve.Formats.ProcessIsoCurveResponseReader\n * @todo not yet implemented !\n * @private\n */\n\nimport MessagesResources from \"../../../Utils/MessagesResources\";\nimport WKT from \"../../../Formats/WKT\";\nimport ErrSrv from \"../../../Exceptions/ErrorService\";\nimport ProcessIsoCurveResponse from \"../Response/model/ProcessIsoCurveResponse\";\n\n/**\n * Objet ProcessIsoCurveResponseReader\n *\n * @member {Object} ProcessIsoCurveResponseReader\n *\n * @property {Object} ProcessIsoCurveResponseReader.READERS - Objet contenant des fonctions de lecture, appelées \"readers\"\n * dont chaque clé correspond au nom d'un tag du XML que l'on souhaite lire\n * et la valeur associée est une fonction (node, data)\n * où node est un noeud du document DOM\n * et data est un objet où l'on stocke les informations lues dans le XML.\n *\n * @property {Method} ProcessIsoCurveResponseReader.read - Méthode permettant de lancer la lecture d'une réponse XML\n * du service de calcul isochrone/isodistance, à l'aide des readers de la classe.\n *\n */\n\nvar ProcessIsoCurveResponseReader = {};\n\n/*\n // INFO\n // Exemple d'erreur du service\n // \n // \n // Location point must have 2 components separated with a ,\n // ERROR\n // \n\n // \n // \n // ServiceException : Error in isochron computation Error in smartrouting null\n // ERROR\n // \n\n // INFO\n // Exemple d'erreur NGinx\n // Resource parameter not found\n*/\n\n/*\n // INFO\n // Exemple de réponse du service\n\n // \n // OK\n // \n // -1.557189,47.217122\n // \n // 5000\n // POLYGON ((-1.545312 47.178178, -1.545312 47.180418, ...))\n // \n\n // \n // OK\n // 1\n // -1.557189,47.217122\n // \n // \n // POLYGON ((-1.556864 47.216487, -1.556864 47.216948, ...))\n // \n*/\n\nProcessIsoCurveResponseReader.READERS = {\n\n /** TODO : jsdoc block */\n isochronResult : function (root) {\n // racine de la réponse XML : on crée l'objet de réponse\n var response = new ProcessIsoCurveResponse();\n\n if (root.hasChildNodes()) {\n var children = root.childNodes;\n var child;\n\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n\n if (ProcessIsoCurveResponseReader.READERS[child.nodeName]) {\n ProcessIsoCurveResponseReader.READERS[child.nodeName](child, response);\n }\n }\n }\n\n if (response.status === \"error\") {\n var message = MessagesResources.getMessage(\"SERVICE_RESPONSE_EXCEPTION\",\n response.message);\n throw new ErrSrv({\n message : message,\n type : ErrSrv.TYPE_SRVERR\n });\n }\n return response;\n },\n\n /** TODO : jsdoc block */\n message : function (node, response) {\n if (response) {\n response.message = __getChildValue(node);\n }\n },\n\n /** TODO : jsdoc block */\n status : function (node, response) {\n var status = __getChildValue(node);\n if (status === \"ERROR\" || status === \"error\") {\n if (response) {\n response.status = \"error\";\n }\n }\n },\n\n /** TODO : jsdoc block */\n id : function (node, response) {\n if (response) {\n response.id = __getChildValue(node);\n }\n },\n\n /** TODO : jsdoc block */\n location : function (node, response) {\n var coords = __getChildValue(node);\n if (response && response.location) {\n response.location.x = parseFloat(coords.split(\",\")[0]);\n response.location.y = parseFloat(coords.split(\",\")[1]);\n }\n },\n\n /** TODO : jsdoc block */\n srs : function (node, response) {\n if (response) {\n response.srs = __getChildValue(node);\n }\n },\n\n /** TODO : jsdoc block */\n distance : function (node, response) {\n if (response) {\n response.distance = parseFloat(__getChildValue(node));\n }\n },\n\n /** TODO : jsdoc block */\n time : function (node, response) {\n if (response) {\n response.time = parseFloat(__getChildValue(node));\n }\n },\n\n /** TODO : jsdoc block */\n wktGeometry : function (node, response) {\n if (response) {\n var wktGeometry = node.innerHTML;\n /** TODO : jsdoc block */\n var onWKTSuccess = function (json) {\n response.geometry = json;\n };\n /** TODO : jsdoc block */\n var onWKTError = function () {\n var msg = MessagesResources.getMessage(\"PARAM_FORMAT\", [\"wktGeometry\"]);\n throw new Error(msg);\n };\n if (response.hasOwnProperty(\"geometry\")) {\n WKT.toJson(wktGeometry, onWKTSuccess, onWKTError);\n }\n }\n },\n\n /** TODO : jsdoc block */\n serviceResult : function (node) {\n // en cas d'exception du service\n var response = {};\n if (node.hasChildNodes()) {\n var children = node.childNodes;\n var child;\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n if (ProcessIsoCurveResponseReader.READERS[child.nodeName]) {\n ProcessIsoCurveResponseReader.READERS[child.nodeName](child, response);\n }\n }\n }\n return response;\n },\n\n /** TODO : jsdoc block */\n ExceptionReport : function (node) {\n var response = {};\n if (node.hasChildNodes()) {\n var children = node.childNodes;\n var child;\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n if (child.nodeName === \"Exception\") {\n response.exceptionReport = ProcessIsoCurveResponseReader.READERS[\"Exception\"](child);\n }\n }\n }\n return response;\n },\n\n /** TODO : jsdoc block */\n Exception : function (node) {\n var exceptionReport = {};\n\n // get exception code\n var exceptionCode = node.getAttribute(\"exceptionCode\");\n if (exceptionCode) {\n exceptionReport.exceptionCode = exceptionCode;\n }\n\n // get exception message\n var textNode = node.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n exceptionReport.exception = textNode.nodeValue;\n }\n\n return exceptionReport;\n }\n};\n\n/** TODO : jsdoc block */\nProcessIsoCurveResponseReader.read = function (root) {\n var response;\n\n if (root.nodeName === \"isochronResult\" || root.nodeName === \"isochroneResult\" || root.nodeName === \"IsochroneResult\") {\n response = ProcessIsoCurveResponseReader.READERS[\"isochronResult\"](root);\n return response;\n } else if (root.nodeName === \"ExceptionReport\") {\n response = ProcessIsoCurveResponseReader.READERS[root.nodeName](root);\n return response;\n } else if (ProcessIsoCurveResponseReader.READERS[root.nodeName]) {\n response = ProcessIsoCurveResponseReader.READERS[root.nodeName](root);\n if (response.status === \"error\") {\n var errMsg = MessagesResources.getMessage(\"SERVICE_RESPONSE_EXCEPTION\",\n response.message);\n throw new ErrSrv({\n message : errMsg,\n type : ErrSrv.TYPE_SRVERR\n });\n }\n return response;\n } else {\n throw new ErrSrv({\n message : MessagesResources.getMessage(\"SERVICE_RESPONSE_ANALYSE\", root.nodeName),\n type : ErrSrv.TYPE_UNKERR\n });\n }\n};\n\n/**\n * Lecture de la valeur du premier child d'un noeud, si elle existe.\n *\n * @private\n * @memberof ProcessIsoCurveResponseReader\n * @method __getChildValue\n * @param {DOMElement} node - a DOM node\n * @return {String} value - valeur du firstChild du noeud en entrée, ou chaîne vide.\n */\nfunction __getChildValue (node) {\n var textNode;\n var value = \"\";\n\n if (node.hasChildNodes()) {\n textNode = node.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n value = textNode.nodeValue;\n }\n }\n return value;\n}\n\nexport default ProcessIsoCurveResponseReader;\n" - } - ], - "filteredModules": 0, - "origins": [ - { - "moduleId": 43, - "module": "multi /home/jpbazonnais/Projets/geoportal-access-lib/src/Gp", - "moduleIdentifier": "multi /home/jpbazonnais/Projets/geoportal-access-lib/src/Gp", - "moduleName": "multi ./src/Gp", - "loc": "", - "name": "main", - "reasons": [] - } - ] - } - ], - "modules": [ - { - "id": 0, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Utils/LoggerByDefault.js", - "name": "./src/Utils/LoggerByDefault.js", - "index": 4, - "index2": 1, - "size": 553, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Protocols/XHR.js", - "issuerId": 19, - "issuerName": "./src/Protocols/XHR.js", - "profile": { - "factory": 393, - "building": 359 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 3, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/CommonService.js", - "module": "./src/Services/CommonService.js", - "moduleName": "./src/Services/CommonService.js", - "type": "harmony import", - "userRequest": "../Utils/LoggerByDefault", - "loc": "1:0-46" - }, - { - "moduleId": 6, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XML.js", - "module": "./src/Formats/XML.js", - "moduleName": "./src/Formats/XML.js", - "type": "harmony import", - "userRequest": "../Utils/LoggerByDefault", - "loc": "3:0-46" - }, - { - "moduleId": 8, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/WKT.js", - "module": "./src/Formats/WKT.js", - "moduleName": "./src/Formats/WKT.js", - "type": "harmony import", - "userRequest": "../Utils/LoggerByDefault", - "loc": "1:0-46" - }, - { - "moduleId": 11, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS.js", - "module": "./src/Formats/XLS.js", - "moduleName": "./src/Formats/XLS.js", - "type": "harmony import", - "userRequest": "../Utils/LoggerByDefault", - "loc": "1:0-46" - }, - { - "moduleId": 12, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/AbstractService.js", - "module": "./src/Formats/XLS/AbstractService.js", - "moduleName": "./src/Formats/XLS/AbstractService.js", - "type": "harmony import", - "userRequest": "../../Utils/LoggerByDefault", - "loc": "1:0-49" - }, - { - "moduleId": 13, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService/GeocodeFilterExtension.js", - "module": "./src/Formats/XLS/LocationUtilityService/GeocodeFilterExtension.js", - "moduleName": "./src/Formats/XLS/LocationUtilityService/GeocodeFilterExtension.js", - "type": "harmony import", - "userRequest": "../../../Utils/LoggerByDefault", - "loc": "2:0-52" - }, - { - "moduleId": 19, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Protocols/XHR.js", - "module": "./src/Protocols/XHR.js", - "moduleName": "./src/Protocols/XHR.js", - "type": "harmony import", - "userRequest": "../Utils/LoggerByDefault", - "loc": "3:0-46" - }, - { - "moduleId": 21, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/model/AltiElevationRequest.js", - "module": "./src/Services/Alti/Request/model/AltiElevationRequest.js", - "moduleName": "./src/Services/Alti/Request/model/AltiElevationRequest.js", - "type": "harmony import", - "userRequest": "../../../../Utils/LoggerByDefault", - "loc": "2:0-55" - }, - { - "moduleId": 22, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/model/AltiRequest.js", - "module": "./src/Services/Alti/Request/model/AltiRequest.js", - "moduleName": "./src/Services/Alti/Request/model/AltiRequest.js", - "type": "harmony import", - "userRequest": "../../../../Utils/LoggerByDefault", - "loc": "2:0-55" - }, - { - "moduleId": 23, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/model/AltiProfilRequest.js", - "module": "./src/Services/Alti/Request/model/AltiProfilRequest.js", - "moduleName": "./src/Services/Alti/Request/model/AltiProfilRequest.js", - "type": "harmony import", - "userRequest": "../../../../Utils/LoggerByDefault", - "loc": "2:0-55" - }, - { - "moduleId": 38, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService.js", - "module": "./src/Formats/XLS/LocationUtilityService.js", - "moduleName": "./src/Formats/XLS/LocationUtilityService.js", - "type": "harmony import", - "userRequest": "../../Utils/LoggerByDefault", - "loc": "1:0-49" - }, - { - "moduleId": 46, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Alti.js", - "module": "./src/Services/Alti/Alti.js", - "moduleName": "./src/Services/Alti/Alti.js", - "type": "harmony import", - "userRequest": "../../Utils/LoggerByDefault", - "loc": "2:0-49" - }, - { - "moduleId": 53, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Protocols/JSONP.js", - "module": "./src/Protocols/JSONP.js", - "moduleName": "./src/Protocols/JSONP.js", - "type": "harmony import", - "userRequest": "../Utils/LoggerByDefault", - "loc": "8:0-46" - }, - { - "moduleId": 54, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestFactory.js", - "module": "./src/Services/Alti/Request/AltiRequestFactory.js", - "moduleName": "./src/Services/Alti/Request/AltiRequestFactory.js", - "type": "harmony import", - "userRequest": "../../../Utils/LoggerByDefault", - "loc": "9:0-52" - }, - { - "moduleId": 55, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestREST.js", - "module": "./src/Services/Alti/Request/AltiRequestREST.js", - "moduleName": "./src/Services/Alti/Request/AltiRequestREST.js", - "type": "harmony import", - "userRequest": "../../../Utils/LoggerByDefault", - "loc": "3:0-52" - }, - { - "moduleId": 56, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestWPS.js", - "module": "./src/Services/Alti/Request/AltiRequestWPS.js", - "moduleName": "./src/Services/Alti/Request/AltiRequestWPS.js", - "type": "harmony import", - "userRequest": "../../../Utils/LoggerByDefault", - "loc": "9:0-52" - }, - { - "moduleId": 57, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/WPS.js", - "module": "./src/Formats/WPS.js", - "moduleName": "./src/Formats/WPS.js", - "type": "harmony import", - "userRequest": "../Utils/LoggerByDefault", - "loc": "1:0-46" - }, - { - "moduleId": 58, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Response/AltiResponseFactory.js", - "module": "./src/Services/Alti/Response/AltiResponseFactory.js", - "moduleName": "./src/Services/Alti/Response/AltiResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Utils/LoggerByDefault", - "loc": "9:0-52" - }, - { - "moduleId": 60, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/AutoConf.js", - "module": "./src/Services/AutoConf/AutoConf.js", - "moduleName": "./src/Services/AutoConf/AutoConf.js", - "type": "harmony import", - "userRequest": "../../Utils/LoggerByDefault", - "loc": "2:0-49" - }, - { - "moduleId": 61, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Response/AutoConfResponseFactory.js", - "module": "./src/Services/AutoConf/Response/AutoConfResponseFactory.js", - "moduleName": "./src/Services/AutoConf/Response/AutoConfResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Utils/LoggerByDefault", - "loc": "9:0-52" - }, - { - "moduleId": 63, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Geocode.js", - "module": "./src/Services/Geocode/Geocode.js", - "moduleName": "./src/Services/Geocode/Geocode.js", - "type": "harmony import", - "userRequest": "../../Utils/LoggerByDefault", - "loc": "2:0-49" - }, - { - "moduleId": 64, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "module": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "moduleName": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "type": "harmony import", - "userRequest": "../../../Utils/LoggerByDefault", - "loc": "9:0-52" - }, - { - "moduleId": 65, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/RequestHeader.js", - "module": "./src/Formats/XLS/RequestHeader.js", - "moduleName": "./src/Formats/XLS/RequestHeader.js", - "type": "harmony import", - "userRequest": "../../Utils/LoggerByDefault", - "loc": "1:0-49" - }, - { - "moduleId": 66, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/Request.js", - "module": "./src/Formats/XLS/Request.js", - "moduleName": "./src/Formats/XLS/Request.js", - "type": "harmony import", - "userRequest": "../../Utils/LoggerByDefault", - "loc": "2:0-49" - }, - { - "moduleId": 67, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService/GeocodeRequest.js", - "module": "./src/Formats/XLS/LocationUtilityService/GeocodeRequest.js", - "moduleName": "./src/Formats/XLS/LocationUtilityService/GeocodeRequest.js", - "type": "harmony import", - "userRequest": "../../../Utils/LoggerByDefault", - "loc": "1:0-52" - }, - { - "moduleId": 68, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService/model/Address.js", - "module": "./src/Formats/XLS/LocationUtilityService/model/Address.js", - "moduleName": "./src/Formats/XLS/LocationUtilityService/model/Address.js", - "type": "harmony import", - "userRequest": "../../../../Utils/LoggerByDefault", - "loc": "2:0-55" - }, - { - "moduleId": 69, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService/ReverseGeocodeRequest.js", - "module": "./src/Formats/XLS/LocationUtilityService/ReverseGeocodeRequest.js", - "moduleName": "./src/Formats/XLS/LocationUtilityService/ReverseGeocodeRequest.js", - "type": "harmony import", - "userRequest": "../../../Utils/LoggerByDefault", - "loc": "2:0-52" - }, - { - "moduleId": 70, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService/model/Position.js", - "module": "./src/Formats/XLS/LocationUtilityService/model/Position.js", - "moduleName": "./src/Formats/XLS/LocationUtilityService/model/Position.js", - "type": "harmony import", - "userRequest": "../../../../Utils/LoggerByDefault", - "loc": "1:0-55" - }, - { - "moduleId": 71, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService/model/Preference.js", - "module": "./src/Formats/XLS/LocationUtilityService/model/Preference.js", - "moduleName": "./src/Formats/XLS/LocationUtilityService/model/Preference.js", - "type": "harmony import", - "userRequest": "../../../../Utils/LoggerByDefault", - "loc": "1:0-55" - }, - { - "moduleId": 78, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/ReverseGeocode.js", - "module": "./src/Services/Geocode/ReverseGeocode.js", - "moduleName": "./src/Services/Geocode/ReverseGeocode.js", - "type": "harmony import", - "userRequest": "../../Utils/LoggerByDefault", - "loc": "2:0-49" - }, - { - "moduleId": 79, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/ReverseGeocodeRequestFactory.js", - "module": "./src/Services/Geocode/Request/ReverseGeocodeRequestFactory.js", - "moduleName": "./src/Services/Geocode/Request/ReverseGeocodeRequestFactory.js", - "type": "harmony import", - "userRequest": "../../../Utils/LoggerByDefault", - "loc": "9:0-52" - }, - { - "moduleId": 82, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoComplete/AutoComplete.js", - "module": "./src/Services/AutoComplete/AutoComplete.js", - "moduleName": "./src/Services/AutoComplete/AutoComplete.js", - "type": "harmony import", - "userRequest": "../../Utils/LoggerByDefault", - "loc": "3:0-49" - }, - { - "moduleId": 83, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoComplete/Response/AutoCompleteResponseFactory.js", - "module": "./src/Services/AutoComplete/Response/AutoCompleteResponseFactory.js", - "moduleName": "./src/Services/AutoComplete/Response/AutoCompleteResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Utils/LoggerByDefault", - "loc": "9:0-52" - }, - { - "moduleId": 84, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Route.js", - "module": "./src/Services/Route/Route.js", - "moduleName": "./src/Services/Route/Route.js", - "type": "harmony import", - "userRequest": "../../Utils/LoggerByDefault", - "loc": "2:0-49" - }, - { - "moduleId": 85, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Request/RouteRequestFactory.js", - "module": "./src/Services/Route/Request/RouteRequestFactory.js", - "moduleName": "./src/Services/Route/Request/RouteRequestFactory.js", - "type": "harmony import", - "userRequest": "../../../Utils/LoggerByDefault", - "loc": "9:0-52" - }, - { - "moduleId": 86, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Request/RouteRequestOLS.js", - "module": "./src/Services/Route/Request/RouteRequestOLS.js", - "moduleName": "./src/Services/Route/Request/RouteRequestOLS.js", - "type": "harmony import", - "userRequest": "../../../Utils/LoggerByDefault", - "loc": "9:0-52" - }, - { - "moduleId": 87, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/RouteService.js", - "module": "./src/Formats/XLS/RouteService.js", - "moduleName": "./src/Formats/XLS/RouteService.js", - "type": "harmony import", - "userRequest": "../../Utils/LoggerByDefault", - "loc": "1:0-49" - }, - { - "moduleId": 88, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/RouteService/DetermineRouteRequest.js", - "module": "./src/Formats/XLS/RouteService/DetermineRouteRequest.js", - "moduleName": "./src/Formats/XLS/RouteService/DetermineRouteRequest.js", - "type": "harmony import", - "userRequest": "../../../Utils/LoggerByDefault", - "loc": "1:0-52" - }, - { - "moduleId": 89, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/RouteService/model/RoutePlan.js", - "module": "./src/Formats/XLS/RouteService/model/RoutePlan.js", - "moduleName": "./src/Formats/XLS/RouteService/model/RoutePlan.js", - "type": "harmony import", - "userRequest": "../../../../Utils/LoggerByDefault", - "loc": "1:0-55" - }, - { - "moduleId": 91, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Request/RouteRequestREST.js", - "module": "./src/Services/Route/Request/RouteRequestREST.js", - "moduleName": "./src/Services/Route/Request/RouteRequestREST.js", - "type": "harmony import", - "userRequest": "../../../Utils/LoggerByDefault", - "loc": "2:0-52" - }, - { - "moduleId": 92, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Request/model/RouteParamREST.js", - "module": "./src/Services/Route/Request/model/RouteParamREST.js", - "moduleName": "./src/Services/Route/Request/model/RouteParamREST.js", - "type": "harmony import", - "userRequest": "../../../../Utils/LoggerByDefault", - "loc": "2:0-55" - }, - { - "moduleId": 93, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Response/RouteResponseFactory.js", - "module": "./src/Services/Route/Response/RouteResponseFactory.js", - "moduleName": "./src/Services/Route/Response/RouteResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Utils/LoggerByDefault", - "loc": "9:0-52" - }, - { - "moduleId": 95, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Formats/RouteResponseOLSReader.js", - "module": "./src/Services/Route/Formats/RouteResponseOLSReader.js", - "moduleName": "./src/Services/Route/Formats/RouteResponseOLSReader.js", - "type": "harmony import", - "userRequest": "../../../Utils/LoggerByDefault", - "loc": "10:0-52" - }, - { - "moduleId": 96, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "module": "./src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "moduleName": "./src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "type": "harmony import", - "userRequest": "../../Utils/LoggerByDefault", - "loc": "2:0-49" - }, - { - "moduleId": 97, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Request/ProcessIsoCurveRequest.js", - "module": "./src/Services/ProcessIsoCurve/Request/ProcessIsoCurveRequest.js", - "moduleName": "./src/Services/ProcessIsoCurve/Request/ProcessIsoCurveRequest.js", - "type": "harmony import", - "userRequest": "../../../Utils/LoggerByDefault", - "loc": "2:0-52" - }, - { - "moduleId": 98, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Request/model/ProcessIsoCurveParam.js", - "module": "./src/Services/ProcessIsoCurve/Request/model/ProcessIsoCurveParam.js", - "moduleName": "./src/Services/ProcessIsoCurve/Request/model/ProcessIsoCurveParam.js", - "type": "harmony import", - "userRequest": "../../../../Utils/LoggerByDefault", - "loc": "2:0-55" - }, - { - "moduleId": 99, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "module": "./src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "moduleName": "./src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Utils/LoggerByDefault", - "loc": "9:0-52" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 3, - "source": "/* global __PRODUCTION__ */\nimport * as Log from \"loglevel\";\n\nvar LoggerByDefault = {\n /**\n * logger statique\n *\n * @static\n * @param {String} name - nom du logger\n * @returns {Object} retourne un logger\n */\n getLogger : function (name) {\n // Substitute global constants configured at compile time\n // cf. webpack.config.js\n (__PRODUCTION__) ? Log.disableAll() : Log.enableAll();\n var logname = name || \"default\";\n return Log.getLogger(logname);\n }\n};\n\nexport default LoggerByDefault;\n" - }, - { - "id": 1, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Utils/MessagesResources.js", - "name": "./src/Utils/MessagesResources.js", - "index": 6, - "index2": 2, - "size": 3078, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Alti.js", - "issuerId": 46, - "issuerName": "./src/Services/Alti/Alti.js", - "profile": { - "factory": 362, - "building": 27 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 3, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/CommonService.js", - "module": "./src/Services/CommonService.js", - "moduleName": "./src/Services/CommonService.js", - "type": "harmony import", - "userRequest": "../Utils/MessagesResources", - "loc": "3:0-43" - }, - { - "moduleId": 46, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Alti.js", - "module": "./src/Services/Alti/Alti.js", - "moduleName": "./src/Services/Alti/Alti.js", - "type": "harmony import", - "userRequest": "../../Utils/MessagesResources", - "loc": "3:0-46" - }, - { - "moduleId": 55, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestREST.js", - "module": "./src/Services/Alti/Request/AltiRequestREST.js", - "moduleName": "./src/Services/Alti/Request/AltiRequestREST.js", - "type": "harmony import", - "userRequest": "../../../Utils/MessagesResources", - "loc": "4:0-49" - }, - { - "moduleId": 56, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestWPS.js", - "module": "./src/Services/Alti/Request/AltiRequestWPS.js", - "moduleName": "./src/Services/Alti/Request/AltiRequestWPS.js", - "type": "harmony import", - "userRequest": "../../../Utils/MessagesResources", - "loc": "10:0-49" - }, - { - "moduleId": 58, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Response/AltiResponseFactory.js", - "module": "./src/Services/Alti/Response/AltiResponseFactory.js", - "moduleName": "./src/Services/Alti/Response/AltiResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Utils/MessagesResources", - "loc": "10:0-52" - }, - { - "moduleId": 60, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/AutoConf.js", - "module": "./src/Services/AutoConf/AutoConf.js", - "moduleName": "./src/Services/AutoConf/AutoConf.js", - "type": "harmony import", - "userRequest": "../../Utils/MessagesResources", - "loc": "3:0-46" - }, - { - "moduleId": 61, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Response/AutoConfResponseFactory.js", - "module": "./src/Services/AutoConf/Response/AutoConfResponseFactory.js", - "moduleName": "./src/Services/AutoConf/Response/AutoConfResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Utils/MessagesResources", - "loc": "10:0-52" - }, - { - "moduleId": 63, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Geocode.js", - "module": "./src/Services/Geocode/Geocode.js", - "moduleName": "./src/Services/Geocode/Geocode.js", - "type": "harmony import", - "userRequest": "../../Utils/MessagesResources", - "loc": "3:0-46" - }, - { - "moduleId": 76, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Response/DirectGeocodeResponseFactory.js", - "module": "./src/Services/Geocode/Response/DirectGeocodeResponseFactory.js", - "moduleName": "./src/Services/Geocode/Response/DirectGeocodeResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Utils/MessagesResources", - "loc": "13:0-52" - }, - { - "moduleId": 77, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Formats/DirectGeocodeResponseReader.js", - "module": "./src/Services/Geocode/Formats/DirectGeocodeResponseReader.js", - "moduleName": "./src/Services/Geocode/Formats/DirectGeocodeResponseReader.js", - "type": "harmony import", - "userRequest": "../../../Utils/MessagesResources", - "loc": "12:0-50" - }, - { - "moduleId": 78, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/ReverseGeocode.js", - "module": "./src/Services/Geocode/ReverseGeocode.js", - "moduleName": "./src/Services/Geocode/ReverseGeocode.js", - "type": "harmony import", - "userRequest": "../../Utils/MessagesResources", - "loc": "3:0-46" - }, - { - "moduleId": 80, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Response/ReverseGeocodeResponseFactory.js", - "module": "./src/Services/Geocode/Response/ReverseGeocodeResponseFactory.js", - "moduleName": "./src/Services/Geocode/Response/ReverseGeocodeResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Utils/MessagesResources", - "loc": "12:0-52" - }, - { - "moduleId": 81, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Formats/ReverseGeocodeResponseReader.js", - "module": "./src/Services/Geocode/Formats/ReverseGeocodeResponseReader.js", - "moduleName": "./src/Services/Geocode/Formats/ReverseGeocodeResponseReader.js", - "type": "harmony import", - "userRequest": "../../../Utils/MessagesResources", - "loc": "12:0-50" - }, - { - "moduleId": 82, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoComplete/AutoComplete.js", - "module": "./src/Services/AutoComplete/AutoComplete.js", - "moduleName": "./src/Services/AutoComplete/AutoComplete.js", - "type": "harmony import", - "userRequest": "../../Utils/MessagesResources", - "loc": "4:0-47" - }, - { - "moduleId": 83, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoComplete/Response/AutoCompleteResponseFactory.js", - "module": "./src/Services/AutoComplete/Response/AutoCompleteResponseFactory.js", - "moduleName": "./src/Services/AutoComplete/Response/AutoCompleteResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Utils/MessagesResources", - "loc": "10:0-52" - }, - { - "moduleId": 84, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Route.js", - "module": "./src/Services/Route/Route.js", - "moduleName": "./src/Services/Route/Route.js", - "type": "harmony import", - "userRequest": "../../Utils/MessagesResources", - "loc": "3:0-46" - }, - { - "moduleId": 91, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Request/RouteRequestREST.js", - "module": "./src/Services/Route/Request/RouteRequestREST.js", - "moduleName": "./src/Services/Route/Request/RouteRequestREST.js", - "type": "harmony import", - "userRequest": "../../../Utils/MessagesResources", - "loc": "3:0-49" - }, - { - "moduleId": 93, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Response/RouteResponseFactory.js", - "module": "./src/Services/Route/Response/RouteResponseFactory.js", - "moduleName": "./src/Services/Route/Response/RouteResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Utils/MessagesResources", - "loc": "10:0-52" - }, - { - "moduleId": 94, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Formats/RouteResponseRESTReader.js", - "module": "./src/Services/Route/Formats/RouteResponseRESTReader.js", - "moduleName": "./src/Services/Route/Formats/RouteResponseRESTReader.js", - "type": "harmony import", - "userRequest": "../../../Utils/MessagesResources", - "loc": "11:0-65" - }, - { - "moduleId": 96, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "module": "./src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "moduleName": "./src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "type": "harmony import", - "userRequest": "../../Utils/MessagesResources", - "loc": "3:0-46" - }, - { - "moduleId": 97, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Request/ProcessIsoCurveRequest.js", - "module": "./src/Services/ProcessIsoCurve/Request/ProcessIsoCurveRequest.js", - "moduleName": "./src/Services/ProcessIsoCurve/Request/ProcessIsoCurveRequest.js", - "type": "harmony import", - "userRequest": "../../../Utils/MessagesResources", - "loc": "3:0-49" - }, - { - "moduleId": 99, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "module": "./src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "moduleName": "./src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Utils/MessagesResources", - "loc": "10:0-52" - }, - { - "moduleId": 100, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Formats/ProcessIsoCurveResponseReader.js", - "module": "./src/Services/ProcessIsoCurve/Formats/ProcessIsoCurveResponseReader.js", - "moduleName": "./src/Services/ProcessIsoCurve/Formats/ProcessIsoCurveResponseReader.js", - "type": "harmony import", - "userRequest": "../../../Utils/MessagesResources", - "loc": "10:0-65" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 4, - "source": "/**\n * Classe de gestion des erreurs qui permer d'associer un message d'erreur à l'exception lancée.\n *\n * @example\n * MessagesResources.getMessage(\"ERROR_PARAM_MISSING\", \"x\", \"y\", \"z\")));\n * // --> output : Parameter(s) 'x - y - z' missing\n *\n * @module MessagesResources\n * @alias Gp.Utils.MessagesResources\n * @private\n */\nvar MessagesResources = {\n\n // Paramètres\n PARAM_MISSING : \"Parameter(s) '%var%' missing\",\n PARAM_EMPTY : \"Parameter(s) '%var%' empty\",\n PARAM_TYPE : \"Wrong type(s) for parameter(s) '%var%'\",\n PARAM_FORMAT : \"Parameter(s) '%var%' not correctly formatted\",\n PARAM_NOT_SUPPORT : \"Value(s) for parameter(s) '%var%' not supported\",\n PARAM_NOT_SUPPORT_NODEJS : \"Value(s) for parameter(s) '%var%' not supported to NodeJS\",\n PARAM_UNKNOWN : \"Value(s) for parameter(s) '%var%' unknown\",\n\n // Services\n // Requête\n SERVICE_REQUEST_BUILD : \"An error occurred during the request building of the service\",\n SERVICE_REQUEST_EMPTY : \"The request sent to the service is empty\",\n\n // Réponse\n SERVICE_RESPONSE_EXCEPTION : \"The service returned an exception : '%var%'\",\n SERVICE_RESPONSE_EXCEPTION_2 : \"The service returned an exception\",\n SERVICE_RESPONSE_ANALYSE : \"An error occurred while parsing the response '%var%' of the service\",\n SERVICE_RESPONSE_ANALYSE_2 : \"An unknown error occurred while parsing the response\",\n SERVICE_RESPONSE_EMPTY : \"The response of the service is empty\",\n SERVICE_RESPONSE_EMPTY_2 : \"The response from the service could not be analyzed or is empty\",\n SERVICE_RESPONSE_FORMAT : \"The format of the service response is not supported (handled format(s) : '%var%')\",\n SERVICE_RESPONSE_FORMAT_2 : \"The format of the service response is not supported\",\n SERVICE_RESPONSE_FORMAT_3 : \"No suggestion matching the search\",\n\n // Classes\n CLASS_CONSTRUCTOR : \"'%var%' constructor cannot be called as a function.\",\n\n /**\n * Fonction qui va retourner le message d'erreur associé à la clé donnée\n *\n * @method getMessage\n * @param {String} clef - Clef de l'erreur (ex : ERROR_PARAM)\n * @param {String[]} parametres - Paramètres/variables concernés par le message d'erreur associé à la clef donnée\n * @return {String} message - String contenant le message de l'exception\n */\n getMessage : function (clef, parametres) {\n // param de la fonction uniquement pour la documentation...\n\n if (Object.keys(arguments).length === 0) {\n return \"Message indefined !\";\n }\n\n var params = Array.prototype.slice.call(arguments);\n var key = params.shift();\n var args = params;\n\n var message = this[key];\n\n try {\n if (Array.isArray(args) && args.length > 0) {\n message = message.replace(\"%var%\", args.join(\" - \"));\n } else {\n message = message.replace(\"%var%\", \"%var% (not specified)\");\n }\n } catch (e) {\n // error de string.replace()\n\n }\n\n return message;\n }\n};\n\nexport default MessagesResources;\n" - }, - { - "id": 2, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Exceptions/ErrorService.js", - "name": "./src/Exceptions/ErrorService.js", - "index": 7, - "index2": 3, - "size": 2320, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 55, - "building": 256 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 3, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/CommonService.js", - "module": "./src/Services/CommonService.js", - "moduleName": "./src/Services/CommonService.js", - "type": "harmony import", - "userRequest": "../Exceptions/ErrorService", - "loc": "5:0-54" - }, - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Exceptions/ErrorService", - "loc": "29:0-46" - }, - { - "moduleId": 46, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Alti.js", - "module": "./src/Services/Alti/Alti.js", - "moduleName": "./src/Services/Alti/Alti.js", - "type": "harmony import", - "userRequest": "../../Exceptions/ErrorService", - "loc": "4:0-57" - }, - { - "moduleId": 54, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestFactory.js", - "module": "./src/Services/Alti/Request/AltiRequestFactory.js", - "moduleName": "./src/Services/Alti/Request/AltiRequestFactory.js", - "type": "harmony import", - "userRequest": "../../../Exceptions/ErrorService", - "loc": "10:0-60" - }, - { - "moduleId": 58, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Response/AltiResponseFactory.js", - "module": "./src/Services/Alti/Response/AltiResponseFactory.js", - "moduleName": "./src/Services/Alti/Response/AltiResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Exceptions/ErrorService", - "loc": "11:0-60" - }, - { - "moduleId": 60, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/AutoConf.js", - "module": "./src/Services/AutoConf/AutoConf.js", - "moduleName": "./src/Services/AutoConf/AutoConf.js", - "type": "harmony import", - "userRequest": "../../Exceptions/ErrorService", - "loc": "5:0-57" - }, - { - "moduleId": 61, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Response/AutoConfResponseFactory.js", - "module": "./src/Services/AutoConf/Response/AutoConfResponseFactory.js", - "moduleName": "./src/Services/AutoConf/Response/AutoConfResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Exceptions/ErrorService", - "loc": "11:0-60" - }, - { - "moduleId": 63, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Geocode.js", - "module": "./src/Services/Geocode/Geocode.js", - "moduleName": "./src/Services/Geocode/Geocode.js", - "type": "harmony import", - "userRequest": "../../Exceptions/ErrorService", - "loc": "4:0-57" - }, - { - "moduleId": 76, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Response/DirectGeocodeResponseFactory.js", - "module": "./src/Services/Geocode/Response/DirectGeocodeResponseFactory.js", - "moduleName": "./src/Services/Geocode/Response/DirectGeocodeResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Exceptions/ErrorService", - "loc": "12:0-60" - }, - { - "moduleId": 77, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Formats/DirectGeocodeResponseReader.js", - "module": "./src/Services/Geocode/Formats/DirectGeocodeResponseReader.js", - "moduleName": "./src/Services/Geocode/Formats/DirectGeocodeResponseReader.js", - "type": "harmony import", - "userRequest": "../../../Exceptions/ErrorService", - "loc": "13:0-54" - }, - { - "moduleId": 78, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/ReverseGeocode.js", - "module": "./src/Services/Geocode/ReverseGeocode.js", - "moduleName": "./src/Services/Geocode/ReverseGeocode.js", - "type": "harmony import", - "userRequest": "../../Exceptions/ErrorService", - "loc": "4:0-57" - }, - { - "moduleId": 80, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Response/ReverseGeocodeResponseFactory.js", - "module": "./src/Services/Geocode/Response/ReverseGeocodeResponseFactory.js", - "moduleName": "./src/Services/Geocode/Response/ReverseGeocodeResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Exceptions/ErrorService", - "loc": "13:0-60" - }, - { - "moduleId": 81, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Formats/ReverseGeocodeResponseReader.js", - "module": "./src/Services/Geocode/Formats/ReverseGeocodeResponseReader.js", - "moduleName": "./src/Services/Geocode/Formats/ReverseGeocodeResponseReader.js", - "type": "harmony import", - "userRequest": "../../../Exceptions/ErrorService", - "loc": "13:0-54" - }, - { - "moduleId": 82, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoComplete/AutoComplete.js", - "module": "./src/Services/AutoComplete/AutoComplete.js", - "moduleName": "./src/Services/AutoComplete/AutoComplete.js", - "type": "harmony import", - "userRequest": "../../Exceptions/ErrorService", - "loc": "6:0-57" - }, - { - "moduleId": 83, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoComplete/Response/AutoCompleteResponseFactory.js", - "module": "./src/Services/AutoComplete/Response/AutoCompleteResponseFactory.js", - "moduleName": "./src/Services/AutoComplete/Response/AutoCompleteResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Exceptions/ErrorService", - "loc": "11:0-60" - }, - { - "moduleId": 84, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Route.js", - "module": "./src/Services/Route/Route.js", - "moduleName": "./src/Services/Route/Route.js", - "type": "harmony import", - "userRequest": "../../Exceptions/ErrorService", - "loc": "4:0-57" - }, - { - "moduleId": 85, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Request/RouteRequestFactory.js", - "module": "./src/Services/Route/Request/RouteRequestFactory.js", - "moduleName": "./src/Services/Route/Request/RouteRequestFactory.js", - "type": "harmony import", - "userRequest": "../../../Exceptions/ErrorService", - "loc": "10:0-60" - }, - { - "moduleId": 93, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Response/RouteResponseFactory.js", - "module": "./src/Services/Route/Response/RouteResponseFactory.js", - "moduleName": "./src/Services/Route/Response/RouteResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Exceptions/ErrorService", - "loc": "11:0-60" - }, - { - "moduleId": 94, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Formats/RouteResponseRESTReader.js", - "module": "./src/Services/Route/Formats/RouteResponseRESTReader.js", - "moduleName": "./src/Services/Route/Formats/RouteResponseRESTReader.js", - "type": "harmony import", - "userRequest": "../../../Exceptions/ErrorService", - "loc": "13:0-54" - }, - { - "moduleId": 96, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "module": "./src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "moduleName": "./src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "type": "harmony import", - "userRequest": "../../Exceptions/ErrorService", - "loc": "4:0-57" - }, - { - "moduleId": 99, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "module": "./src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "moduleName": "./src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Exceptions/ErrorService", - "loc": "11:0-60" - }, - { - "moduleId": 100, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Formats/ProcessIsoCurveResponseReader.js", - "module": "./src/Services/ProcessIsoCurve/Formats/ProcessIsoCurveResponseReader.js", - "moduleName": "./src/Services/ProcessIsoCurve/Formats/ProcessIsoCurveResponseReader.js", - "type": "harmony import", - "userRequest": "../../../Exceptions/ErrorService", - "loc": "12:0-54" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "/**\n * Errors raised by API for one among three reasons : wrong API usage, underlying service error or unknown reason.\n *\n * @property {String} message - Error message\n * @property {Number} status - Error status : when {@link Gp.Error.TYPE_SRVERR}, gives the [HTTP status of the underlying web service response]{@link https://en.wikipedia.org/wiki/List_of_HTTP_status_codes} ; -1 otherwise.\n * @property {String} type - Error type ({@link Gp.Error.TYPE_SRVERR}, {@link Gp.Error.TYPE_USEERR} or {@link Gp.Error.TYPE_UNKERR}).\n *\n * @namespace\n * @alias Gp.Error\n * @param {Object|String} error - Options for creating error object. Can be a String (message) or an Object.\n * @param {String} error.message - Error message to return to user.\n * @param {enum} [error.type=TYPE_UNKERR] - Error type\n * @param {status} [error.status=-1] - Error status : when {@link Gp.Error.TYPE_SRVERR}, gives the [HTTP status of the underlying web service response]{@link https://en.wikipedia.org/wiki/List_of_HTTP_status_codes}.\n *\n */\nfunction ErrorService (error) {\n if (!(this instanceof ErrorService)) {\n throw new TypeError(\"ErrorService constructor cannot be called as a function.\");\n }\n\n var e = error;\n if (typeof error === \"string\" || error instanceof String) {\n this.message = error;\n this.status = -1;\n this.type = ErrorService.TYPE_UNKERR;\n } else {\n this.message = e.message || \"undefined!?\";\n this.type = e.type;\n this.status = e.status || -1;\n }\n\n this.name = \"ErrorService\";\n this.stack = (new Error()).stack;\n}\n\n/**\n * Error raised when underlying geoportal service answers on error.\n *\n * @type {String}\n * @constant\n * @static\n */\nErrorService.TYPE_SRVERR = \"SERVICE_ERROR\";\n/**\n * Error raised when funcion use is inappropriate\n *\n * @type {String}\n * @constant\n * @static\n */\nErrorService.TYPE_USEERR = \"USAGE_ERROR\";\n/**\n * Error raised when API can't perform the job for a reason other than the two other ones.\n *\n * @type {String}\n * @constant\n * @static\n */\nErrorService.TYPE_UNKERR = \"UNKNOWN_ERROR\";\n\n/**\n * @lends module:ErrorService\n */\nErrorService.prototype = Object.create(Error.prototype, {\n constructor : {\n value : ErrorService,\n writable : true,\n configurable : true\n }\n});\n\nexport default ErrorService;\n" - }, - { - "id": 3, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/CommonService.js", - "name": "./src/Services/CommonService.js", - "index": 8, - "index2": 14, - "size": 20725, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Alti.js", - "issuerId": 46, - "issuerName": "./src/Services/Alti/Alti.js", - "profile": { - "factory": 363, - "building": 94, - "dependencies": 2 - }, - "failed": false, - "errors": 0, - "warnings": 1, - "reasons": [ - { - "moduleId": 46, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Alti.js", - "module": "./src/Services/Alti/Alti.js", - "moduleName": "./src/Services/Alti/Alti.js", - "type": "harmony import", - "userRequest": "../CommonService", - "loc": "5:0-45" - }, - { - "moduleId": 60, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/AutoConf.js", - "module": "./src/Services/AutoConf/AutoConf.js", - "moduleName": "./src/Services/AutoConf/AutoConf.js", - "type": "harmony import", - "userRequest": "../CommonService", - "loc": "7:0-45" - }, - { - "moduleId": 63, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Geocode.js", - "module": "./src/Services/Geocode/Geocode.js", - "moduleName": "./src/Services/Geocode/Geocode.js", - "type": "harmony import", - "userRequest": "../CommonService", - "loc": "5:0-45" - }, - { - "moduleId": 78, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/ReverseGeocode.js", - "module": "./src/Services/Geocode/ReverseGeocode.js", - "moduleName": "./src/Services/Geocode/ReverseGeocode.js", - "type": "harmony import", - "userRequest": "../CommonService", - "loc": "5:0-45" - }, - { - "moduleId": 82, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoComplete/AutoComplete.js", - "module": "./src/Services/AutoComplete/AutoComplete.js", - "moduleName": "./src/Services/AutoComplete/AutoComplete.js", - "type": "harmony import", - "userRequest": "../CommonService", - "loc": "1:0-45" - }, - { - "moduleId": 84, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Route.js", - "module": "./src/Services/Route/Route.js", - "moduleName": "./src/Services/Route/Route.js", - "type": "harmony import", - "userRequest": "../CommonService", - "loc": "5:0-45" - }, - { - "moduleId": 96, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "module": "./src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "moduleName": "./src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "type": "harmony import", - "userRequest": "../CommonService", - "loc": "5:0-45" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 4, - "source": "import Logger from \"../Utils/LoggerByDefault\";\nimport Helper from \"../Utils/Helper\";\nimport _ from \"../Utils/MessagesResources\";\nimport Protocol from \"../Protocols/Protocol\";\nimport ErrorService from \"../Exceptions/ErrorService\";\nimport DefaultUrlService from \"./DefaultUrlService\";\n\n/**\n * @classdesc\n * Composant Service\n *\n * @constructor\n * @alias Gp.Services.CommonService\n * @param {Object} options - options communes à tous les services\n *\n * @param {String} options.apiKey - Clef d'accès à la plateforme Géoportail,\n * nécessaire pour franchir la couche de contrôle des accès pour avoir une réponse du service invoqué.\n * Plusieurs clefs peuvent être passées dans le cas de l'invocation du service d'autoconfiguration.\n * Si ce paramètre n'est pas renseigné, alors le paramètre serverUrl doit être renseigné (comprenant alors, si nécessaire la clef API).\n *\n * @param {String} options.serverUrl - URL d'accès au service.\n * Permet de forcer l'utilisation d'un service équivalent déployé derrière une éventuelle autre URL d'accès.\n * Si ce paramètre est renseigné alors, le paramètre apiKey est ignoré.\n *\n * @param {String} [options.protocol] - Le protocole à utiliser pour récupérer les informations du service :\n * peut valoir 'JSONP' ou 'XHR'.\n * Par défaut, c'est le protocole XHR qui sera utilisé.\n * Attention, le protocole JSONP n'est pas valide dans un environnement NodeJS (Utilisation du mode XHR).\n *\n * @param {Boolean} [options.ssl] - Indique si l'on souhaite intérroger les services en https.\n * Ce paramètre ne fonctionne que pour une utilisation hors navigateur (ex. NodeJS).\n * Sur un navigateur, le protocole est automatiquement extrait de l'url du site...\n * Par défaut, on utilise le protocole http (ssl=false).\n *\n * @param {String} [options.proxyURL] - Le proxy à utiliser pour pallier au problème de cross-domain dans le cas d'une requête XHR.\n * Utile si le paramètre 'protocol' vaut 'XHR', il ne sera pas pris en compte si protocol vaut JSONP.\n *\n * @param {String} [options.callbackSuffix] - Suffixe de la fonction de callback à utiliser, dans le cas du protocole JSONP.\n * Par défaut, la fonction de callback portera un nom du type \"callback\"+ID, où ID est soit un identifiant unique généré à chaque requête,\n * soit le paramètre callbackSuffix s'il est spécifié. Par exemple, si callbackSuffix=\"_2\", la fonction sera \"callback_2 ()\".\n * Utile pour utiliser une réponse déjà encapsulée dans une fonction de callback, dont le nom est connu (ex : chargement de l'autoconfiguration en local)\n * Utile seulement si le paramètre 'protocol' vaut 'JSONP', il ne sera pas pris en compte si protocol vaut 'XHR'.\n *\n * @param {String} [options.httpMethod] - La méthode HTTP\n * à utiliser dans le cas d'une requête XHR : peut valoir 'GET' ou 'POST'.\n * Non pris en compte si 'protocol' vaut JSONP qui fonctionne obligatoirement en GET.\n * Par défaut, c'est la méthode GET qui est utilisée.\n *\n * @param {String} [options.contentType] - Content-Type de la requete\n * à utiliser dans le cas d'une requête XHR en mode POST.\n * Non pris en compte si 'protocol' vaut JSONP et/ou la méthode HTTP vaut GET.\n * Par défaut, c'est la méthode GET qui est utilisée donc on n'utilise pas de Content-Type.\n *\n * @param {Number} [options.timeOut] - Délai d'attente maximal (en ms) de la réponse du service (à partir de l'envoi de la requête).\n * Par défaut, aucun timeOut n'est pris en compte (timeoutDelay= 0).\n *\n * @param {Boolean} [options.rawResponse] - Indique si l'on souhaite que la réponse du service ne soit pas parsée par l'API avant d'être restituée.\n * (Cf. paramètre « onSuccess » pour plus de détails).\n *\n * @param {Function} [options.onSuccess] - Fonction appelée lorsque le service répond correctement à la requête\n * (code HTTP 200, sans message d'erreur).\n * Cette fonction prend en paramètre la réponse du service,\n * soit sous la forme d'un Object Javascript formaté par le parseur dédié à la syntaxe du service (comportement par défaut) ;\n * soit brute au format String non prétraité si le paramètre « rawResponse » a été précisé avec la valeur « true ».\n *\n * @param {Function} [options.onFailure] - Fonction appelée lorsque le service ne répond pas correctement\n * (code HTTP de retour différent de 200 ou pas de réponse).\n *\n * @param {Function} [options.onBeforeParse] - Fonction appelée avant le parsing de la réponse\n * Permet de modifier la réponse avant parsing et la fonction doit retourner une String.\n * Cette fonction prend en paramètre la réponse telle que renvoyée par le service\n * (cad au format json ou xml).\n * Pour le JSONP, si le paramètre \"rawResponse\" a été précisé avec la valeur \"true\",\n * la fonction prend en paramètre un Object JavaScript contenant la réponse XML.\n *\n * @example\n * var options = {\n * apiKey : null,\n * serverUrl : 'http://localhost/service/',\n * protocol : 'JSONP', // JSONP|XHR\n * ssl : false,\n * proxyURL : null,\n * callbackName : null,\n * httpMethod : 'GET', // GET|POST\n * timeOut : 10000, // ms\n * rawResponse : false, // true|false\n * scope : null, // this\n * onSuccess : function (response) {},\n * onFailure : function (error) {},\n * onBeforeParse : function (rawResponse) {}\n * };\n * @private\n */\nfunction CommonService (options) {\n if (!(this instanceof CommonService)) {\n throw new TypeError(_.getMessage(\"CLASS_CONSTRUCTOR\"));\n }\n\n this.logger = Logger.getLogger(\"CommonService\");\n this.logger.trace(\"[Constructeur CommonService (options)]\");\n\n // #####################\n // récupération des options par défaut pour les paramètres optionnels\n // #####################\n\n /**\n * Options du service\n * @type {Object}\n */\n this.options = {\n // protocol : \"JSONP\",\n protocol : \"XHR\",\n ssl : false,\n proxyURL : \"\",\n // callbackName : \"\",\n callbackSuffix : null,\n httpMethod : \"GET\",\n timeOut : 0,\n rawResponse : false,\n scope : this,\n /**\n * callback par defaut pour la reponse\n * @param {Object} response - response\n * @private\n */\n onSuccess : function (response) {\n console.log(\"onSuccess - la reponse est la suivante : \", response);\n },\n /**\n * callback par defaut pour les erreurs\n * @param {Object} error - error\n * @private\n */\n onFailure : function (error) {\n if (error.status === 200 || !error.status) {\n console.log(\"onFailure : \", error.message);\n } else {\n console.log(\"onFailure - Erreur (\", error.status, \") : \", error.message);\n }\n }\n };\n\n // et on ajoute les options en paramètre aux options par défaut\n for (var opt in options) {\n if (options.hasOwnProperty(opt)) {\n this.options[opt] = options[opt];\n }\n }\n\n // #####################\n // analyse des options\n // #####################\n\n // gestion des clefs API\n if (!this.options.apiKey && !this.options.serverUrl) {\n throw new Error(_.getMessage(\"PARAM_MISSING\", \"apiKey\", \"serverUrl\"));\n }\n\n // modification de la fonction de callback onSuccess dans le cas où la réponse brute est demandée\n if (this.options.rawResponse && !this.options.onSuccess) {\n /**\n * callback par defaut pour la reponse\n * @param {Object} response - response\n * @private\n */\n this.options.onSuccess = function (response) {\n console.log(\"onSuccess - la réponse brute du service est la suivante : \", response);\n };\n }\n\n // gestion du callback onSuccess\n var bOnSuccess = !!((this.options.onSuccess !== null && typeof this.options.onSuccess === \"function\"));\n if (!bOnSuccess) {\n throw new Error(_.getMessage(\"PARAM_MISSING\", \"onSuccess()\"));\n }\n\n // gestion de l'url du service par defaut\n if (!this.options.serverUrl) {\n // INFO\n // gestion de l'url du service par defaut pour les services qui ne possèdent qu'une seul url par defaut\n // les cas particuliers des services avec plusieurs urls (ex. Alti) devront être traité dans la classe du composant\n // donc si l'url n'est pas renseignée, il faut utiliser les urls par defaut\n DefaultUrlService.ssl = this.options.ssl;\n var urlByDefault = DefaultUrlService[this.CLASSNAME].url(this.options.apiKey);\n if (typeof urlByDefault === \"string\") {\n this.options.serverUrl = urlByDefault;\n } else {\n this.logger.trace(\"URL par defaut à determiner au niveau du composant...\");\n }\n }\n\n // FIXME nettoyage des KVP dans l'url du service\n // if (this.options.serverUrl) {\n // // INFO\n // // si l'url est renseignée, il faut la nettoyer de tous ses KVP\n // // ex. on ne veut pas de params. 'callback' ou 'output' car ceci declencherait\n // // des opérations d'encapsulations des reponses légèrement farfelues ...\n // var urlsource = this.options.serverUrl;\n // var urlparts = urlsource.split(\"?\");\n // this.options.serverUrl = urlparts[0];\n // }\n\n // gestion de la methode HTTP\n this.options.httpMethod = (typeof options.httpMethod === \"string\") ? options.httpMethod.toUpperCase() : \"GET\";\n\n switch (this.options.httpMethod) {\n case \"POST\":\n case \"GET\":\n break;\n case \"PUT\":\n case \"DELETE\":\n case \"HEAD\":\n case \"OPTIONS\":\n throw new Error(_.getMessage(\"PARAM_NOT_SUPPORT\", \"httpMethod\"));\n default:\n throw new Error(_.getMessage(\"PARAM_UNKNOWN\", \"httpMethod\"));\n }\n\n // gestion du protocole\n // this.options.protocol = (typeof options.protocol === \"string\" ) ? options.protocol.toUpperCase() : \"JSONP\";\n this.options.protocol = (typeof options.protocol === \"string\") ? options.protocol.toUpperCase() : \"XHR\";\n\n switch (this.options.protocol) {\n case \"JSONP\":\n case \"XHR\":\n break;\n default:\n throw new Error(_.getMessage(\"PARAM_UNKNOWN\", \"protocol\"));\n }\n\n // on determine l'environnement d'execution : browser ou non ?\n // et on lance une exception sur l'utilisation du protocole JSONP pour nodeJS...\n if (typeof window === \"undefined\" && this.options.protocol === \"JSONP\") {\n throw new Error(_.getMessage(\"PARAM_NOT_SUPPORT_NODEJS\", \"protocol=JSONP (instead use XHR)\"));\n }\n\n // le protocole JSONP ne fonctionne qu'en GET.\n if (this.options.protocol === \"JSONP\") {\n this.options.httpMethod = \"GET\";\n }\n\n // gestion du cache\n this.options.nocache = options.nocache || false;\n\n // #####################\n // attributs d'instances\n // #####################\n\n /**\n * Format de réponse du service\n */\n this.options.outputFormat = null;\n /**\n * Requête envoyée au service\n */\n this.request = null;\n /**\n * Reponse du service\n */\n this.response = null;\n}\n\n/**\n * @lends module:CommonService\n */\nCommonService.prototype = {\n\n /*\n * Constructeur (alias)\n */\n constructor : CommonService,\n\n /**\n * Appel du service Géoportail\n */\n call : function () {\n /* jshint validthis : true */\n this.logger.trace(\"CommonService::call ()\");\n\n var context = this;\n /** fonction d'execution */\n function run () {\n this.logger.trace(\"CommonService::run ()\");\n this.buildRequest.call(context, onError, onBuildRequest);\n }\n\n run.call(context);\n\n // callback de fin de construction de la requête\n function onBuildRequest (result) {\n this.logger.trace(\"CommonService::onBuildRequest : \", result);\n this.callService.call(context, onError, onCallService);\n }\n\n // callback de fin d'appel au service\n function onCallService (result) {\n this.logger.trace(\"CommonService::onCallService : \", result);\n this.analyzeResponse.call(context, onError, onAnalyzeResponse);\n }\n\n // callback de fin de lecture de la reponse\n function onAnalyzeResponse (result) {\n this.logger.trace(\"CommonService::onAnalyzeResponse : \", result);\n if (result) {\n this.options.onSuccess.call(this, result);\n } else {\n return onError.call(this, new ErrorService(\"Analyse de la reponse en échec !?\"));\n }\n }\n\n // callback de gestion des erreurs : renvoit un objet de type ErrorService\n function onError (error) {\n this.logger.trace(\"CommonService::onError()\");\n // error : l'objet est du type ErrorService ou Error\n var e = error;\n if (!(e instanceof ErrorService)) {\n e = new ErrorService(error.message);\n }\n this.options.onFailure.call(this, e);\n }\n },\n\n /**\n * Création de la requête\n * @param {Function} error - callback\n * @param {Function} success - callback\n */\n buildRequest : function (error, success) {\n // INFO\n this.logger.error(\"overwritten method !\");\n // retourne l'objet 'this.request'\n if (error) {\n error.call(this, \"This method must be overwritten !\");\n }\n success.call(this, \"This method must be overwritten !\");\n },\n\n /**\n * Appel du service\n * @param {Function} error - callback\n * @param {Function} success - callback\n */\n callService : function (error, success) {\n // INFO\n // retourne l'objet 'this.response'\n\n // NOTES\n // Pour le mode XHR, on recupère une reponse sous forme d'un json ou xml (#document).\n // Pour le mode JSONP, on a toujours un objet JSON mais sous 2 formes :\n // - natif\n // - XML encapsulé :\n // {http : {status:200, error:null},xml :'réponse du service'}\n // {http : {status:400, error:'reponse du service'},xml :null}\n // En XHR, la reponse est directement sauvegardée dans 'this.response'.\n // Par contre, en JSONP, on doit analyser la reponse (status ou non vide),\n // et ne renvoyer que le contenu (xml ou l'objet)\n\n // gestion de la proxification du service\n var strUrlProxified = null;\n var strData = this.request;\n\n // a t on mis en place un proxy ?\n // la proxyfication est valable uniquement en mode XHR !\n var bUrlProxified = !!((this.options.proxyURL && this.options.protocol === \"XHR\"));\n\n // rajout de l'option gpbibaccess\n // INFO : acces au numero de version de package.conf aprés compilation !\n this.options.serverUrl = Helper.normalyzeUrl(this.options.serverUrl, {\n \"gp-access-lib\" : \"__GPVERSION__\"\n }, false);\n\n // si le proxy est renseigné, on proxifie l'url du service\n if (bUrlProxified) {\n if (this.options.httpMethod === \"GET\") {\n strUrlProxified = this.options.proxyURL + Helper.normalyzeUrl(this.options.serverUrl, this.request, true);\n strData = null;\n }\n\n if (this.options.httpMethod === \"POST\") {\n strUrlProxified = this.options.proxyURL + Helper.normalyzeUrl(this.options.serverUrl, null, true);\n strData = this.request;\n }\n }\n\n // contexte du composant spécifique !\n var self = this;\n\n var options = {\n url : strUrlProxified || this.options.serverUrl,\n method : this.options.httpMethod,\n protocol : this.options.protocol,\n timeOut : this.options.timeOut || 0,\n format : this.options.outputFormat, // ceci declenche le parsing de la reponse du service, mais on souhaite toujours une reponse brute (string) !\n nocache : this.options.nocache || false, // ceci permet d'ajouter un timestamp dans la requête\n wrap : this.options.protocol !== \"XHR\", // ceci declenche l'encapsulation de la reponse XML du service dans du JSON, mais pas en mode XHR !\n callbackSuffix : this.options.callbackSuffix,\n // callbackName : this.options.callbackName || null,\n data : strData,\n headers : null, // TODO...\n content : this.options.contentType || \"application/xml\",\n scope : this.options.scope || this,\n // callback de reponse\n onResponse : function (response) {\n self.logger.trace(\"callService::onResponse()\");\n\n // le contenu de la reponse à renvoyer !\n var content = null;\n\n // XHR : on renvoie toujours la reponse brute du service (json ou xml)\n // au parser du composant...\n if (self.options.protocol === \"XHR\") {\n self.logger.trace(\"Response XHR\", response);\n content = response; // par defaut, la reponse du service !\n }\n\n // JSONP : on pre-analyse la reponse brute du service (encapsuler ou pas)\n // avant de l'envoyer au parser du composant...\n if (self.options.protocol === \"JSONP\") {\n self.logger.trace(\"Response JSON\", response);\n if (response) {\n if (response.http) {\n // reponse encapsulée :\n // ex. reponse du service en xml\n // > {http : {status:200, error:null},xml :'réponse du service'}\n if (response.http.status !== 200) {\n error.call(self, new ErrorService({\n status : response.http.status,\n message : response.http.error,\n type : ErrorService.TYPE_SRVERR\n }));\n return;\n } else {\n content = response.xml; // par defaut !\n if (self.options.rawResponse) {\n content = response;\n }\n }\n } else {\n // reponse non encapsulée :\n // ex. reponse du service en json ou xml\n content = response;\n }\n } else {\n error.call(self, new ErrorService(\"Le contenu de la reponse est vide !?\"));\n return;\n }\n }\n\n // si on souhaite parser la reponse du service\n if (typeof self.options.onBeforeParse === \"function\") {\n var newResponse = self.options.onBeforeParse(content);\n if (typeof newResponse === \"string\") {\n // la reponse parsée par l'utilisateur est retournée sous\n // forme de string !\n content = newResponse;\n }\n }\n // sauvegarde de la reponse dans l'objet parent (CommonService)\n self.response = content;\n // on renvoie la reponse...\n success.call(self, content);\n },\n // callback des erreurs\n onFailure : function (e) {\n self.logger.trace(\"callService::onFailure()\");\n // on est forcement sur une erreur levée par un service !\n e.type = ErrorService.TYPE_SRVERR;\n error.call(self, new ErrorService(e));\n },\n // callback de timeOut\n onTimeOut : function () {\n self.logger.trace(\"callService::onTimeOut()\");\n error.call(self, new ErrorService(\"TimeOut!\"));\n }\n };\n\n Protocol.send(options);\n },\n\n /**\n * Analyse de la réponse\n * @param {Function} error - callback\n * @param {Function} success - callback\n */\n analyzeResponse : function (error, success) {\n // INFO\n this.logger.error(\"overwritten method !\");\n // retourne l'objet spécifique au type de composant (json)\n if (error) {\n error.call(this, \"This method must be overwritten !\");\n }\n success.call(this, \"This method must be overwritten !\");\n }\n\n};\n\nexport default CommonService;\n" - }, - { - "id": 4, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Utils/Helper.js", - "name": "./src/Utils/Helper.js", - "index": 9, - "index2": 4, - "size": 2834, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 55, - "building": 278 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 3, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/CommonService.js", - "module": "./src/Services/CommonService.js", - "moduleName": "./src/Services/CommonService.js", - "type": "harmony import", - "userRequest": "../Utils/Helper", - "loc": "2:0-37" - }, - { - "moduleId": 19, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Protocols/XHR.js", - "module": "./src/Protocols/XHR.js", - "moduleName": "./src/Protocols/XHR.js", - "type": "harmony import", - "userRequest": "../Utils/Helper", - "loc": "4:0-37" - }, - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Utils/Helper", - "loc": "30:0-36" - }, - { - "moduleId": 48, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Protocols/Protocol.js", - "module": "./src/Protocols/Protocol.js", - "moduleName": "./src/Protocols/Protocol.js", - "type": "harmony import", - "userRequest": "../Utils/Helper", - "loc": "8:0-37" - }, - { - "moduleId": 60, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/AutoConf.js", - "module": "./src/Services/AutoConf/AutoConf.js", - "moduleName": "./src/Services/AutoConf/AutoConf.js", - "type": "harmony import", - "userRequest": "../../Utils/Helper", - "loc": "4:0-40" - }, - { - "moduleId": 82, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoComplete/AutoComplete.js", - "module": "./src/Services/AutoComplete/AutoComplete.js", - "moduleName": "./src/Services/AutoComplete/AutoComplete.js", - "type": "harmony import", - "userRequest": "../../Utils/Helper", - "loc": "5:0-40" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "/**\n * Classe utilitaire\n *\n * @module Helper\n * @private\n * @alias Gp.Utils.Helper\n */\nvar Helper = {\n\n /**\n * concatenation des parametres key/value dans les urls\n *\n * @method normalyzeParameters\n * @static\n * @param {Object} params - tableau de clef/valeur\n *\n * @example\n * Gp.Utils.Helper.normalyzeParameters ({\n * key1:value1,\n * key2:value2,\n * key3:value3\n * });\n * // out : \"key1=value1&key2=value2&key3=value3\"\n *\n * @returns {String} retourne les paramètres concaténés\n */\n normalyzeParameters : function (params) {\n var myParams = null;\n\n if (params) {\n var tabParams = [];\n for (var key in params) {\n if (params.hasOwnProperty(key)) {\n var value = params[key];\n if (!value) {\n value = \"\";\n }\n tabParams.push(key + \"=\" + value);\n }\n }\n\n myParams = tabParams.join(\"&\");\n }\n\n return myParams;\n },\n\n /**\n * Concaténation et encodage des urls.\n *\n * @method normalyzeUrl\n * @static\n * @param {String} url - url\n * @param {Object|String} params - tableau de clef/valeur ou string\n * @param {Boolean} encode - true|false, false par defaut\n *\n * @example\n * Gp.Utils.Helper.normalyzeUrl (url, {\n * key1:value1,\n * key2=:value2,\n * key3:value3\n * });\n * // out : \"url?key1=value1&key2=value2&key3=value3\"\n *\n * @returns {String} retourne une url normalisée\n */\n normalyzeUrl : function (url, params, encode) {\n var myUrl = url;\n\n if (url) {\n var k = url.indexOf(\"?\");\n if (k === -1) { // pas de ? et KVP\n myUrl += \"?\";\n }\n\n if (k !== -1 && k !== url.length - 1) { // KVP\n myUrl += \"&\";\n }\n }\n\n if (params) {\n if (typeof params === \"string\") {\n myUrl += params;\n } else {\n myUrl += this.normalyzeParameters(params);\n }\n }\n\n if (encode) {\n // FIXME bonne idée ?\n myUrl = encodeURIComponent(myUrl);\n }\n\n return myUrl;\n },\n\n /**\n * Indentation d'une chaine\n *\n * @param {Number} n - nombre de tabulation\n * @param {String} msg - chaine\n *\n * @example\n * Gp.Utils.Helper.indent (2, \"message à indenter\")\n * // out\n * // ........message à indenter\n *\n * @returns {String} retourne une chaine indentée\n */\n indent : function (n, msg) {\n var num = n || 0;\n return new Array(num + 1).join(\"\\t\") + msg;\n }\n};\n\nexport default Helper;\n" - }, - { - "id": 5, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/DefaultUrlService.js", - "name": "./src/Services/DefaultUrlService.js", - "index": 18, - "index2": 13, - "size": 8577, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 53, - "building": 62 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 3, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/CommonService.js", - "module": "./src/Services/CommonService.js", - "moduleName": "./src/Services/CommonService.js", - "type": "harmony import", - "userRequest": "./DefaultUrlService", - "loc": "6:0-52" - }, - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/DefaultUrlService", - "loc": "2:0-54" - }, - { - "moduleId": 46, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Alti.js", - "module": "./src/Services/Alti/Alti.js", - "moduleName": "./src/Services/Alti/Alti.js", - "type": "harmony import", - "userRequest": "../DefaultUrlService", - "loc": "6:0-53" - }, - { - "moduleId": 60, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/AutoConf.js", - "module": "./src/Services/AutoConf/AutoConf.js", - "moduleName": "./src/Services/AutoConf/AutoConf.js", - "type": "harmony import", - "userRequest": "../DefaultUrlService", - "loc": "6:0-53" - }, - { - "moduleId": 84, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Route.js", - "module": "./src/Services/Route/Route.js", - "moduleName": "./src/Services/Route/Route.js", - "type": "harmony import", - "userRequest": "../DefaultUrlService", - "loc": "6:0-53" - }, - { - "moduleId": 96, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "module": "./src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "moduleName": "./src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "type": "harmony import", - "userRequest": "../DefaultUrlService", - "loc": "6:0-53" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "// cette classe contient les URLs par defaut des services.\n// DefaultUrlService.Alti.url(key)[elevation-json]\n// DefaultUrlService.Alti.url(key)[elevation-xml]\n// DefaultUrlService.Alti.url(key)[profil-json]\n// DefaultUrlService.Alti.url(key)[profil-xml]\n// DefaultUrlService.Alti.url(key)[wps]\n// DefaultUrlService.ProcessIsoCurve.url(key)\n// DefaultUrlService.AutoComplete.url(key)\n// DefaultUrlService.ReverseGeocode.url(key)\n// DefaultUrlService.AutoConf.url(key)[apiKey]\n// DefaultUrlService.AutoConf.url(key)[apiKeys]\n// DefaultUrlService.AutoConf.url(key)[aggregate]\n// DefaultUrlService.Geocode.url(key)\n// DefaultUrlService.Route.url(key)\n\n// Example :\n//\n// DefaultUrlService.Alti.url('efe4r54tj4uy5i78o7545eaz7e87a')[elevation-json]\n// output {String} -> http://wxs.ign.fr/efe4r54tj4uy5i78o7545eaz7e87a/alti/rest/elevation.json\n//\n// DefaultUrlService.Alti.url('efe4r54tj4uy5i78o7545eaz7e87a')\n// output {Object|String}\n// -> http://wxs.ign.fr/efe4r54tj4uy5i78o7545eaz7e87a/alti/rest/elevation.json\n// -> http://wxs.ign.fr/efe4r54tj4uy5i78o7545eaz7e87a/alti/rest/elevation.xml\n// -> http://wxs.ign.fr/efe4r54tj4uy5i78o7545eaz7e87a/alti/rest/elevationLine.json\n// -> http://wxs.ign.fr/efe4r54tj4uy5i78o7545eaz7e87a/alti/rest/elevationLine.xml\n// -> http://wxs.ign.fr/efe4r54tj4uy5i78o7545eaz7e87a/alti/wps\n//\n// Force ssl :\n//\n// DefaultUrlService.ssl = true;\n// DefaultUrlService.AutoComplete.url('efe4r54tj4uy5i78o7545eaz7e87a')\n// output {Object|String}\n// -> https://wxs.ign.fr/efe4r54tj4uy5i78o7545eaz7e87a/ols/apis/completion\n\n// constantes internes\nvar ISBROWSER = typeof window !== \"undefined\" ? 1 : 0;\nvar HOSTNAME = \"wxs.ign.fr\";\n\n/**\n * Default Geoportal web services URLs access.\n *\n * @namespace\n * @alias Gp.Services.DefaultUrl\n */\nvar DefaultUrlService = {\n\n /** if set true, require the use of https protocol (except browser) */\n ssl : false,\n\n /**\n * base url of services (ssl protocol management)\n * @param {String} key - key\n * @param {String} path - path\n * @returns {String} url\n */\n url : function (key, path) {\n // en mode browser, c'est le protocole du navigateur,\n // sinon, il est fixé par l'option 'ssl' (par défaut à false, cad en http)\n var _protocol = (ISBROWSER) ? (location && location.protocol && location.protocol.indexOf(\"https:\") === 0 ? \"https://\" : \"http://\") : (DefaultUrlService.ssl ? \"https://\" : \"http://\");\n return _protocol + HOSTNAME.concat(\"/\", key, path);\n },\n\n /**\n * Elevation web service access\n *\n * @member {Object}\n * @property {Function} url (key) - Returns elevation service default urls with or without geoportal access key given as a parameter. The result is a javascript object with different urls given used protocols (\"elevation-json\", \"elevation-xml\", \"profil-json\" or \"profil-xml\").\n */\n Alti : {\n _key : {\n // rest\n \"elevation-json\" : \"/alti/rest/elevation.json\",\n \"elevation-xml\" : \"/alti/rest/elevation.xml\",\n \"profil-json\" : \"/alti/rest/elevationLine.json\",\n \"profil-xml\" : \"/alti/rest/elevationLine.xml\",\n // other\n wps : \"/alti/wps\"\n },\n /**\n * url\n * @param {String} key - key\n * @returns {String} url\n */\n url : function (key) {\n return {\n // rest\n \"elevation-json\" : DefaultUrlService.url(key, this._key[\"elevation-json\"]),\n \"elevation-xml\" : DefaultUrlService.url(key, this._key[\"elevation-xml\"]),\n \"profil-json\" : DefaultUrlService.url(key, this._key[\"profil-json\"]),\n \"profil-xml\" : DefaultUrlService.url(key, this._key[\"profil-xml\"]),\n // other\n wps : DefaultUrlService.url(key, this._key[\"wps\"])\n };\n }\n },\n /**\n * IsoCurve web service access\n *\n * @member {Object}\n * @property {Function} url (key) - Returns isocurve service default urls with or without geoportal access key given as a parameter. The result is a javascript object with different urls given used protocols (\"iso-json\" or \"iso-xml\").\n */\n ProcessIsoCurve : {\n _key : {\n \"iso-json\" : \"/isochrone/isochrone.json\", // rest (geoconcept)\n \"iso-xml\" : \"/isochrone/isochrone.xml\" // rest (geoconcept)\n },\n /**\n * url\n * @param {String} key - key\n * @returns {String} url\n */\n url : function (key) {\n return {\n \"iso-json\" : DefaultUrlService.url(key, this._key[\"iso-json\"]),\n \"iso-xml\" : DefaultUrlService.url(key, this._key[\"iso-xml\"])\n };\n }\n },\n /**\n * Autocompletion web service access\n *\n * @member {Object}\n * @property {Function} url (key) - Returns autocomplete service default urls with or without geoportal access key given as a parameter. The result is a String.\n */\n AutoComplete : {\n _key : \"/ols/apis/completion\",\n /**\n * url\n * @param {String} key - key\n * @returns {String} url\n */\n url : function (key) {\n return DefaultUrlService.url(key, this._key);\n }\n },\n /**\n * Reverse geocoding web service access\n *\n * @member {Object}\n * @property {Function} url (key) - Returns reverse geocoding service default urls with or without geoportal access key given as a parameter. The result is a String.\n */\n ReverseGeocode : {\n _key : \"/geoportail/ols\",\n /**\n * url\n * @param {String} key - key\n * @returns {String} url\n */\n url : function (key) {\n return DefaultUrlService.url(key, this._key);\n }\n },\n /**\n * Autoconfiguration web service access\n *\n * @member {Object}\n * @property {Function} url ([key1,...]) - Returns autoconfiguration service default urls with geoportal access key (s) given as a String array parameter. The result is a javascript object with different urls given the access mode (\"apiKey\", \"apiKeys\" or \"aggregate\").\n */\n AutoConf : {\n _key : {\n apiKey : \"/autoconf\",\n apiKeys : \"/autoconf?keys=%KEYS%\",\n aggregate : \"/autoconf/id/\"\n },\n /**\n * url\n * @param {String} key - key\n * @returns {String} url\n */\n url : function (key) {\n var keys = \"\";\n if (Array.isArray(key) && key.length > 0) {\n keys = key[0];\n for (var i = 1; i < key.length; i++) {\n keys += \",\" + key[i];\n }\n }\n return {\n apiKey : DefaultUrlService.url(key, this._key[\"apiKey\"]), // une seule clé\n apiKeys : DefaultUrlService.url(key[0], this._key[\"apiKeys\"]).replace(\"%KEYS%\", keys), // autoconf de plusieurs clés\n aggregate : DefaultUrlService.url(key, this._key[\"aggregate\"])\n };\n }\n },\n /**\n * Geocoding web service access\n *\n * @member {Object}\n * @property {Function} url (key) - Returns geocoding service default urls with or without geoportal access key given as a parameter. The result is a String.\n */\n Geocode : {\n _key : \"/geoportail/ols\",\n /**\n * url\n * @param {String} key - key\n * @returns {String} url\n */\n url : function (key) {\n return DefaultUrlService.url(key, this._key);\n }\n },\n /**\n * Routing web service access\n *\n * @member {Object}\n * @property {Function} url (key) - Returns routing service default urls with or without geoportal access key given as a parameter. The result is a javascript object with different urls given used protocols (\"route-json\" or \"route-xml\").\n */\n Route : {\n _key : {\n ols : \"/itineraire/ols\", // openLS\n \"route-json\" : \"/itineraire/rest/route.json\", // rest (geoconcept)\n \"route-xml\" : \"/itineraire/rest/route.xml\" // rest (geoconcept)\n },\n /**\n * url\n * @param {String} key - key\n * @returns {String} url\n */\n url : function (key) {\n return {\n ols : DefaultUrlService.url(key, this._key[\"ols\"]),\n \"route-json\" : DefaultUrlService.url(key, this._key[\"route-json\"]),\n \"route-xml\" : DefaultUrlService.url(key, this._key[\"route-xml\"])\n };\n }\n }\n};\n\nexport default DefaultUrlService;\n" - }, - { - "id": 6, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XML.js", - "name": "./src/Formats/XML.js", - "index": 27, - "index2": 22, - "size": 12411, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Response/AltiResponseFactory.js", - "issuerId": 58, - "issuerName": "./src/Services/Alti/Response/AltiResponseFactory.js", - "profile": { - "factory": 409, - "building": 91, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 1, - "reasons": [ - { - "moduleId": 58, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Response/AltiResponseFactory.js", - "module": "./src/Services/Alti/Response/AltiResponseFactory.js", - "moduleName": "./src/Services/Alti/Response/AltiResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Formats/XML", - "loc": "12:0-39" - }, - { - "moduleId": 61, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Response/AutoConfResponseFactory.js", - "module": "./src/Services/AutoConf/Response/AutoConfResponseFactory.js", - "moduleName": "./src/Services/AutoConf/Response/AutoConfResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Formats/XML", - "loc": "12:0-39" - }, - { - "moduleId": 76, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Response/DirectGeocodeResponseFactory.js", - "module": "./src/Services/Geocode/Response/DirectGeocodeResponseFactory.js", - "moduleName": "./src/Services/Geocode/Response/DirectGeocodeResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Formats/XML", - "loc": "14:0-39" - }, - { - "moduleId": 80, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Response/ReverseGeocodeResponseFactory.js", - "module": "./src/Services/Geocode/Response/ReverseGeocodeResponseFactory.js", - "moduleName": "./src/Services/Geocode/Response/ReverseGeocodeResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Formats/XML", - "loc": "14:0-39" - }, - { - "moduleId": 93, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Response/RouteResponseFactory.js", - "module": "./src/Services/Route/Response/RouteResponseFactory.js", - "moduleName": "./src/Services/Route/Response/RouteResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Formats/XML", - "loc": "12:0-39" - }, - { - "moduleId": 99, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "module": "./src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "moduleName": "./src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Formats/XML", - "loc": "12:0-39" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "/* global require */\n\nimport Logger from \"../Utils/LoggerByDefault\";\n// import __xmldom from \"xmldom\";\n\n/**\n * @classdesc\n *\n * Classe permettant d'écrire ou de lire du XML, sous forme de document DOM,\n * éventuellement selon des clés de lecture (readers) ou d'écriture (writers) spécifiques.\n *\n * @constructor\n * @alias Gp.Formats.XML\n *\n * @param {Object} [options] - options du format XML\n *\n * @param {Object} [options.reader] - Instance d'un Reader de service (AltiResponseReader, GeocodeRequestReader, etc.)\n * utile pour interpréter le XML lorsque sa structure est connue.\n * Ce reader doit comporter au moins une fonction statique read (root) permettant d'initialiser la lecture.\n *\n * @param {Object} [options.writers] - writers\n *\n * @param {String} [options.xmlString] - chaîne de caractère contenant du XML à interpréter.\n *\n * @private\n */\nfunction XML (options) {\n if (!(this instanceof XML)) {\n throw new TypeError(\"XML constructor cannot be called as a function.\");\n }\n\n // FIXME : notion de singleton\n\n this.logger = Logger.getLogger();\n this.logger.trace(\"[Constructeur XML ()]\");\n\n /**\n * Chaîne de caractères contenant le texte XML\n * @type {String}\n */\n this.xmlString = null;\n\n /**\n * DOM Element correspondant à la structure du XML.\n * @type {DOMElement}\n */\n this.xmlDoc = null;\n\n /**\n * Objet contenant des fonctions de lecture des différentes balises XML.\n * @type {Object}\n */\n this.reader = null;\n\n // traitement des paramètres d'options s'il y en a\n if (options) {\n if (options.xmlString && typeof options.xmlString === \"string\") {\n this.xmlString = options.xmlString;\n // Si une chaine de caractère a été passée en entrée : on la transforme aussi en XML document\n this.xmlDoc = __getXMLDOC(options.xmlString);\n }\n if (options.reader) {\n this.setReader(options.reader);\n }\n }\n}\n\nXML.prototype = {\n\n /**\n * @lends module:XML\n */\n\n /*\n * Constructeur (alias)\n */\n constructor : XML,\n\n /**\n * Méthode permettant de récupérer la chaîne de caractères associée au format XML\n *\n * @returns {String} xmlString - la chaîne de caractères correspondant au format XML\n */\n getXMLString : function () {\n return this.xmlString;\n },\n\n /**\n * Méthode permettant d'attribuer une chaîne de caractères au format XML (attribut xmlString).\n * La méthode va aussi transformer cette chaîne de caractères en document XML,\n * afin de remplir l'attribut xmlDoc.\n *\n * @param {String} xmlString - la chaîne de caractères correspondant au format XML\n */\n setXMLString : function (xmlString) {\n if (xmlString && typeof xmlString === \"string\") {\n this.xmlString = xmlString;\n this.xmlDoc = __getXMLDOC(xmlString);\n }\n },\n\n /**\n * Méthode permettant de récupérer les readers associés au format XML, s'ils ont été définis\n *\n * @return {Object} readers - les readers associés au format XML, s'ils existent,\n * sous forme d'une collection de fonctions\n */\n getReader : function () {\n return this.reader;\n },\n\n /**\n * Méthode permettant d'attribuer des readers, sous la forme d'un objet de fonctions (node, data),\n * lorsqu'ils n'ont pas été définis lors de l'instanciation par exemple (new XML (options)).\n *\n * @param {Object} reader - Instance d'un Reader de service (AltiResponseReader, GeocodeRequestReader, etc.)\n * utile pour interpréter le XML lorsque sa structure est connue.\n * Ce reader doit comporter au moins une fonction statique read (root) permettant d'initialiser la lecture.\n */\n setReader : function (reader) {\n if (reader && reader.read && typeof reader.read === \"function\") {\n this.reader = reader;\n }\n },\n\n /**\n * Méthode permettant de récupérer le document XML associé au format, s'il existe.\n *\n * @return {DOMElement} xmlDoc - le document XML (DOM document node) s'il existe\n */\n getXMLDoc : function () {\n return this.xmlDoc;\n },\n\n /**\n * Setter\n */\n setXMLDoc : function (doc) {\n this.xmlDoc = doc;\n },\n /**\n * Méthode initialisant la lecture du XML, à partir d'un XML Document :\n * création d'un objet JavaScript contenant les informations du XML,\n * sauf dans le cas où il n'existe pas de XML Document à interpréter (retourne un objet vide).\n *\n * @return {Object} [parserOutput] - un objet JavaScript contenant les informations du XML :\n * - soit toutes les informations si aucun reader n'a été spécifié à la création du format\n * - soit les informations spécifiées dans le reader.\n */\n parse : function () {\n // build xml document from xmlString\n if (!this.xmlDoc && this.xmlString) {\n this.xmlDoc = __getXMLDOC(this.xmlString);\n }\n if (this.xmlDoc) {\n var root = __getRootNode(this.xmlDoc);\n if (root) {\n var parserOutput;\n // call reader if exists\n if (this.reader && this.reader.read) {\n parserOutput = this.reader.read(root);\n } else {\n parserOutput = {};\n parserOutput[root.nodeName] = __readDefault(root);\n }\n return parserOutput;\n } else {\n return {};\n }\n }\n }\n\n};\n\n/**\n * Méthode de la classe (privée) permettant de créer un XML Document à partir d'une chaîne de caractères XML,\n * en utilisant DOMParser () lorsque c'est possible.\n * For more information, see: https://dvcs.w3.org/hg/innerhtml/raw-file/tip/index.html#the-domparser-interface\n *\n * @private\n * @memberof XML\n * @method __getXMLDOC\n * @param {String} xmlString - xml string to be converted into DOM element\n * @return {DOMElement} - the corresponding XML Document\n */\nfunction __getXMLDOC (xmlString) {\n if (typeof window === \"undefined\") {\n // env. nodejs\n var DOMParser = require(\"xmldom\").DOMParser; // __xmldom.DOMParser;\n return new DOMParser().parseFromString(xmlString, \"text/xml\");\n } else {\n // env. browser\n\n var parser;\n var xmlDoc;\n var errorMsg = \"Erreur lors du parsing de la réponse du service : XML non conforme\";\n\n if (window.ActiveXObject) {\n // Internet Explorer < 9\n xmlDoc = new window.ActiveXObject(\"Microsoft.XMLDOM\");\n xmlDoc.async = false;\n xmlDoc.loadXML(xmlString);\n var parseError = xmlDoc.parseError;\n if (parseError.errorCode) {\n if (parseError.line && parseError.linepos) {\n errorMsg += \"( ligne \" + parseError.line + \", colonne \" + parseError.linepos;\n }\n if (parseError.reason) {\n errorMsg += \": \" + parseError.reason + \")\";\n }\n throw new Error(errorMsg);\n }\n return xmlDoc;\n } else if (window.DOMParser) {\n // les autres (Chrome, Mozilla, IE >= 9)\n parser = new window.DOMParser();\n try {\n xmlDoc = parser.parseFromString(xmlString, \"text/xml\");\n } catch (e) {\n // Internet Explorer browser raises exception if xmlString is not valid XML\n if (e.message === \"SyntaxError\") {\n throw new Error(errorMsg);\n } else {\n throw new Error(\"Erreur lors du parsing de la réponse du service : \" + e.message);\n }\n }\n // look for parsing error in case no exception was raised\n if (xmlDoc.getElementsByTagName(\"parsererror\").length > 0) {\n var parsererror = xmlDoc.getElementsByTagName(\"parsererror\");\n for (var i = 0; i < parsererror.length; i++) {\n var content = parsererror[i].innerHTML;\n // except in case parsererror is just because of huge xml, but parsing is done.\n if (content.indexOf(\"Huge input lookup\") === -1) {\n errorMsg += \"(\" + content + \")\";\n throw new Error(errorMsg);\n }\n }\n } else if (!xmlDoc.documentElement) { // may happen in chrome browser\n throw new Error(errorMsg);\n }\n return xmlDoc;\n } else {\n // FIXME\n throw new Error(\"Incompatible DOM Parser pour ce navigateur !\");\n }\n }\n}\n\n/**\n * Méthode de la classe (privée) permettant de récupérer le noeud racine du document,\n * à partir d'un document node (nodeType=9), puis lecture de ce noeud (readNode)\n *\n * @private\n * @memberof XML\n * @method __getRootNode\n * @param {DOMElement} [xmlDoc] - a Document Node\n * @return {DOMElement} root - the document root node\n */\nfunction __getRootNode (xmlDoc) {\n var root;\n if (xmlDoc.nodeType === 9) {\n // INFO : nodeType 9 represents the entire document (the root-node of the DOM tree)\n root = xmlDoc.documentElement;\n } else if (xmlDoc.nodeType === 1) {\n root = xmlDoc;\n }\n return root;\n}\n\n/**\n * Méthode de la classe (privée) permettant de lire automatiquement un noeud XML,\n * lorsqu'aucun reader spécifique n'a été spécifié (parser brut)\n *\n * @private\n * @memberof XML\n * @method readDefault\n * @param {DOMElement} node - a DOM element node\n * @example final data object looks like :\n * data = {\n * attributeName: attributeValue,\n * childName: {\n * attributeName: attributeValue,\n * attributeName: attributeValue,\n * childName: {\n * \"textContent\": textContent\n * },\n * childName: {\n * childName: {\n * attributeName:attributeValue\n * }\n * }\n * }\n * }\n */\nfunction __readDefault (node) {\n var data = {};\n\n // if element node has attributes, set their values to data\n if (node.attributes.length > 0) {\n var dataAttributes = __getAttributes(node);\n data[\"attributes\"] = dataAttributes;\n }\n\n // if element node has childNodes, read them and set them to data\n if (node.hasChildNodes()) {\n var childData = {};\n var child;\n var children = node.childNodes;\n\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n\n if (child.nodeType === 3) { // TEXT_NODE\n data[\"textContent\"] = child.nodeValue;\n } else if (child.nodeType === 1) {\n childData = __readDefault(child);\n\n if (!data[child.nodeName]) {\n // store childData in an object\n data[child.nodeName] = childData;\n } else {\n // in case several childNodes has the same name : store them in an array.\n // if data[nodeName] already exists but is not an array\n if (!Array.isArray(data[child.nodeName])) {\n var old = data[child.nodeName];\n data[child.nodeName] = [];\n data[child.nodeName].push(old);\n }\n data[child.nodeName].push(childData);\n }\n }\n // TODO : manage other node types (4=CDATA, etc)\n }\n }\n\n return data;\n}\n\n/**\n * Méthode de la classe (privée) permettant de récupérer les attributs d'un noeud élément\n *\n * @private\n * @memberof XML\n * @method __getAttributes\n * @param {DOMElement} node - noeud contenant l'attribut recherché\n * @return {Object} nodeAttributes - objet contenant les noms et valeurs des différents attributs\n */\nfunction __getAttributes (node) {\n if (node.attributes.length > 0) {\n var nodeAttributes = {};\n var attributes = node.attributes;\n for (var i = 0; i < attributes.length; i++) {\n var attribute = attributes[i];\n nodeAttributes[attribute.nodeName] = attribute.nodeValue;\n }\n return nodeAttributes;\n }\n}\n\nexport default XML;\n" - }, - { - "id": 7, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/GeocodeLocation.js", - "name": "./src/Services/Geocode/Request/GeocodeLocation.js", - "index": 62, - "index2": 56, - "size": 1193, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/model/StreetAddress.js", - "issuerId": 72, - "issuerName": "./src/Services/Geocode/Request/model/StreetAddress.js", - "profile": { - "factory": 69, - "building": 240 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 72, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/model/StreetAddress.js", - "module": "./src/Services/Geocode/Request/model/StreetAddress.js", - "moduleName": "./src/Services/Geocode/Request/model/StreetAddress.js", - "type": "harmony import", - "userRequest": "../GeocodeLocation", - "loc": "2:0-49" - }, - { - "moduleId": 73, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/model/PositionOfInterest.js", - "module": "./src/Services/Geocode/Request/model/PositionOfInterest.js", - "moduleName": "./src/Services/Geocode/Request/model/PositionOfInterest.js", - "type": "harmony import", - "userRequest": "../GeocodeLocation", - "loc": "2:0-49" - }, - { - "moduleId": 74, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/model/CadastralParcel.js", - "module": "./src/Services/Geocode/Request/model/CadastralParcel.js", - "moduleName": "./src/Services/Geocode/Request/model/CadastralParcel.js", - "type": "harmony import", - "userRequest": "../GeocodeLocation", - "loc": "2:0-49" - }, - { - "moduleId": 75, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/model/Administratif.js", - "module": "./src/Services/Geocode/Request/model/Administratif.js", - "moduleName": "./src/Services/Geocode/Request/model/Administratif.js", - "type": "harmony import", - "userRequest": "../GeocodeLocation", - "loc": "2:0-49" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 6, - "source": "\n/**\n * @classdesc\n *\n * Liste des attributs des tables de geocodage\n * @constructor\n * @alias Gp.Services.Geocode.Request.GeocodeLocation\n * @private\n */\nfunction GeocodeLocation () {\n if (!(this instanceof GeocodeLocation)) {\n throw new TypeError(\"GeocodeLocation constructor cannot be called as a function.\");\n }\n\n /**\n * Objet qui peut prendre comme propriétés les valeurs du tableau serviceAttributes\n * @type {Object}\n */\n this.placeAttributes = {};\n\n /**\n * Tableau qui liste les attributs spécifiques selon le type de la GeocodeLocation.\n * Ces attributs correspondent à ceux saisis par l'utilisateur (légèrement différents de ceux du service)\n * @type {String[]}\n */\n this.attributesList = [];\n\n /**\n * Tableau qui liste les attributs spécifiques selon le type de la GeocodeLocation\n * Ces attributs correspondent à ceux interprétés par le service (balises Place).\n * @type {String[]}\n */\n this.serviceAttributes = [];\n}\n\n/**\n * @lends module:GeocodeLocation\n */\nGeocodeLocation.prototype = {\n\n /**\n * Constructeur (alias)\n */\n constructor : GeocodeLocation\n\n};\n\nexport default GeocodeLocation;\n" - }, - { - "id": 8, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/WKT.js", - "name": "./src/Formats/WKT.js", - "index": 90, - "index2": 85, - "size": 3934, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Response/RouteResponseFactory.js", - "issuerId": 93, - "issuerName": "./src/Services/Route/Response/RouteResponseFactory.js", - "profile": { - "factory": 215, - "building": 118, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 1, - "reasons": [ - { - "moduleId": 93, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Response/RouteResponseFactory.js", - "module": "./src/Services/Route/Response/RouteResponseFactory.js", - "moduleName": "./src/Services/Route/Response/RouteResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Formats/WKT", - "loc": "13:0-39" - }, - { - "moduleId": 94, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Formats/RouteResponseRESTReader.js", - "module": "./src/Services/Route/Formats/RouteResponseRESTReader.js", - "moduleName": "./src/Services/Route/Formats/RouteResponseRESTReader.js", - "type": "harmony import", - "userRequest": "../../../Formats/WKT", - "loc": "12:0-39" - }, - { - "moduleId": 99, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "module": "./src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "moduleName": "./src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "type": "harmony import", - "userRequest": "../../../Formats/WKT", - "loc": "13:0-39" - }, - { - "moduleId": 100, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Formats/ProcessIsoCurveResponseReader.js", - "module": "./src/Services/ProcessIsoCurve/Formats/ProcessIsoCurveResponseReader.js", - "moduleName": "./src/Services/ProcessIsoCurve/Formats/ProcessIsoCurveResponseReader.js", - "type": "harmony import", - "userRequest": "../../../Formats/WKT", - "loc": "11:0-39" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "import Logger from \"../Utils/LoggerByDefault\";\n\n/**\n * Lecture / Ecriture du format WKT\n *\n * Les besoins sont assez simples :\n * 1. lecture des types suivants :\n * - LINESTRING\n * - POLYGON\n * - (TODO)\n * 2. convertir aux formats suivants :\n * - json\n * - (TODO)\n *\n *\n * @example\n * var strWKT = \"LINESTRING (2.416907 48.846577, 2.416916 48.846613)\";\n * WKT.toJson (strWKT,\n * function onSuccess (json) {\n * // {\n * // type : 'LINESTRING',\n * // coordinates : [\n * // [2.416907, 48.846577],\n * // [2.416916, 48.846613]\n * // ]\n * // }\n * },\n * function onError (error) {\n * console.log(error);\n * }\n * );\n *\n * @module WKT\n * @alias Gp.Formats.WKT\n * @private\n */\n\nvar WKT = {\n\n /**\n * Parsing d'une chaine WKT\n *\n * @method toJson\n * @param {String} strWkt - chaine de type WKT\n * @param {Function} success - fonction callback\n * @param {Function} error - fonction callback\n */\n toJson : function (strWkt, success, error) {\n var logger = Logger.getLogger();\n\n var json = null;\n\n try {\n if (!strWkt) {\n throw new Error(\"La chaine WKT n'est pas renseignée !\");\n }\n\n if (!success) {\n // callback success par defaut\n success = function (json) {\n console.log(json);\n };\n }\n\n if (!error) {\n // callback error par defaut\n error = function (e) {\n console.log(e);\n };\n }\n\n var regex;\n var subst;\n\n // regex coordinates\n regex = /(-?\\d+\\.?[0-9]*)\\s(-?\\d+\\.?[0-9]+)/g;\n subst = \"[$1,$2]\";\n strWkt = strWkt.replace(regex, subst);\n\n // regex type\n regex = /^(\\w+)/;\n regex.exec(strWkt);\n if (RegExp.$1 === \"POLYGON\") {\n subst = \"{\\\"type\\\" : \\\"Polygon\\\",\";\n strWkt = strWkt.replace(RegExp.$1, subst);\n // clean\n // (( --> coordinates : [[\n regex = /(\\({2}?)/;\n subst = \"\\\"coordinates\\\" : [[\";\n strWkt = strWkt.replace(regex, subst);\n // )) --> ]]}\n regex = /(\\){2}?)/;\n subst = \"]]}\";\n strWkt = strWkt.replace(regex, subst);\n // all ( --> [\n regex = /(\\()/g;\n subst = \"[\";\n strWkt = strWkt.replace(regex, subst);\n // all ) --> ]\n regex = /(\\))/g;\n subst = \"]\";\n strWkt = strWkt.replace(regex, subst);\n } else if (RegExp.$1 === \"LINESTRING\") {\n subst = \"{\\\"type\\\" : \\\"LineString\\\",\";\n strWkt = strWkt.replace(RegExp.$1, subst);\n // clean\n regex = /(\\(\\(?)/;\n subst = \"\\\"coordinates\\\" : [\";\n strWkt = strWkt.replace(regex, subst);\n regex = /(\\)\\)?)/;\n subst = \"]}\";\n strWkt = strWkt.replace(regex, subst);\n }\n\n logger.trace(strWkt);\n\n json = JSON.parse(strWkt);\n\n if (!json) {\n throw new Error(\"Le JSON est vide !\");\n }\n\n if (!json.type) {\n throw new Error(\"Le type de geometrie n'est pas connu !\");\n }\n\n if (!json.coordinates) {\n throw new Error(\"La liste des points est vide !\");\n }\n\n success.call(this, json);\n } catch (e) {\n if (e.name === \"SyntaxError\") {\n error.call(this, \"Erreur de parsing JSON !\");\n return;\n }\n error.call(this, e);\n }\n }\n};\n\nexport default WKT;\n" - }, - { - "id": 9, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Response/model/AltiResponse.js", - "name": "./src/Services/Alti/Response/model/AltiResponse.js", - "index": 29, - "index2": 23, - "size": 603, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 56, - "building": 299 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/Alti/Response/model/AltiResponse", - "loc": "3:0-71" - }, - { - "moduleId": 58, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Response/AltiResponseFactory.js", - "module": "./src/Services/Alti/Response/AltiResponseFactory.js", - "moduleName": "./src/Services/Alti/Response/AltiResponseFactory.js", - "type": "harmony import", - "userRequest": "./model/AltiResponse", - "loc": "14:0-48" - }, - { - "moduleId": 59, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Formats/AltiResponseReader.js", - "module": "./src/Services/Alti/Formats/AltiResponseReader.js", - "moduleName": "./src/Services/Alti/Formats/AltiResponseReader.js", - "type": "harmony import", - "userRequest": "../Response/model/AltiResponse", - "loc": "15:0-58" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "/**\n * Response object for {@link module:Services~getAltitude Gp.Services.getAltitude ()} invocation when successful. Received as the argument of onSuccess callback function.\n *\n * @property {Array.} elevations - Elevations array.\n *\n * @namespace\n * @alias Gp.Services.AltiResponse\n */\nfunction AltiResponse () {\n if (!(this instanceof AltiResponse)) {\n throw new TypeError(\"AltiResponse constructor cannot be called as a function.\");\n }\n\n this.elevations = [];\n}\n\nAltiResponse.prototype = {\n\n constructor : AltiResponse\n\n};\n\nexport default AltiResponse;\n" - }, - { - "id": 10, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Response/model/Elevation.js", - "name": "./src/Services/Alti/Response/model/Elevation.js", - "index": 30, - "index2": 24, - "size": 789, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 56, - "building": 376 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/Alti/Response/model/Elevation", - "loc": "4:0-65" - }, - { - "moduleId": 58, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Response/AltiResponseFactory.js", - "module": "./src/Services/Alti/Response/AltiResponseFactory.js", - "moduleName": "./src/Services/Alti/Response/AltiResponseFactory.js", - "type": "harmony import", - "userRequest": "./model/Elevation", - "loc": "15:0-42" - }, - { - "moduleId": 59, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Formats/AltiResponseReader.js", - "module": "./src/Services/Alti/Formats/AltiResponseReader.js", - "moduleName": "./src/Services/Alti/Formats/AltiResponseReader.js", - "type": "harmony import", - "userRequest": "../Response/model/Elevation", - "loc": "16:0-52" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\n/**\n * Single elevation object returned by underlying web service. Contains at least, one elevation (z). May also contain point coordinates and elevation accuracy if \"zonly\" parameter wasn't set to true.\n *\n * @property {Float} lat - Point latitude. (only if zonly=false)\n * @property {Float} lon - Point longitude. (only if zonly=false)\n * @property {Float} z - Point elevation.\n * @property {Float} acc - Accuracy of elevation for this point. (only if zonly=false)\n *\n * @namespace\n * @alias Gp.Services.Alti.Elevation\n */\nfunction Elevation () {\n if (!(this instanceof Elevation)) {\n throw new TypeError(\"Elevation constructor cannot be called as a function.\");\n }\n\n this.z = null;\n}\n\nElevation.prototype = {\n\n constructor : Elevation\n\n};\n\nexport default Elevation;\n" - }, - { - "id": 11, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS.js", - "name": "./src/Formats/XLS.js", - "index": 50, - "index2": 48, - "size": 15219, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/ReverseGeocodeRequestFactory.js", - "issuerId": 79, - "issuerName": "./src/Services/Geocode/Request/ReverseGeocodeRequestFactory.js", - "profile": { - "factory": 96, - "building": 254, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 64, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "module": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "moduleName": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "type": "harmony import", - "userRequest": "../../../Formats/XLS", - "loc": "10:0-39" - }, - { - "moduleId": 79, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/ReverseGeocodeRequestFactory.js", - "module": "./src/Services/Geocode/Request/ReverseGeocodeRequestFactory.js", - "moduleName": "./src/Services/Geocode/Request/ReverseGeocodeRequestFactory.js", - "type": "harmony import", - "userRequest": "../../../Formats/XLS", - "loc": "10:0-39" - }, - { - "moduleId": 86, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Request/RouteRequestOLS.js", - "module": "./src/Services/Route/Request/RouteRequestOLS.js", - "moduleName": "./src/Services/Route/Request/RouteRequestOLS.js", - "type": "harmony import", - "userRequest": "../../../Formats/XLS", - "loc": "10:0-39" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "import Logger from \"../Utils/LoggerByDefault\";\nimport RequestHeader from \"./XLS/RequestHeader\";\nimport Request from \"./XLS/Request\";\nimport AbstractService from \"./XLS/AbstractService\";\n\n/**\n * @classdesc\n *\n * standard OpenLS\n * standard XLS\n * (version 1.2)\n *\n * Réfs :\n * - {@link http://schemas.opengis.net/ols/1.2/}\n * - {@link http://www.opengeospatial.org/standards/ols}\n * - {@link http://wxs.ign.fr/schemas/}\n *\n *\n * Création du template XLS (avec gestion des namespaces)\n * ------------------------\n * ```\n * balise xsd : element name=\"XLS\" attribute name=\"version\" [(attribute ref=\"lang\")]\n * ```\n *\n * Exemple :\n * ```\n * \n * < (ref. OLS) />\n * \n * ```\n * ```\n * \n * \n * \n * ```\n *\n * Création des templates OLS pour LocationUtilityService\n * ------------------------------------------------------\n *\n * Exemple :\n *\n * ```\n * \n * \n * \n *
\n * saint mandé\n *
\n *
\n *
\n * ```\n * ```\n * \n * \n * \n * \n * \n * 50.347775 3.205098\n * \n * \n * StreetAddress\n * \n * \n * ```\n * ```\n * Geocodage direct (balise xsd) :\n * element ref=\"RequestHeader\" [ (attribute name=\"clientName\" attribute name=\"clientPassword\" attribute name=\"sessionID\" attribute name=\"srsName\" attribute name=\"MSID\") ]\n * element name=\"Request\" attribute name=\"methodName\" attribute name=\"version\" attribute name=\"requestID\" [ attribute name=\"maximumResponses\" ]\n * element name=\"GeocodeRequest\" attribute name=\"returnFreeForm\"\n * element ref=\"xls:Address\"\n * ```\n * ```\n * Geocodage inverse (balise xsd) :\n * element ref=\"RequestHeader\" [ (attribute name=\"clientName\" attribute name=\"clientPassword\" attribute name=\"sessionID\" attribute name=\"srsName\" attribute name=\"MSID\") ]\n * element name=\"Request\" attribute name=\"methodName\" attribute name=\"version\" attribute name=\"requestID\" [ attribute name=\"maximumResponses\" ]\n * element name=\"ReverseGeocodeRequest\"\n * element ref=\"xls:Position\"\n * element name=\"ReverseGeocodePreference\" (enumeration)\n * ```\n *\n * Il existe 3 sous ensembles d'objets :\n * - RequestHeader\n * - Request\n * - ReverseGeocodeRequest, GeocodeRequest\n *\n * GeocodeRequest est composé d'un objet {@link Gp.Services.Geocode.Response.GeocodeLocation}.\n * ReverseGeocodeRequest est composé d'un objet {@link Gp.Services.ReverseGeocode.Response.ReverseGeocodeLocation}.\n *\n * Les locations font appels aux objets suivants qui possèdent des attributs spécifiques\n * en fonction du type de table de geocodage interrogé :\n * - StreetAddress\n * - CadastralParcel\n * - PositionOfInterest\n * - Administratif\n *\n *\n * et des élements sous jacents tels que :\n * - ReverseGeocodePreference -> tables de geocodages :\n * - StreetAddress\n * - CadastralParcel\n * - PositionOfInterest\n * - Administratif (une balise par table)\n * - Position -> standard GML 3.2.1\n * - Address -> cf. ci-dessous\n *\n * ```\n * Position (balise xsd) :\n * ex. 50.347775 3.205098\n * ex. 48.85978570614691 2.29135727611288781000\n * (au choix)\n * element ref=\"gml:Point\"\n * element ref=\"gml:CircleByCenterPoint\"\n * element ref=\"gml:Polygon\"\n * element ref=\"gml:MultiPolygon\"\n * les autres elemennts ne sont pas implémentés (QoP, Speed, Direction, Time, ...)\n *\n * Address (balise xsd) :\n * ex.
1 r de paris saint denis
\n * attribute name=\"countryCode\"\n * element name=\"freeFormAddress\"\n * element ref=\"xls:Place\"\n * element ref=\"gml:Envelope\"\n * ou\n * ex.
1 rue MarconiMetz57000
\n * attribute name=\"countryCode\"\n * element ref=\"xls:StreetAddress\"\n * element ref=\"xls:PostalCode\"\n * element ref=\"xls:Place\"\n * element ref=\"gml:Envelope\"\n *\n * Place (balise xsd) :\n * ex. Metz\n * attribute name=\"type\"\n * enumeration value=\"CountrySubdivision\"\n * enumeration value=\"CountrySecondarySubdivision\"\n * enumeration value=\"Municipality\"\n * enumeration value=\"MunicipalitySubdivision\"\n * enumeration value=\"choume-banchi-go\"\n * enumeration value=\"Qualite\"\n * enumeration value=\"Departement\"\n * enumeration value=\"Bbox\"\n * enumeration value=\"Commune\"\n * enumeration value=\"Territoire\"\n * enumeration value=\"Importance\"\n * enumeration value=\"Nature\"\n * (la liste n'est pas exhaustives...)\n *\n * StreetAddress (balise xsd) :\n * ex. 1 rue Marconi\n * attribute name=\"locator\"\n * element name=\"xls:Building\"\n * element ref=\"xls:Street\"\n *\n * Street (balise xsd) :\n * ex. 1 rue Marconi\n * attribute name=\"officialName\" (...)\n *\n * Building (balise xsd) :\n * ex. \n * attribute name=\"number\" attribute name=\"subdivision\" attribute name=\"buildingName\"\n *\n * PostalCode (balise xsd) :\n * ex. 77182\n *\n * ```\n *\n * Requête\n * -------\n *\n * 2 modes de requête sur les services : GET ou POST.\n *\n * Le mode GET n'est que l'encodage du XML en param (qxml) de la requête (donc pas d'implementation particulière ?)\n *\n * Modèle de classes\n * -----------------\n *\n * ```\n * ________ XLS ____________\n * / | \\\n * RequestHeader AbstractService Request\n * ^\n * ______|________________________\n * (extends) / \\ (extends)\n * LocationUtilityService RouteService\n * | |\n * ___________|___________ (...)\n * / \\\n * GeocodeRequest ReverseGeocodeRequest\n * | |\n * | _____|______\n * | / \\\n * Address Preference Position\n * |\n * / \\\n * Place StreetAddress\n * |\n * / \\\n * Street Building\n * ```\n *\n * @example\n * // encapsule un objet 'LocationUtilityService'\n * // dans une coquille XSL (avec/sans namespace)\n * xsl = new XSL ();\n * xsl.namespace = false;\n * xsl.srsName = \"epsg:4326\";\n * xsl.maximumResponses = 26;\n * // methodName fournit par l'objet 'lus'\n * // requestID est calculé\n * xsl.setService (lus);\n * xsl.build ();\n * // out ->\n * // \n * // \n * // \n * // < (ref. LocationUtilityService ou vide) />\n * // \n * // \n *\n *\n * @constructor\n * @alias Gp.Formats.XLS\n * @param {Object} options - options du constructeur\n * @param {Object} options.srsName - identifiant du Systeme de Coordonnees\n * @param {String} options.maximumResponses - nombre de reponses max d'une requete\n * @param {Function} options.onsuccess - function callback success (TODO)\n * @param {Function} options.onerror - function callback error (TODO)\n *\n * @private\n */\nfunction XLS (options) {\n this.logger = Logger.getLogger();\n this.logger.trace(\"[Constructeur XLS()]\");\n\n if (!(this instanceof XLS)) {\n throw new TypeError(\"XLS constructor cannot be called as a function.\");\n }\n\n // options par defaut\n this.options = {\n srsName : \"EPSG:4326\",\n maximumResponses : 25\n };\n\n // et on ajoute les options en paramètre aux options par défaut\n for (var opt in options) {\n if (options.hasOwnProperty(opt)) {\n if (options[opt]) {\n this.options[opt] = options[opt];\n }\n }\n }\n}\n\n/**\n * Version\n */\nXLS.VERSION = \"1.2\";\n\nXLS.prototype = {\n\n /**\n * @lends module:XLS#\n */\n\n /**\n * request (out)\n * @type {String}\n */\n requestString : null,\n\n /**\n * namespace\n * Surcharge les balises XLS d'un prefixe.\n * Par defaut, false\n * @type {Boolean}\n */\n namespace : false,\n\n /**\n * Objet Service\n * LocationUtilityService ou RouteService\n * @type {AbstractService}\n */\n oService : null,\n\n /**\n * Constructeur (alias)\n */\n constructor : XLS,\n\n /**\n * Template de la requête.\n * substitution des valeurs suivantes :\n * __VERSION__, __NAMESPACE__, __SCHEMALOCATION__\n * __REQUESTHEADER__, __REQUEST__\n */\n template : \"\\n\" +\n \"\\n\" +\n \"__REQUESTHEADER__\\n\" +\n \"__REQUEST__\\n\" +\n \"\\n\",\n\n /**\n * Namespace par defaut.\n *\n * @returns {String} namespace\n */\n namespaceByDefault : function () {\n var ns = [\n \"xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\"\",\n \"xmlns:xls=\\\"http://www.opengis.net/xls\\\"\",\n \"xmlns:gml=\\\"http://www.opengis.net/gml\\\"\"\n ];\n\n return ns.join(\" \");\n },\n\n /**\n * Schemalocation par defaut\n *\n * @returns {String} schemaLocation\n */\n schemaLocationByDefault : function () {\n return \"xsi:schemaLocation=\\\"http://www.opengis.net/xls http://schemas.opengis.net/ols/1.2/olsAll.xsd\\\"\";\n },\n\n /**\n * Setter Service\n * Ajout d'un objet de type LocationUtilityService (LUS) ou RouteService\n *\n * @param {Object} oService - GeoceodeRequest / ReverseGeocodeRequest ou RouteRequest\n */\n setService : function (oService) {\n if (!oService) {\n this.logger.trace(\"L'objet de type Service XSL n'est pas encore defini !?\");\n return;\n }\n\n if (oService instanceof AbstractService) {\n this.oService = oService;\n } else {\n this.logger.error(\"L'objet n'est pas du type 'LocationUtilityService' ou 'RouteService' !?\");\n }\n },\n\n /**\n * Getter Service\n * Retourne un objet de type LocationUtilityService (LUS) ou RouteService\n * ex. GeoceodeRequest / ReverseGeocodeRequest ou RouteRequest\n *\n * @returns {Object} service (LocationUtilityService|RouteService)\n */\n getService : function () {\n return this.oService;\n }\n};\n\n/**\n * Ajout d'un prefixe de namespace\n *\n * @todo impl. l'ajout de namespace\n * @param {Object} ns - ex. {key:xls, url:http://www.opengis.net/xls}\n * @param {String} request - requête\n * @returns {String} requête\n */\nXLS.prototype.addNamespace = function (ns, request) {\n // INFO\n // on recherche la clef dans les namespaces par defaut.\n // si la clef n'existe pas dans les namespaceByDefault (), on l'ajoute.\n // on surcharge toutes les balises, ex. XLS -> xls:XLS\n // sauf celles qui sont déjà prefixées !\n\n var keyNS = ns.key;\n // var urlNS = ns.url; // TODO not yet implemented !\n\n // recherche la clef dans les namespaces par defaut\n var bFound = false;\n var allNS = this.namespaceByDefault().split(\" \");\n for (var index = 0; index < allNS.length; index++) {\n var element = allNS[index];\n var map = element.split(\"=\");\n var key = map[0];\n // var url = map[1]; // TODO not yet implemented !\n\n if (key === \"xmlns:\" + keyNS) {\n bFound = true;\n break;\n }\n }\n\n // TODO\n // si on a une nouvelle clef, on l'ajoute...\n if (!bFound) {\n this.logger.warn(\"L'ajout d'un nouvel namespace n'est pas encore implémenté !\");\n return request;\n }\n\n // surcharge toutes les balises\n var regex;\n var subst;\n\n // regex balise ouvrante\n regex = /<(\\w+[\\s>])/g;\n subst = \"<\" + keyNS + \":$1\";\n request = request.replace(regex, subst);\n\n // regex balise fermante\n regex = /<\\/(\\w+[\\s>])/g;\n subst = \"\n // \n // \n // \n // < (ref. LocationUtilityService ou vide) />\n // \n // \n\n // as t on un objet de type Service XLS à disposition ?\n var bService = !!this.getService();\n\n var template = \"\";\n template = this.template;\n template = template.replace(/__VERSION__/g, XLS.VERSION);\n template = template.replace(/__NAMESPACE__/g, this.namespaceByDefault);\n template = template.replace(/__SCHEMALOCATION__/g, this.schemaLocationByDefault);\n\n // header\n var oHeader = new RequestHeader({\n srsName : this.options.srsName\n });\n template = template.replace(/__REQUESTHEADER__/g, oHeader.toString());\n\n // request\n var oRequest = new Request({\n maximumResponses : this.options.maximumResponses,\n version : XLS.VERSION, // FIXME même version ?\n methodName : bService ? this.getService().CLASSTYPE : null\n });\n template = template.replace(/__REQUEST__/g, oRequest.toString());\n\n // objet lus ou route\n if (bService) { // INFO : clef __REQUESTSERVICE__ dispo dans l'objet 'Request'\n template = template.replace(//g, this.getService().toString());\n }\n\n if (!template) {\n this.logger.warn(\"traduction tmpl : empty request !?\");\n return;\n }\n\n // ajout d'un namespace\n if (this.namespace) {\n // ajout de xls par defaut\n template = this.addNamespace({\n key : \"xls\",\n url : \"http://www.opengis.net/xls\"\n }, template);\n }\n\n this.requestString = template;\n this.logger.trace(\"traduction tmpl\", template);\n\n // on retourne qqchose !\n return this.requestString;\n};\n\nexport default XLS;\n" - }, - { - "id": 12, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/AbstractService.js", - "name": "./src/Formats/XLS/AbstractService.js", - "index": 53, - "index2": 47, - "size": 1893, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS.js", - "issuerId": 11, - "issuerName": "./src/Formats/XLS.js", - "profile": { - "factory": 743, - "building": 94, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 11, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS.js", - "module": "./src/Formats/XLS.js", - "moduleName": "./src/Formats/XLS.js", - "type": "harmony import", - "userRequest": "./XLS/AbstractService", - "loc": "4:0-52" - }, - { - "moduleId": 38, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService.js", - "module": "./src/Formats/XLS/LocationUtilityService.js", - "moduleName": "./src/Formats/XLS/LocationUtilityService.js", - "type": "harmony import", - "userRequest": "./AbstractService", - "loc": "2:0-48" - }, - { - "moduleId": 87, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/RouteService.js", - "module": "./src/Formats/XLS/RouteService.js", - "moduleName": "./src/Formats/XLS/RouteService.js", - "type": "harmony import", - "userRequest": "./AbstractService", - "loc": "2:0-48" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 6, - "source": "import Logger from \"../../Utils/LoggerByDefault\";\n\n/**\n * @classdesc\n * @private\n *\n * @constructor\n * @alias Gp.Formats.XLS.AbstractService\n *\n * @param {Object} [options] - options\n */\nfunction AbstractService (options) {\n this.logger = Logger.getLogger();\n this.logger.trace(\"[Constructeur AbstractService ()]\");\n\n if (!(this instanceof AbstractService)) {\n throw new TypeError(\"AbstractService constructor cannot be called as a function.\");\n }\n\n // options par defaut\n this.options = options || {};\n\n // et on ajoute les options en paramètre aux options par défaut\n for (var opt in options) {\n if (options.hasOwnProperty(opt)) {\n this.options[opt] = options[opt];\n }\n }\n}\n\n/**\n * @lends module:AbstractService#\n */\nAbstractService.prototype = {\n\n /**\n * request (out)\n * @type {String}\n */\n strRequest : null,\n\n /**\n * objet Request\n * @type {Request}\n */\n oRequest : null,\n\n /**\n * Filter\n * @type {FilterExtension}\n */\n oFilter : null,\n\n /**\n * Constructeur (alias)\n */\n constructor : AbstractService,\n\n /**\n * Ajout d'un objet de type Request : GeocodeRequest / ReverseGeocodeRequest / RouteRequest\n *\n * @param {Object} oRequest - GeocodeRequest / ReverseGeocodeRequest / RouteRequest\n */\n addRequest : function (oRequest) {\n this.logger.error(\"overwritten method !\");\n },\n\n /**\n * Ajout d'un objet de type FilterExtension : GeocodeFilterExtension ou RouteRequestExtension\n *\n * @param {Object} oFilter - GeocodeFilterExtension ou RouteRequestExtension\n */\n addFilter : function (oFilter) {\n this.logger.error(\"overwritten method !\");\n },\n\n /**\n * toString\n */\n toString : function () {\n this.logger.error(\"overwritten method !\");\n }\n};\n\nexport default AbstractService;\n" - }, - { - "id": 13, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService/GeocodeFilterExtension.js", - "name": "./src/Formats/XLS/LocationUtilityService/GeocodeFilterExtension.js", - "index": 57, - "index2": 50, - "size": 5425, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "issuerId": 64, - "issuerName": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "profile": { - "factory": 58, - "building": 790, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 38, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService.js", - "module": "./src/Formats/XLS/LocationUtilityService.js", - "moduleName": "./src/Formats/XLS/LocationUtilityService.js", - "type": "harmony import", - "userRequest": "./LocationUtilityService/GeocodeFilterExtension", - "loc": "5:0-85" - }, - { - "moduleId": 64, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "module": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "moduleName": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "type": "harmony import", - "userRequest": "../../../Formats/XLS/LocationUtilityService/GeocodeFilterExtension", - "loc": "12:0-104" - }, - { - "moduleId": 67, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService/GeocodeRequest.js", - "module": "./src/Formats/XLS/LocationUtilityService/GeocodeRequest.js", - "moduleName": "./src/Formats/XLS/LocationUtilityService/GeocodeRequest.js", - "type": "harmony import", - "userRequest": "./GeocodeFilterExtension", - "loc": "3:0-62" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "\nimport Logger from \"../../../Utils/LoggerByDefault\";\n\n/**\n * @classdesc\n *\n * Ajouter des extensions de filtres spécifiques au service de geocodage de l'IGN.\n * Ceci permet de contrôler les options spécifiques de la table de geocodage intérrogées.\n *\n * @example\n * var ext = new GeocodeFiltersExtension ();\n * ext.add (new Administratif ());\n * ext.add (new StreetAddress ());\n * ext.add (new PositionOfInterest ());\n * ext.add (new CadastralParcel ());\n *\n * ext.getNames ()\n * // --> out\n * // [Administratif, StreetAddress, PositionOfInterest, CadastralParcel]\n *\n * ext.getFilters ()\n * // --> out\n * // [Object, Object, Object, Object] = tableau d'objet GeocodeLocation\n *\n * ext.getFilter ('StreetAddress')\n * // --> out\n * // {Object} = objet GeocodeLocation\n *\n * ext.getAttributs ('StreetAddress')\n * // --> out\n * // [\"bbox\", \"number\", \"ID\", \"IDTR\", \"postalCode\", \"quality\", \"street\", \"territoire\", \"commune\", \"department\", \"insee\", \"municipality\"]\n *\n * ext.setPlaceAttributs ('StreetAddress', {number:'', territoire:'', quality:'', fake:''})\n * // --> out\n * // (fake est écarté car il n'appartient pas à la liste !)\n *\n * ext.getPlaceAttributs ('StreetAddress')\n * // --> out\n * // {number : '', territoire : '', quality : ''}\n *\n * // Comment ajouter des filtres spécifiques au service de geocodage ?\n * var req = new GeocodeRequest ({\n * location : \"saint mandé\",\n * returnFreeForm : true,\n * filterOptions : {\n * type : ['PositionOfInterest'], <-- ajouter une extension afin de gerer les attributs de cette table de geocodage !\n * (...)\n * }\n * })\n * req.addFilter (new PositionOfInterest ());\n * @constructor\n * @alias Gp.Formats.XLS.LocationUtilityService.GeocodeFilterExtension\n *\n * @private\n */\nfunction GeocodeFilterExtension () {\n this.logger = Logger.getLogger(\"GeocodeFilterExtension\");\n this.logger.trace(\"[Constructeur GeocodeFilterExtension ()]\");\n\n if (!(this instanceof GeocodeFilterExtension)) {\n throw new TypeError(\"GeocodeFilterExtension constructor cannot be called as a function.\");\n }\n\n /**\n * Tableau de filtres (table de geocodage)\n */\n this.filters = [];\n}\n\n/**\n * @lends module:GeocodeFilterExtension#\n */\nGeocodeFilterExtension.prototype = {\n\n /**\n * Constructeur (alias)\n */\n constructor : GeocodeFilterExtension,\n\n /**\n * Ajout d'un filtre\n *\n * @param {Object} oGeocodeLocation - objet de type 'GeocodeLocation'\n */\n addFilterExtensions : function (oGeocodeLocation) {\n // FIXME test sur le type d'objet !\n if (oGeocodeLocation) {\n // FIXME ou test sur ses propriétés !\n this.filters.push(oGeocodeLocation);\n }\n },\n\n // getter\n\n /**\n * Tableau de noms (tables de geocodage)\n *\n * @returns {Array.} liste des noms de filtres\n */\n getNames : function () {\n var names = [];\n for (var idx in this.filters) {\n names.push(this.filters[idx].CLASSNAME);\n }\n this.logger.trace(names);\n return names;\n },\n\n /**\n * Retourne une table de geocodage\n *\n * @param {String} name - nom de la table de geocodage\n * @returns {Object} filtre\n */\n getFilter : function (name) {\n var filter = null;\n for (var idx in this.filters) {\n if (this.filters[idx].CLASSNAME === name) {\n filter = this.filters[idx];\n }\n }\n this.logger.trace(filter);\n return filter;\n },\n\n /**\n * Tableau d'objects (tables de geocodage)\n *\n * @returns {Array.} liste des filtres\n */\n getFilters : function () {\n this.logger.trace(this.filters);\n return this.filters;\n },\n\n /**\n * Récupère la liste des attributs (filtres) sur une table de geocodage\n *\n * @param {String} name - nom de la table de geocodage\n * @returns {Array} liste des attributs d'un filtre\n */\n getAttributs : function (name) {\n var attributs = [];\n for (var idx in this.filters) {\n if (this.filters[idx].CLASSNAME === name) {\n attributs = this.filters[idx].attributesList;\n }\n }\n this.logger.trace(attributs);\n return attributs;\n },\n\n /**\n * Ajout des attributs (filtres) sur une table de geocodage\n *\n * @param {String} name - nom de la table de geocodage\n * @param {Object} options - options de la table de geocodage\n */\n setPlaceAttributs : function (name, options) {\n var filter = this.getFilter(name);\n var attributs = this.getAttributs(name);\n for (var idx in attributs) {\n var value = attributs[idx];\n if (options[value]) {\n filter.placeAttributes[value] = options[value];\n }\n }\n },\n\n /**\n * Retourne les attributs (filtres) sur une table de geocodage\n *\n * @param {String} name - nom de la table de geocodage\n * @returns {Array} liste des attributs d'un filtre\n */\n getPlaceAttributs : function (name) {\n var places = {};\n for (var idx in this.filters) {\n if (this.filters[idx].CLASSNAME === name) {\n places = this.filters[idx].placeAttributes;\n }\n }\n this.logger.trace(places);\n return places;\n }\n};\n\nexport default GeocodeFilterExtension;\n" - }, - { - "id": 14, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Response/model/GeocodeResponse.js", - "name": "./src/Services/Geocode/Response/model/GeocodeResponse.js", - "index": 68, - "index2": 62, - "size": 746, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 60, - "building": 546 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/Geocode/Response/model/GeocodeResponse", - "loc": "21:0-80" - }, - { - "moduleId": 77, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Formats/DirectGeocodeResponseReader.js", - "module": "./src/Services/Geocode/Formats/DirectGeocodeResponseReader.js", - "moduleName": "./src/Services/Geocode/Formats/DirectGeocodeResponseReader.js", - "type": "harmony import", - "userRequest": "../Response/model/GeocodeResponse", - "loc": "14:0-64" - }, - { - "moduleId": 81, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Formats/ReverseGeocodeResponseReader.js", - "module": "./src/Services/Geocode/Formats/ReverseGeocodeResponseReader.js", - "moduleName": "./src/Services/Geocode/Formats/ReverseGeocodeResponseReader.js", - "type": "harmony import", - "userRequest": "../Response/model/GeocodeResponse", - "loc": "14:0-71" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\n/**\n * Response object for {@link module:Services~geocode Gp.Services.geocode ()} or {@link module:Services~reverseGeocode Gp.Services.reverseGeocode ()} invocation when successful. Received as the argument of onSuccess callback function.\n *\n * @property {Array.} locations - locations array.\n *\n * @namespace\n * @alias Gp.Services.GeocodeResponse\n */\nfunction GeocodeResponse () {\n if (!(this instanceof GeocodeResponse)) {\n throw new TypeError(\"GeocodeResponse constructor cannot be called as a function.\");\n }\n\n this.locations = [];\n}\n\nGeocodeResponse.prototype = {\n\n constructor : GeocodeResponse\n\n};\n\nexport default GeocodeResponse;\n" - }, - { - "id": 15, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Response/model/GeocodedLocation.js", - "name": "./src/Services/Geocode/Response/model/GeocodedLocation.js", - "index": 70, - "index2": 63, - "size": 3024, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 60, - "building": 556 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 39, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Response/model/DirectGeocodedLocation.js", - "module": "./src/Services/Geocode/Response/model/DirectGeocodedLocation.js", - "moduleName": "./src/Services/Geocode/Response/model/DirectGeocodedLocation.js", - "type": "harmony import", - "userRequest": "./GeocodedLocation", - "loc": "2:0-50" - }, - { - "moduleId": 40, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Response/model/ReverseGeocodedLocation.js", - "module": "./src/Services/Geocode/Response/model/ReverseGeocodedLocation.js", - "moduleName": "./src/Services/Geocode/Response/model/ReverseGeocodedLocation.js", - "type": "harmony import", - "userRequest": "./GeocodedLocation", - "loc": "2:0-50" - }, - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/Geocode/Response/model/GeocodedLocation", - "loc": "22:0-82" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\n/**\n * Location object holding common properties returned by the underlying geocoding and reverse geocoding web service.\n *\n * @property {Gp.Point} position - Position of the location given in the requested coordinates system.\n * @property {String} type - location type \"StreetAddress\" (for an address), \"PositionOfInterest\" (for a place name) or \"CadastralParcel\" (for cadastral parcel).\n * @property {String} matchType - how geocoding is performed : \"street number\" (exact address), \"street enhanced\" (street number calculated by interpolation), \"street\" (only the street), \"city\" (only the city).\n * @property {Object} placeAttributes - Associative array matching the following attributes with their values given by the underlying web service :\n *\n * *Common attributes : *\n *\n * - **freeform** - freeform complete Address.\n * - **bbox** - Bounding Box *{@link Gp.BBox}*.\n * - **municipality** - Municipality\n *\n * *if type === \"StreetAddress\" : *\n *\n * - **number** - Street number.\n * - **ID** - Identifier of the address in the [BD ADRESSE Database]{@link http://professionnels.ign.fr/bdadresse}.\n * - **IDTR** - Identifier of the lineString in the [BD ADRESSE Database]{@link http://professionnels.ign.fr/bdadresse}.\n * - **postalCode** - PostCode\n * - **quality** - Geocoding quality ([see]{@link http://api.ign.fr/tech-docs-js/developpeur/search.html})\n * - **street** - Street name\n * - **territory** - French Territory code\n * - **commune** - City\n * - **department** - Department\n * - **insee** - INSEE Code\n *\n *\n * *if type === \"PositionOfInterest\" :*\n *\n * - **importance** - Place name importance\n * - **nature** - Place name nature\n * - **postalCode** - PostCode\n * - **territory** - French Territory code\n * - **commune** - City\n * - **department** - Department\n * - **insee** - INSEE Code\n *\n *\n * *si type = \"CadastralParcel\" :*\n *\n * - **absorbedCity** - when a parcel comes from a city that was absorbed by another, code of that old city. \"000\" otherwise.\n * - **arrondissement** - arrondissement\n * - **cadastralParcel** - cadastral parcel code\n * - **district** - district\n * - **sheet** - Parcel Sheet (eg. \"1\").\n * - **number** - Parcel Number (eg. \"0041\")\n * - **section** - Parcel Section (eg. \"0D\").\n * - **commune** - Parcel municipality.\n * - **department** - Parcel Department.\n * - **insee** - INSEE Code.\n * - **origin** - Parcel origin (see \"type\" attribute in the [underlying web service response]{@link http://api.ign.fr/tech-docs-js/developpeur/search.html#Cadastral_parcels_search})\n *\n * @namespace\n * @alias Gp.Services.Geocode.GeocodedLocation\n */\nfunction GeocodedLocation () {\n if (!(this instanceof GeocodedLocation)) {\n throw new TypeError(\"GeocodedLocation constructor cannot be called as a function.\");\n }\n\n this.position = {\n x : null,\n y : null\n };\n\n this.matchType = null;\n\n this.placeAttributes = {};\n\n this.type = null;\n}\n\nGeocodedLocation.prototype = {\n\n constructor : GeocodedLocation\n\n};\n\nexport default GeocodedLocation;\n" - }, - { - "id": 16, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Response/model/RouteResponse.js", - "name": "./src/Services/Route/Response/model/RouteResponse.js", - "index": 92, - "index2": 86, - "size": 1557, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 61, - "building": 602 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/Route/Response/model/RouteResponse", - "loc": "26:0-74" - }, - { - "moduleId": 93, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Response/RouteResponseFactory.js", - "module": "./src/Services/Route/Response/RouteResponseFactory.js", - "moduleName": "./src/Services/Route/Response/RouteResponseFactory.js", - "type": "harmony import", - "userRequest": "./model/RouteResponse", - "loc": "16:0-50" - }, - { - "moduleId": 94, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Formats/RouteResponseRESTReader.js", - "module": "./src/Services/Route/Formats/RouteResponseRESTReader.js", - "moduleName": "./src/Services/Route/Formats/RouteResponseRESTReader.js", - "type": "harmony import", - "userRequest": "../Response/model/RouteResponse", - "loc": "14:0-60" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "/**\n * Response object for {@link module:Services~route Gp.Services.route ()} invocation when successful. Received as the argument of onSuccess callback function.\n *\n * @property {Gp.BBox} bbox - Bounding Box of the route. Given when provideBBox parameter is used in function call.\n * @property {Object} routeGeometry - Geometry (expressed in [GeoJSON]{@link http://geojson.org/}) of the route.\n * @property {Array.} routeInstructions - Instructions of the route.\n * @property {String} totalDistance - Length of the route. If distanceUnit parameter was set to \"km\" (default), totalDistance is a string containing the total distance expressed in kilometers, followed by \" Km\" (e.g. : \"19.6 Km\"). If distanceUnit parameter was set to \"m\", totalDistance is a string containing the total distance expressed in meters (e.g. : \"19599.14\").\n * @property {Float} totalTime - Route duration in seconds.\n *\n * @namespace\n * @alias Gp.Services.RouteResponse\n */\nfunction RouteResponse () {\n if (!(this instanceof RouteResponse)) {\n throw new TypeError(\"RouteResponse constructor cannot be called as a function.\");\n }\n\n this.totalTime = null;\n\n this.totalDistance = null;\n\n this.bbox = {\n left : null,\n right : null,\n top : null,\n bottom : null\n };\n\n this.routeGeometry = null; // FIXME can be null if option 'geometryInInstructions' is true !\n\n this.routeInstructions = [];\n}\n\nRouteResponse.prototype = {\n\n constructor : RouteResponse\n\n};\n\nexport default RouteResponse;\n" - }, - { - "id": 17, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Response/model/RouteInstruction.js", - "name": "./src/Services/Route/Response/model/RouteInstruction.js", - "index": 93, - "index2": 87, - "size": 1342, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 62, - "building": 615 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/Route/Response/model/RouteInstruction", - "loc": "27:0-80" - }, - { - "moduleId": 93, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Response/RouteResponseFactory.js", - "module": "./src/Services/Route/Response/RouteResponseFactory.js", - "moduleName": "./src/Services/Route/Response/RouteResponseFactory.js", - "type": "harmony import", - "userRequest": "./model/RouteInstruction", - "loc": "17:0-56" - }, - { - "moduleId": 94, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Formats/RouteResponseRESTReader.js", - "module": "./src/Services/Route/Formats/RouteResponseRESTReader.js", - "moduleName": "./src/Services/Route/Formats/RouteResponseRESTReader.js", - "type": "harmony import", - "userRequest": "../Response/model/RouteInstruction", - "loc": "15:0-66" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\n/**\n * Single Route Instruction object.\n *\n * @property {String} code - Instruction code :\n *\n * - \"F\" : Straight forward\n * - \"B\" : U-turn\n * - \"L\" : turn left\n * - \"R\" : turn right\n * - \"BL\" : turn left strongly\n * - \"BR\" : turn right strongly\n * - \"FL\" : turn lightly to the left\n * - \"FR\" : turn lightly to the right\n * - \"round_about_entry\" : round about entry\n * - \"round_about_exit\" : round about exit\n *\n * @property {String} instruction - Instruction text : translated code + street name\n * @property {Object} geometry - Geometry (expressed in [GeoJSON]{@link http://geojson.org/}) of the street.\n * @property {Float} distance - Length of the instruction. Expressed in km or m, depending on distanceUnit parameter.\n * @property {Float} duration - Instruction duration in seconds.\n *\n * @namespace\n * @alias Gp.Services.Route.RouteInstruction\n */\nfunction RouteInstruction () {\n if (!(this instanceof RouteInstruction)) {\n throw new TypeError(\"RouteInstruction constructor cannot be called as a function.\");\n }\n\n this.duration = null;\n\n this.distance = null;\n\n this.code = null;\n\n this.instruction = null;\n\n this.geometry = null; // FIXME can be null if option 'geometryInInstructions' is false !\n}\n\nRouteInstruction.prototype = {\n\n constructor : RouteInstruction\n\n};\n\nexport default RouteInstruction;\n" - }, - { - "id": 18, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Response/model/ProcessIsoCurveResponse.js", - "name": "./src/Services/ProcessIsoCurve/Response/model/ProcessIsoCurveResponse.js", - "index": 100, - "index2": 94, - "size": 1395, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 61, - "building": 591 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/ProcessIsoCurve/Response/model/ProcessIsoCurveResponse", - "loc": "25:0-97" - }, - { - "moduleId": 99, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "module": "./src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "moduleName": "./src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "type": "harmony import", - "userRequest": "./model/ProcessIsoCurveResponse", - "loc": "15:0-70" - }, - { - "moduleId": 100, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Formats/ProcessIsoCurveResponseReader.js", - "module": "./src/Services/ProcessIsoCurve/Formats/ProcessIsoCurveResponseReader.js", - "moduleName": "./src/Services/ProcessIsoCurve/Formats/ProcessIsoCurveResponseReader.js", - "type": "harmony import", - "userRequest": "../Response/model/ProcessIsoCurveResponse", - "loc": "13:0-80" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\n/**\n * Response object for {@link module:Services~isoCurve Gp.Services.isoCurve ()} invocation when successful. Received as the argument of onSuccess callback function.\n *\n * @property {Float} distance - distance (expressed in meters) used for the request.\n * @property {Float} time - time (expressed in seconds) used for the request.\n * @property {Object} geometry - Geometry (expressed in [GeoJSON]{@link http://geojson.org/}) of the isocurve.\n * @property {String} id - request id (used by underlying webservice).\n * @property {Gp.Point} location - Position of the start or end point used for the request (expressed in \"srs\" coordinates system).\n * @property {String} message - message\n * @property {String} srs - Identifier of the coordinates system used for the isocurve.\n *\n * @namespace\n * @alias Gp.Services.IsoCurveResponse\n *\n */\nfunction ProcessIsoCurveResponse () {\n if (!(this instanceof ProcessIsoCurveResponse)) {\n throw new TypeError(\"ProcessIsoCurveResponse constructor cannot be called as a function.\");\n }\n\n this.message = null;\n\n this.id = null;\n\n this.location = {};\n this.location.x = null;\n this.location.y = null;\n\n this.srs = null;\n\n this.geometry = null;\n\n this.time = null;\n\n this.distance = null;\n}\n\nProcessIsoCurveResponse.prototype = {\n\n constructor : ProcessIsoCurveResponse\n\n};\n\nexport default ProcessIsoCurveResponse;\n" - }, - { - "id": 19, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Protocols/XHR.js", - "name": "./src/Protocols/XHR.js", - "index": 11, - "index2": 10, - "size": 16159, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 55, - "building": 232, - "dependencies": 2 - }, - "failed": false, - "errors": 0, - "warnings": 1, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Protocols/XHR", - "loc": "28:0-34" - }, - { - "moduleId": 48, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Protocols/Protocol.js", - "module": "./src/Protocols/Protocol.js", - "moduleName": "./src/Protocols/Protocol.js", - "type": "harmony import", - "userRequest": "./XHR", - "loc": "9:0-24" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "/* global Promise, require */\n\nimport Logger from \"../Utils/LoggerByDefault\";\nimport Helper from \"../Utils/Helper\";\nimport ES6Promise from \"es6-promise\";\n// import __request from \"request\";\n// import __xmldom from \"xmldom\";\n\n/**\n * Requêtes Ajax (utilisation des Promises)\n * cf. https://xhr.spec.whatwg.org/\n * cf. https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest\n *\n * @module XHR\n * @private\n * @alias Gp.Protocols.XHR\n * @see dependance 'promise'\n */\n\nvar XHR = {\n\n /**\n * Interface unique d'envoi d'une requête.\n *\n * @method call\n * @static\n * @param {Object} settings - options generales\n * @param {String} settings.url - url du service\n * @param {String} settings.method - GET, POST, PUT, DELETE\n * @param {String} settings.format - format de la reponse du service : json, xml ou null (brute)\n * @param {String} settings.data - content (post) ou param (get)\n * @param {String} settings.proxy - proxy url\n * @param {Object|String} settings.headers - (post) ex. referer\n * @param {Object|String} settings.content - (post) ex. 'application/json'\n * @param {String} settings.timeOut - timeout = 0 par defaut\n * @param {String} settings.scope - this\n * @param {Function} settings.onResponse - callback\n * @param {Function} settings.onFailure - callback\n */\n call : function (settings) {\n // logger\n var logger = Logger.getLogger(\"XHR\");\n logger.trace(\"[XHR::call()]\");\n\n // FIXME\n // To polyfill the global environment\n ES6Promise.polyfill();\n\n // test sur les settings obligatoires\n if (!settings.url) {\n throw new Error(\"missing parameter : url is not defined !\");\n }\n\n if (!settings.method) {\n throw new Error(\"missing parameter : method is not defined !\");\n }\n\n if (!settings.format) {\n settings.format = \"text\"; // reponse brute !\n }\n\n var options = {};\n options.url = settings.url;\n options.data = settings.data ? settings.data : null;\n options.method = settings.method;\n options.timeOut = settings.timeOut || 0;\n options.scope = settings.scope || this;\n options.proxy = settings.proxy || null;\n options.content = settings.content || null;\n options.headers = settings.headers || {\n referer : \"http://localhost\"\n };\n\n // test sur les valeurs de 'settings.method'\n switch (settings.method) {\n case \"DELETE\":\n case \"GET\":\n break;\n case \"PUT\":\n case \"POST\":\n // on force sur ces params spécifiques au mode POST\n options.content = settings.content ? settings.content : \"application/x-www-form-urlencoded\"; // FIXME en attente des services : bascule en \"application/xml\" ou \"application/json\"\n options.headers = settings.headers ? settings.headers : {\n referer : \"http://localhost\" // todo ...\n };\n break;\n case \"HEAD\":\n case \"OPTIONS\":\n throw new Error(\"HTTP method not yet supported !\");\n default:\n throw new Error(\"HTTP method unknown !\");\n }\n\n // test sur les valeurs de 'settings.format'\n switch (settings.format) {\n case \"text\":\n this.__call(options)\n .then(function (response) {\n logger.trace(response);\n settings.onResponse.call(this, response);\n })\n .catch(function (error) {\n settings.onFailure.call(this, error);\n });\n break;\n case \"json\":\n this.__callJSON(options)\n .then(function (response) {\n logger.trace(response);\n settings.onResponse.call(this, response);\n })\n .catch(function (error) {\n settings.onFailure.call(this, error);\n });\n break;\n case \"xml\":\n this.__callXML(options)\n .then(function (response) {\n logger.trace(response);\n settings.onResponse.call(this, response);\n })\n .catch(function (error) {\n settings.onFailure.call(this, error);\n });\n break;\n default:\n throw new Error(\"This output Format is not yet supported !\");\n }\n },\n\n /**\n * Requete\n *\n * @method __call\n * @private\n * @param {Object} options - options\n * @return {Object} promise\n */\n __call : function (options) {\n var logger = Logger.getLogger(\"XHR\");\n logger.trace(\"[XHR::__call()]\");\n\n var promise = new Promise(\n function (resolve, reject) {\n // traitement du corps de la requête\n var corps = (options.method === \"POST\" || options.method === \"PUT\") ? 1 : 0;\n\n // seulement si options.data n'est pas vide (peut être un objet ou une chaine de caractères)\n if (options.data && ((typeof options.data === \"object\" && Object.keys(options.data).length) || (typeof options.data === \"string\" && options.data.length)) && !corps) {\n options.url = Helper.normalyzeUrl(options.url, options.data);\n }\n\n logger.trace(\"URL = \", options.url);\n\n var hXHR = null;\n\n // test on env. nodejs or browser\n if (typeof window === \"undefined\") {\n // Utilisation du module :\n // cf. http://blog.modulus.io/node.js-tutorial-how-to-use-request-module\n\n var req = require(\"request\");// __request\n\n // mapping data avec body param. pour le mode POST ou PUT (?)\n if (options.data && typeof options.data === \"string\" && corps) {\n options.body = options.data;\n }\n\n // FIXME ERROR : self signed certificate in certificate chain\n options.rejectUnauthorized = false;\n\n req(options, function (error, response, body) {\n if (!error && response.statusCode === 200 && body) {\n resolve(body);\n } else {\n reject(\"Errors Occured on Http Request (nodejs) : \" + error);\n }\n });\n } else {\n if (window.XMLHttpRequest) {\n logger.trace(\"XMLHttpRequest\");\n\n hXHR = new XMLHttpRequest();\n hXHR.open(options.method, options.url, true); // async\n hXHR.overrideMimeType = options.content;\n\n // gestion du timeout\n var onTimeOutTrigger = null;\n if (options.timeOut > 0) {\n // FIXME le timeout interne ne me permet pas de declencher le bon message...\n // hXHR.timeout = options.timeOut;\n logger.trace(\"XHR - TimeOut actif !\");\n /**\n * Description\n *\n * @method onTimeOutTrigger\n * @private\n */\n onTimeOutTrigger = window.setTimeout(\n function () {\n var message = \"TimeOut Occured on Http Request with XMLHttpRequest !\";\n reject({\n message : message,\n status : -1\n });\n }, options.timeOut);\n }\n\n if (corps) {\n // headers, data, content of data\n // cf. https://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#dom-xmlhttprequest-setrequestheader\n logger.trace(\"data = \", options.data);\n hXHR.setRequestHeader(\"Content-type\", options.content);\n // FIXME refused to set unsafe header content-length javascript\n // hXHR.setRequestHeader (\"Content-length\", options.data.length);\n // hXHR.setRequestHeader (\"Referer\", options.headers.referer);\n }\n\n /**\n * On Error\n * FIXME ne se declenche pas !?\n *\n * @param {Object} e - Event\n * @method onerror\n * @private\n */\n hXHR.onerror = function (e) {\n console.log(e);\n reject(new Error(\"Errors Occured on Http Request with XMLHttpRequest !\"));\n };\n\n /**\n * On Timeout\n * FIXME ne se declenche pas !?\n *\n * @param {Object} e - Event\n * @method ontimeout\n * @private\n */\n hXHR.ontimeout = function () {\n reject(new Error(\"TimeOut Occured on Http Request with XMLHttpRequest !\"));\n };\n\n /**\n * Description\n *\n * @method onreadystatechange\n * @private\n */\n hXHR.onreadystatechange = function () {\n if (hXHR.readyState === 4) { // DONE\n if (hXHR.status === 200) {\n window.clearTimeout(onTimeOutTrigger);\n resolve(hXHR.response);\n } else {\n var message = \"Errors Occured on Http Request (status : '\" + hXHR.status + \"' | response : '\" + hXHR.response + \"')\";\n var status = hXHR.status;\n reject({\n message : message,\n status : status\n });\n }\n }\n };\n\n // gestion du content data\n var data4xhr = (options.data && corps) ? options.data : null;\n\n hXHR.send(data4xhr);\n } else if (window.XDomainRequest) {\n // worked in Internet Explorer 8–10 only !\n logger.trace(\"XDomainRequest\");\n\n hXHR = new XDomainRequest();\n hXHR.open(options.method, options.url);\n\n hXHR.overrideMimeType = options.content;\n\n if (options.timeOut > 0) {\n hXHR.timeout = options.timeout;\n logger.trace(\"XHR - TimeOut actif !\");\n }\n\n if (corps) {\n // headers, data, content of data\n // cf. https://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#dom-xmlhttprequest-setrequestheader\n hXHR.setRequestHeader(\"Content-type\", options.content);\n // FIXME refused to set unsafe header content-length javascript\n // hXHR.setRequestHeader (\"Content-length\", options.data.length);\n // hXHR.setRequestHeader (\"Referer\", options.headers.referer);\n }\n\n /**\n * Description\n *\n * @method onerror\n * @private\n */\n hXHR.onerror = function () {\n reject(new Error(\"Errors Occured on Http Request with XMLHttpRequest !\"));\n };\n\n /**\n * Description\n *\n * @method ontimeout\n * @private\n */\n hXHR.ontimeout = function () {\n reject(new Error(\"TimeOut Occured on Http Request with XMLHttpRequest !\"));\n };\n\n /**\n * On Load\n *\n * @method onload\n * @private\n */\n hXHR.onload = function () {\n if (hXHR.status === 200) {\n resolve(hXHR.responseText);\n } else {\n var message = \"Errors Occured on Http Request (status : '\" + hXHR.status + \"' | response : '\" + hXHR.responseText + \"')\";\n var status = hXHR.status;\n reject({\n message : message,\n status : status\n });\n }\n };\n\n var data4xdr = (options.data && corps) ? options.data : null;\n\n hXHR.send(data4xdr);\n } else {\n throw new Error(\"CORS not supported\");\n }\n }\n }\n );\n\n return promise;\n },\n\n /**\n * Requete avec parser JSON\n *\n * @method __callJSON\n * @private\n * @param {Object} options - options\n * @return {Object} promise\n */\n __callJSON : function (options) {\n return this.__call(options)\n .then(JSON.parse)\n .catch(function (error) {\n console.log(\"_callJSON failed on : \", options.url, error);\n // FIXME pas d'exception, laissons le fil se derouler...\n // throw error;\n });\n },\n\n /**\n * Requete avec parser XML\n *\n * @method __callXML\n * @private\n * @param {Object} options - options\n * @return {Object} promise\n */\n __callXML : function (options) {\n return this.__call(options)\n .then(function (response) {\n var xmlDoc;\n\n // test on env. nodejs or browser\n if (typeof window === \"undefined\") {\n var DOMParser = require(\"xmldom\").DOMParser; // __xmldom.DOMParser\n xmlDoc = new DOMParser().parseFromString(response, \"text/xml\");\n } else {\n if (window.DOMParser) {\n var parser = new window.DOMParser();\n xmlDoc = parser.parseFromString(response, \"text/xml\");\n } else { // IE\n xmlDoc = new window.ActiveXObject(\"Microsoft.XMLDOM\");\n xmlDoc.async = false;\n xmlDoc.loadXML(response);\n }\n }\n\n return xmlDoc;\n })\n .catch(function (error) {\n console.log(\"__callXML failed on : \", options.url, error);\n // FIXME pas d'exception, laissons le fil se derouler...\n // throw error;\n });\n }\n\n};\n\nexport default XHR;\n" - }, - { - "id": 20, - "identifier": "external {\"commonjs2\":\"xmldom\",\"commonjs\":\"xmldom\",\"amd\":\"require\"}", - "name": "external {\"commonjs2\":\"xmldom\",\"commonjs\":\"xmldom\",\"amd\":\"require\"}", - "index": 16, - "index2": 9, - "size": 42, - "cacheable": false, - "built": false, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Protocols/XHR.js", - "issuerId": 19, - "issuerName": "./src/Protocols/XHR.js", - "profile": { - "factory": 1, - "building": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 6, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XML.js", - "module": "./src/Formats/XML.js", - "moduleName": "./src/Formats/XML.js", - "type": "cjs require", - "userRequest": "xmldom", - "loc": "189:24-41" - }, - { - "moduleId": 19, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Protocols/XHR.js", - "module": "./src/Protocols/XHR.js", - "moduleName": "./src/Protocols/XHR.js", - "type": "cjs require", - "userRequest": "xmldom", - "loc": "378:36-53" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [], - "depth": 3 - }, - { - "id": 21, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/model/AltiElevationRequest.js", - "name": "./src/Services/Alti/Request/model/AltiElevationRequest.js", - "index": 21, - "index2": 16, - "size": 2236, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestREST.js", - "issuerId": 55, - "issuerName": "./src/Services/Alti/Request/AltiRequestREST.js", - "profile": { - "factory": 801, - "building": 229, - "dependencies": 42 - }, - "failed": false, - "errors": 0, - "warnings": 1, - "reasons": [ - { - "moduleId": 55, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestREST.js", - "module": "./src/Services/Alti/Request/AltiRequestREST.js", - "moduleName": "./src/Services/Alti/Request/AltiRequestREST.js", - "type": "harmony import", - "userRequest": "./model/AltiElevationRequest", - "loc": "5:0-64" - }, - { - "moduleId": 56, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestWPS.js", - "module": "./src/Services/Alti/Request/AltiRequestWPS.js", - "moduleName": "./src/Services/Alti/Request/AltiRequestWPS.js", - "type": "harmony import", - "userRequest": "./model/AltiElevationRequest", - "loc": "12:0-64" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 6, - "source": "\nimport Logger from \"../../../../Utils/LoggerByDefault\";\nimport AltiRequest from \"./AltiRequest\";\n\n/**\n * @classdesc\n *\n * Classe de gestion des param. des requêtes de type POINT du service altimetrique.\n *\n * @constructor\n * @alias Gp.Services.Alti.Request.AltiElevationRequest\n * @param {Object} options - options\n * @param {Boolean} options.zonly - false|true\n *\n * @private\n */\nfunction AltiElevationRequest (options) {\n if (!(this instanceof AltiElevationRequest)) {\n throw new TypeError(\"AltiElevationRequest constructor cannot be called as a function.\");\n }\n\n /**\n * Nom de la classe (heritage)\n */\n this.CLASSNAME = \"AltiElevationRequest\";\n\n // appel du constructeur par heritage\n AltiRequest.apply(this, arguments);\n\n this.logger = Logger.getLogger();\n this.logger.trace(\"[Constructeur AltiElevationRequest ()]\");\n\n /**\n * Z uniquement.\n * true|false\n */\n this.zonly = this.options.zonly || false; // test des options héritées !\n}\n\n/**\n * @lends module:AltiElevationRequest#\n */\n\nAltiElevationRequest.prototype = Object.create(AltiRequest.prototype, {\n\n /**\n * Setter/getter pour \"zonly\"\n */\n zonly : {\n /** getter */\n get : function () {\n return this._zonly;\n },\n /** setter */\n set : function (z) {\n this._zonly = z;\n }\n }\n\n});\n\n/**\n * Constructeur (alias)\n */\nAltiElevationRequest.prototype.constructor = AltiElevationRequest;\n\n/**\n * Tableau de clefs/valeurs pour param.\n *\n * @returns {Array}\n */\nAltiElevationRequest.prototype.getData = function () {\n // par glop..., appel de AltiRequest::getData () !\n var map = [];\n map.push({\n k : \"lon\",\n v : this.getLon()\n });\n map.push({\n k : \"lat\",\n v : this.getLat()\n });\n // map.push({k : \"delimiter\", v : this.delimiter}); // FIXME on retire le param \"delimiter\"\n map.push({\n k : \"indent\",\n v : this.indent\n });\n map.push({\n k : \"crs\",\n v : this.crs\n });\n map.push({\n k : \"zonly\",\n v : this.zonly\n });\n map.push({\n k : \"format\",\n v : this.format\n });\n\n return map;\n};\n\nexport default AltiElevationRequest;\n" - }, - { - "id": 22, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/model/AltiRequest.js", - "name": "./src/Services/Alti/Request/model/AltiRequest.js", - "index": 22, - "index2": 15, - "size": 4903, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/model/AltiProfilRequest.js", - "issuerId": 23, - "issuerName": "./src/Services/Alti/Request/model/AltiProfilRequest.js", - "profile": { - "factory": 55, - "building": 96, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 1, - "reasons": [ - { - "moduleId": 21, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/model/AltiElevationRequest.js", - "module": "./src/Services/Alti/Request/model/AltiElevationRequest.js", - "moduleName": "./src/Services/Alti/Request/model/AltiElevationRequest.js", - "type": "harmony import", - "userRequest": "./AltiRequest", - "loc": "3:0-40" - }, - { - "moduleId": 23, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/model/AltiProfilRequest.js", - "module": "./src/Services/Alti/Request/model/AltiProfilRequest.js", - "moduleName": "./src/Services/Alti/Request/model/AltiProfilRequest.js", - "type": "harmony import", - "userRequest": "./AltiRequest", - "loc": "3:0-40" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 7, - "source": "\nimport Logger from \"../../../../Utils/LoggerByDefault\";\n\n/**\n * @classdesc\n * Classe de gestion des param. des requêtes du service altimetrique.\n *\n * @constructor\n * @alias Gp.Services.Alti.Request.AltiRequest\n * @param {Object} options - options\n * @param {Object} options.positions - tableau de coordonnées lon/lat\n * @param {String} options.delimiter - \"|\"\n * @param {Boolean} options.indent - false|true\n * @param {String} options.crs - \"CRS:84\"\n * @param {String} options.format - \"JSON|XML\"\n *\n * @private\n */\nfunction AltiRequest (options) {\n if (!(this instanceof AltiRequest)) {\n throw new TypeError(\"AltiRequest constructor cannot be called as a function.\");\n }\n\n this.logger = Logger.getLogger();\n this.logger.trace(\"[Constructeur AltiRequest ()]\");\n\n /**\n * Options en paramêtres du constructeur.\n */\n this.options = options || {};\n\n /**\n * Liste des coordonnées.\n * @example\n * var c = [{lon : \"\", lat : \"\"}, {lon : \"\", lat : \"\"}];\n */\n this.positions = this.options.positions || [];\n\n /**\n * Caractère de séparation.\n * Par defaut, \"|\".\n */\n this.delimiter = this.options.delimiter || \"|\";\n\n /**\n * Indentation.\n * true|false\n */\n this.indent = this.options.indent || false;\n\n /**\n * Projection.\n * Par defaut, CRS:84.\n */\n this.crs = this.options.crs || \"CRS:84\";\n\n /**\n * format de sortie.\n * Par defaut, \"json\".\n */\n this.format = this.options.format || \"json\";\n}\n\n/**\n * CLASSNAME\n */\nAltiRequest.CLASSNAME = \"AltiRequest\";\n\nAltiRequest.prototype = {\n\n /**\n * @lends module:AltiRequest#\n */\n\n /**\n * Constructeur (alias)\n */\n constructor : AltiRequest,\n\n /**\n * Ajout d\"une liste de coordonnées.\n *\n * @param {Object[]} lstPosition - liste de positions\n * @example\n * obj.setPositions ([{lon : \"0.15\", lat : \"0.15\"}, {lon : \"1.15\", lat : \"1.15\"}]);\n */\n setPositions : function (lstPosition) {\n var positions = [];\n for (var i = 0; i < lstPosition.length; i++) {\n var o = lstPosition[i];\n if (o.lon && o.lat) {\n positions.push(o);\n }\n }\n\n this.positions = positions;\n },\n\n /**\n * Liste des coordonnées.\n *\n * @param {Int} pos - position\n * @returns {positions}\n * @example\n * obj.getPositions (); // [{lon : \"\", lat : \"\"}, {lon : \"\", lat : \"\"}]\n * obj.getPositions (0); // [{lon : \"\", lat : \"\"}]\n */\n getPositions : function (pos) {\n // FIXME test if not a number !?\n if (!pos) {\n return this.positions;\n }\n\n var index = this.positions.length - 1;\n if (pos > index || pos < index) {\n this.logger.warn(\"index out of range !\");\n return this.positions;\n }\n\n return this.positions[pos];\n },\n\n /**\n * Ajout d\"une liste de coordonnées.\n *\n * @param {Object[]} lstPosition - liste de positions\n * @example\n * obj.addPositions ([{lon : \"0.15\", lat : \"0.15\"}, {lon : \"1.15\", lat : \"1.15\"}]);\n */\n addPositions : function (lstPosition) {\n for (var i = 0; i < lstPosition.length; i++) {\n var o = lstPosition[i];\n if (o.lon && o.lat) {\n this.positions.push(lstPosition[i]);\n }\n }\n },\n\n /**\n * Retourne la liste des longitudes avec un caractère de séparation.\n *\n * @returns {String} - une liste de longitudes\n * @example\n * // out : 0.2367|2.1570|43.789|...\n */\n getLon : function () {\n var lstLon = [];\n for (var i = 0; i < this.positions.length; i++) {\n lstLon.push(this.positions[i].lon);\n }\n this.logger.trace(lstLon);\n return lstLon.join(this.delimiter);\n },\n\n /**\n * Retourne la liste des lattitudes avec un caractère de séparation.\n *\n * @returns {String} - une liste de lattitudes\n * @example\n * // out : 0.2367|2.1570|43.789|...\n */\n getLat : function () {\n var lstLat = [];\n for (var i = 0; i < this.positions.length; i++) {\n lstLat.push(this.positions[i].lat);\n }\n this.logger.trace(lstLat);\n return lstLat.join(this.delimiter);\n }\n\n};\n\n/**\n * Tableau de clefs/valeurs pour param.\n *\n * @returns {Object[]}\n */\nAltiRequest.prototype.getData = function () {\n var map = [];\n\n map.push({\n k : \"lon\",\n v : this.getLon()\n });\n map.push({\n k : \"lat\",\n v : this.getLat()\n });\n map.push({\n k : \"delimiter\",\n v : this.delimiter\n });\n map.push({\n k : \"indent\",\n v : this.indent\n });\n map.push({\n k : \"crs\",\n v : this.crs\n });\n map.push({\n k : \"format\",\n v : this.format\n });\n\n return map;\n};\n\nexport default AltiRequest;\n" - }, - { - "id": 23, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/model/AltiProfilRequest.js", - "name": "./src/Services/Alti/Request/model/AltiProfilRequest.js", - "index": 23, - "index2": 17, - "size": 2222, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestREST.js", - "issuerId": 55, - "issuerName": "./src/Services/Alti/Request/AltiRequestREST.js", - "profile": { - "factory": 801, - "building": 216, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 1, - "reasons": [ - { - "moduleId": 55, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestREST.js", - "module": "./src/Services/Alti/Request/AltiRequestREST.js", - "moduleName": "./src/Services/Alti/Request/AltiRequestREST.js", - "type": "harmony import", - "userRequest": "./model/AltiProfilRequest", - "loc": "6:0-58" - }, - { - "moduleId": 56, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestWPS.js", - "module": "./src/Services/Alti/Request/AltiRequestWPS.js", - "moduleName": "./src/Services/Alti/Request/AltiRequestWPS.js", - "type": "harmony import", - "userRequest": "./model/AltiProfilRequest", - "loc": "13:0-58" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 6, - "source": "\nimport Logger from \"../../../../Utils/LoggerByDefault\";\nimport AltiRequest from \"./AltiRequest\";\n\n/**\n * @classdesc\n * Classe de gestion des param. des requêtes de type PROFIL du service altimetrique.\n *\n * @constructor\n * @alias Gp.Services.Alti.Request.AltiProfilRequest\n * @param {Object} options - options\n * @param {String} options.sampling - 3\n *\n * @private\n */\nfunction AltiProfilRequest (options) {\n if (!(this instanceof AltiProfilRequest)) {\n throw new TypeError(\"AltiProfilRequest constructor cannot be called as a function.\");\n }\n\n /**\n * Nom de la classe (heritage)\n */\n this.CLASSNAME = \"AltiProfilRequest\";\n\n // appel du constructeur par heritage\n AltiRequest.apply(this, arguments);\n\n this.logger = Logger.getLogger();\n this.logger.trace(\"[Constructeur AltiProfilRequest ()]\");\n\n /**\n * Sampling\n * Par defaut, 3\n */\n this.sampling = this.options.sampling || 3; // test des options héritées !\n}\n\n/**\n * @lends module:AltiProfilRequest#\n */\n\nAltiProfilRequest.prototype = Object.create(AltiRequest.prototype, {\n\n /**\n * Setter/getter pour \"sampling\"\n */\n sampling : {\n /** getter */\n get : function () {\n return this._sampling;\n },\n /** setter */\n set : function (value) {\n this._sampling = value;\n }\n }\n});\n\n/**\n * Constructeur (alias)\n */\nAltiProfilRequest.prototype.constructor = AltiProfilRequest;\n\n/**\n * Tableau de clefs/valeurs pour param.\n *\n * @returns {Object[]}\n */\nAltiProfilRequest.prototype.getData = function () {\n // par glop..., appel de AltiRequest::getData () !\n var map = [];\n map.push({\n k : \"lon\",\n v : this.getLon()\n });\n map.push({\n k : \"lat\",\n v : this.getLat()\n });\n // map.push({k : \"delimiter\", v : this.delimiter}); // FIXME on retire le param \"delimiter\"\n map.push({\n k : \"indent\",\n v : this.indent\n });\n map.push({\n k : \"crs\",\n v : this.crs\n });\n map.push({\n k : \"sampling\",\n v : this.sampling\n });\n map.push({\n k : \"format\",\n v : this.format\n });\n\n return map;\n};\n\nexport default AltiProfilRequest;\n" - }, - { - "id": 24, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Response/model/AutoConfResponse.js", - "name": "./src/Services/AutoConf/Response/model/AutoConfResponse.js", - "index": 34, - "index2": 28, - "size": 6706, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 57, - "building": 343 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/AutoConf/Response/model/AutoConfResponse", - "loc": "7:0-84" - }, - { - "moduleId": 62, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "module": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "moduleName": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "type": "harmony import", - "userRequest": "../Response/model/AutoConfResponse", - "loc": "12:0-66" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\n/**\n * Response object for {@link module:Services~getConfig Gp.Services.getConfig ()} invocation when successful. Received as the argument of onSuccess callback function.\n *\n * @property {Object} generalOptions - General properties for default map configuration resources.\n * @property {Object} generalOptions.apiKeys - Object that associates apiKey (s) with an array of resources IDs availables with that key.\n * @property {String} generalOptions.title - Underlying web service Title.\n * @property {String} generalOptions.defaultGMLGFIStyle - XSL URL used by default to translate an XML GetFeatureInfo response into an HTML array.\n * @property {String} generalOptions.theme - default theme (FIXME : for what ?)\n * @property {Array.} generalOptions.wgs84Resolutions - geographical resolutions Array for each [zoom level of the Geoportal platform]{@link http://api.ign.fr/tech-docs-js/webmaster/layers.html#Geoportal_resolutions} from 0 to 21. Expressed in degrees/pixel.\n * @property {Object} layers - Associative array mapping resources availables IDs (keys) with their properties (values given as {@link Gp.Services.Config.Layer}).\n * @property {Object} territories - Associative array mapping french territories IDs (keys) with their properties (values given as {@link Gp.Services.Config.Territory}).\n * @property {Object} tileMatrixSets - Associative Array mapping TileMatrixSets IDs (keys) availables with their properties (values given as {@link Gp.Services.Config.TileMatrixSet}).\n * @property {Object} services - Associative Array mapping Geoportal web services IDs (keys) availables with their properties (values given as {@link Gp.Services.Config.Service}).\n *\n * @namespace\n * @alias Gp.Services.GetConfigResponse\n */\nfunction AutoConfResponse () {\n if (!(this instanceof AutoConfResponse)) {\n throw new TypeError(\"AutoConfResponse constructor cannot be called as a function.\");\n }\n\n this.generalOptions = {\n apiKeys : {},\n title : null,\n defaultGMLGFIStyle : null,\n theme : null,\n wgs84Resolutions : []\n };\n\n this.layers = {};\n\n this.territories = {};\n\n this.tileMatrixSets = {};\n\n this.services = {};\n}\n\nAutoConfResponse.prototype = {\n\n /*\n * Constructor (alias)\n */\n constructor : AutoConfResponse,\n\n /**\n * Check if config is loaded for a given key\n *\n * @param {String} apiKey - Access key to Geoportal platform\n * @returns {Boolean} isConfLoaded - true if config is already loaded, false otherwise\n */\n isConfLoaded : function (apiKey) {\n if (!apiKey) {\n return;\n }\n if (this.generalOptions.apiKeys[apiKey]) {\n return true;\n }\n return false;\n },\n\n /**\n * Returns an array of Geoportal layers identifiers, corresponding to an API contract key.\n *\n * @param {String} apiKey - Access key to Geoportal platform\n * @returns {Array} apiKeys - Array of geoportal layers identifiers\n */\n getLayersId : function (apiKey) {\n return this.generalOptions.apiKeys[apiKey];\n },\n\n /**\n * Returns an associative array of Geoportal layers configurations, corresponding to an API contract key.\n * If no key is specified, all layers from configuration are returned.\n *\n * @param {String} apiKey - Access key to Geoportal platform\n * @returns {Object} layers - Object which properties are layers identifiers, and corresponding\n * values are instances of .\n */\n getLayersConf : function (apiKey) {\n var layers = {};\n var layersIdArray = this.getLayersId(apiKey);\n if (layersIdArray) {\n for (var i = 0; i < layersIdArray.length; i++) {\n var lyrId = layersIdArray[i];\n layers[lyrId] = this.layers[lyrId];\n }\n }\n return layers;\n },\n\n /**\n * Returns a geoportal layer configuration, given its identifier\n *\n * @param {String} layerId - Geoportal layer identifier (e.g. \"GEOGRAPHICALGRIDSYSTEMS.MAPS$GEOPORTAIL:OGC:WMTS\")\n * @return {Object} layer - Layer configuration : instance of {@link Gp.Services.Config.Layer}\n */\n getLayerConf : function (layerId) {\n if (!this.layers) {\n return;\n }\n return this.layers[layerId];\n },\n\n /**\n * Returns an associative array of Tile Matrix Sets configurations.\n *\n * @return {Object} tileMatrixSets - Object which properties are TMS identifiers,\n * and corresponding values are instances of {@link Gp.Services.Config.TileMatrixSet}.\n */\n getTileMatrixSets : function () {\n return this.tileMatrixSets;\n },\n\n /**\n * Returns a Tile Matrix Sets configuration, given its identifier.\n *\n * @param {String} tmsID - Tile Matrix Set identifier (e.g. : \"PM\")\n * @return {Object} tileMatrixSet - Tile Matrix Set configuration, instance of {@link Gp.Services.Config.TileMatrixSet}\n */\n getTMSConf : function (tmsID) {\n if (!this.tileMatrixSets) {\n return;\n }\n return this.tileMatrixSets[tmsID];\n },\n\n /**\n * Returns an associative array of territories configurations.\n *\n * @return {Object} territories - Object which properties are territory identifiers,\n * and corresponding values are instances of {@link Gp.Services.Config.Territory}.\n */\n getTerritories : function () {\n return this.territories;\n },\n\n /**\n * Returns a territory configuration, given its identifier.\n *\n * @param {String} territoryID - territory identifier (e.g. \"FXX\")\n * @return {Object} territory - Territory configuration, instance of {@link Gp.Services.Config.Territory}\n */\n getTerritoryConf : function (territoryID) {\n if (!this.territories) {\n return;\n }\n return this.territories[territoryID];\n },\n\n /**\n * Returns an associative array of services configurations.\n *\n * @return {Object} services - Object which properties are services identifiers,\n * and corresponding values are instances of {@link Gp.Services.Config.Service}.\n */\n getServices : function () {\n return this.services;\n },\n\n /**\n * Returns a service configuration, given its identifier.\n *\n * @param {String} serviceID - service identifier (e.g. \"OGC:WMTS\")\n * @return {Object} service - service configuration, instance of {@link Gp.Services.Config.Service}\n */\n getServiceConf : function (serviceID) {\n if (!this.services) {\n return;\n }\n return this.services[serviceID];\n }\n\n};\n\nexport default AutoConfResponse;\n" - }, - { - "id": 25, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Response/model/Constraint.js", - "name": "./src/Services/AutoConf/Response/model/Constraint.js", - "index": 35, - "index2": 29, - "size": 1192, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 57, - "building": 310 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/AutoConf/Response/model/Constraint", - "loc": "8:0-71" - }, - { - "moduleId": 62, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "module": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "moduleName": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "type": "harmony import", - "userRequest": "../Response/model/Constraint", - "loc": "13:0-54" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\n/**\n *\n * Object used to express a geographical (BBOX, scale) and temporal constraint.\n *\n * @property {String} crs - Coordinates System ID used to express coordinates contraints.\n * @property {Gp.BBox} bbox - Constraint Bounding Box.\n * @property {Number} minScaleDenominator - Minimum scale denominator where constraint applies.\n * @property {Number} maxScaleDenominator - Maximum scale denominator where constraint applies.\n * @property {Array.} temporalExtent - Array expressing the time interval of the constraint [minT, maxT]. Dates are expressed in the [ISO-8601]{@link https://en.wikipedia.org/wiki/ISO_8601} way.\n *\n * @namespace\n * @alias Gp.Services.Config.Constraint\n */\n\nfunction Constraint () {\n if (!(this instanceof Constraint)) {\n throw new TypeError(\"Constraint constructor cannot be called as a function.\");\n }\n\n this.crs = null;\n\n this.bbox = {\n left : null,\n right : null,\n top : null,\n bottom : null\n };\n\n this.minScaleDenominator = null;\n\n this.maxScaleDenominator = null;\n\n this.temporalExtent = [null, null];\n}\n\nConstraint.prototype = {\n\n constructor : Constraint\n\n};\n\nexport default Constraint;\n" - }, - { - "id": 26, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Response/model/Format.js", - "name": "./src/Services/AutoConf/Response/model/Format.js", - "index": 36, - "index2": 30, - "size": 535, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 57, - "building": 353 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/AutoConf/Response/model/Format", - "loc": "9:0-63" - }, - { - "moduleId": 62, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "module": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "moduleName": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "type": "harmony import", - "userRequest": "../Response/model/Format", - "loc": "14:0-46" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\n/**\n * Object used to describe a format to use with Geoportal resources.\n *\n * @property {Boolean} current - If true, then this format is used by default.\n * @property {String} name - Format mime-type.\n *\n * @namespace\n * @alias Gp.Services.Config.Format\n */\n\nfunction Format () {\n if (!(this instanceof Format)) {\n throw new TypeError(\"Format constructor cannot be called as a function.\");\n }\n\n this.current = null;\n\n this.name = null;\n}\n\nFormat.prototype = {\n\n constructor : Format\n\n};\n\nexport default Format;\n" - }, - { - "id": 27, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Response/model/Layer.js", - "name": "./src/Services/AutoConf/Response/model/Layer.js", - "index": 37, - "index2": 31, - "size": 11392, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 57, - "building": 423 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/AutoConf/Response/model/Layer", - "loc": "10:0-61" - }, - { - "moduleId": 62, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "module": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "moduleName": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "type": "harmony import", - "userRequest": "../Response/model/Layer", - "loc": "15:0-44" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\n/**\n * Object used to describe geoportal resource (WMTS, WMS, WFS layers, geocoding resources or elevation service) parameters. Properties may be used or not depending on the resource type.\n *\n * @property {String} name - name of the resource to use with the webservice that serves it (eg : \"GEOGRAPHICALGRIDSYSTEMS.MAPS\").\n * @property {String} title - Human readable name for the resource.\n * @property {String} description - Resource description.\n * @property {String} layerId - Unique resource Identifier (eg : \"GEOGRAPHICALGRIDSYSTEMS.MAPS$GEOPORTAIL:OGC:WMTS\")\n * @property {String} quicklookUrl - Image URL for the resource.\n * @property {Object} serviceParams - Informations about the webservice that serves the resource (OpenLS, WFS, WMTS)\n * @property {String} serviceParams.id - Web Service identifier (\"OGC:WMTS\", \"OGC:OPENLS;ReverseGeocode\", etc...)\n * @property {Object} serviceParams.serverUrl - Associative array mapping geoportal access key (keys) with their properties (URLs of the web service, with the geoportal access key).\n * @property {String} serviceParams.version - webservice version.\n * @property {String} defaultProjection - coordinates system ID used by default for the resource (WMS or WFS layer) or of the TileMatrixSet used by the WMTS layer.\n * @property {Array.} additionalProjections - additional coordinates systems IDs availables for the resource, others than the default one (see defaultProjection) (WMS and WFS layers only).\n * @property {Array.} formats - Formats availables for the resource.\n * @property {Array.} legends - Informations about legends associated to the resource.\n * @property {Array.} metadata - Informations about metadata associated to the resource.\n * @property {Array.} styles - Informations about styles availables for the resources (WMS, WFS and WMTS only).\n * @property {Array.} thematics - Informations about thematics associated to the resource.\n * @property {Gp.Services.Config.Constraint} globalConstraint - geographical constraint for the resource.\n * @property {Array.} constraints - additionnal geographical constraints for the resource.\n * @property {Array.} originators - Informations about originator of the resource.\n * @property {Object} wmtsOptions - Informations associated to WMTS resources.\n * @property {String} wmtsOptions.tileMatrixSetLink - TileMatrixSet identifier used by the resource (see {@link Gp.Services.Config.TileMatrixSet})\n * @property {Gp.Services.Config.TileMatrixLimit} wmtsOptions.tileMatrixSetLimits - limits of the resource for that TileMAtrixSet.\n * @property {Boolean} queryable - true if a getFeatureInfo request may be done for the resource (WMS or WMTS only).\n * @property {Boolean} hidden - true if the resource is not visible.\n * @property {Boolean} isAggregate - true if the resource is an aggregate of other resources (@see aggregatedLayers).\n * @property {Array.} aggregatedLayers - Layers IDs composing the being described aggregated layer.\n * @property {Array.} apiKeys - Array of access keys that grant access to that resource.\n * @property {Object} dimensions - Dimensions informations associated with the resource.\n * @property {String} dimensions.type\n * @property {String} dimensions.visibilityRange\n * @property {String} dimensions.visibilityMode\n * @property {String} dimensions.noDataValue\n * @property {String} dimensions.geometricType\n *\n * @namespace\n * @alias Gp.Services.Config.Layer\n */\nfunction Layer () {\n if (!(this instanceof Layer)) {\n throw new TypeError(\"Layer constructor cannot be called as a function.\");\n }\n\n // info : une instance de la classe Layer n'a aucune propriété au départ,.\n // les attributs possibles sont documentés ci-dessus,\n // et seront implémentés au fur et à mesure de la lecture de la réponse de l'autoconf, lorsque l'information est rencontrée.\n}\n\nLayer.prototype = {\n\n constructor : Layer,\n\n /**\n * Returns the layer name\n *\n * @returns {String} name - name of the resource to use with the webservice that serves it (eg : \"GEOGRAPHICALGRIDSYSTEMS.MAPS\").\n */\n getName : function () {\n return this.name;\n },\n\n /**\n * Returns the layer title\n *\n * @returns {String} title - Human readable name for the resource.\n */\n getTitle : function () {\n return this.title;\n },\n\n /**\n * Returns the layer description\n *\n * @returns {String} description - Resource description.\n */\n getDescription : function () {\n return this.description;\n },\n\n /**\n * Returns the layer identifier\n *\n * @returns {String} layerId - Unique resource Identifier (eg : \"GEOGRAPHICALGRIDSYSTEMS.MAPS$GEOPORTAIL:OGC:WMTS\")\n */\n getLayerId : function () {\n return this.layerId;\n },\n\n /**\n * Returns the layer quicklookUrl\n *\n * @returns {String} quicklookUrl - Image URL for the resource.\n */\n getQuicklookUrl : function () {\n return this.quicklookUrl;\n },\n\n /**\n * Returns the layer default projection\n *\n * @returns {String} defaultProjection - coordinates system ID used by default for the resource (WMS or WFS layer) or of the TileMatrixSet used by the WMTS layer.\n */\n getDefaultProjection : function () {\n return this.defaultProjection;\n },\n\n /**\n * Returns the layer projections\n *\n * @returns {Array.} projections - coordinates systems IDs availables for the resource, including the default one.\n */\n getProjections : function () {\n var projections = [];\n projections.push(this.defaultProjection);\n var proj = projections.concat(this.additionalProjections);\n return proj;\n },\n\n /**\n * Returns the global BBOX\n *\n * @returns {Gp.BBox} bbox - the layer global bounding box, expressed in CRS system.\n */\n getBBOX : function () {\n if (!this.globalConstraint) {\n return;\n }\n return this.globalConstraint.bbox;\n },\n\n /**\n * Returns the layer minimum scale denominator\n *\n * @returns {Number} minScaleDenominator - minimum scale denominator for this layer\n */\n getMinScaleDenominator : function () {\n if (!this.globalConstraint) {\n return;\n }\n return this.globalConstraint.minScaleDenominator;\n },\n\n /**\n * Returns the layer maximum scale denominator\n *\n * @returns {Number} maxScaleDenominator - maximum scale denominator for this layer\n */\n getMaxScaleDenominator : function () {\n if (!this.globalConstraint) {\n return;\n }\n return this.globalConstraint.maxScaleDenominator;\n },\n\n /**\n * Returns layer Tile Matrix Set identifier if exists\n *\n * @returns {String} tileMatrixSetLink - Tile Matrix Set identifier (for instance : \"PM\")\n */\n getTMSID : function () {\n if (this.wmtsOptions) {\n return this.wmtsOptions.tileMatrixSetLink;\n }\n },\n\n /**\n * Returns information about the webservice that serves the resource\n *\n * @returns {Object} serviceParams - Information about the webservice that serves the resource (OpenLS, WFS, WMTS)\n */\n getServiceParams : function () {\n return this.serviceParams;\n },\n\n /**\n * Returns Geoportal server url for a given key\n *\n * @param {String} apiKey - Access key to Geoportal platform\n * @returns {String} serverUrl - general URL of the web service (with the geoportal access key)\n */\n getServerUrl : function (apiKey) {\n if (!apiKey || !this.serviceParams || !this.serviceParams.serverUrl) {\n return;\n }\n return this.serviceParams.serverUrl[apiKey];\n },\n\n /**\n * Returns information about legends associated to the resource.\n *\n * @returns {Array.} legends - Informations about legends associated to the resource.\n */\n getLegends : function () {\n return this.legends;\n },\n\n /**\n * Returns information about metadata associated to the resource.\n *\n * @returns {Array.} metadata - Informations about metadata associated to the resource.\n */\n getMetadata : function () {\n return this.metadata;\n },\n\n /**\n * Returns information about styles availables for the resources (WMS, WFS and WMTS only).\n *\n * @returns {Array.} styles - Informations about styles availables for the resources (WMS, WFS and WMTS only).\n */\n getStyles : function () {\n return this.styles;\n },\n\n /**\n * Returns layer default style\n *\n * @returns {String} styleName - style identifier (eg : \"normal\", \"bdparcellaire\", ...)\n */\n getDefaultStyle : function () {\n if (!this.styles) {\n return;\n }\n var style;\n var s = this.styles;\n for (var i = 0; i < s.length; i++) {\n if (s[i].current === true) {\n style = s[i].name;\n break;\n }\n }\n return style;\n },\n\n /**\n * Returns information about thematics associated to the resource.\n *\n * @returns {Array.} thematics - Informations about thematics associated to the resource.\n */\n getThematics : function () {\n return this.thematics;\n },\n\n /**\n * Returns layer default format\n *\n * @returns {String} formatName - Format mime-type. (eg. \"image/jpeg\")\n */\n getDefaultFormat : function () {\n if (!this.formats) {\n return;\n }\n var format;\n var f = this.formats;\n for (var i = 0; i < f.length; i++) {\n if (f[i].current === true) {\n format = f[i].name;\n break;\n }\n }\n return format;\n },\n\n /**\n * Returns information about geographical or temporal constraints for the resource\n *\n * @returns {Array.} constraints - Informations about geographical or temporal constraints for the resource\n */\n getConstraints : function () {\n return this.constraints;\n },\n\n /**\n * Returns information about originators of this resource\n *\n * @returns {Array.} originators - Informations about originators of this resource\n */\n getOriginators : function () {\n return this.originators;\n },\n\n /**\n * Returns information about dimensions associated with this resource\n *\n * @returns {Object} dimensions - Dimensions informations associated with the resource.\n */\n getDimensions : function () {\n return this.dimensions;\n },\n\n /**\n * Returns information about aggregated layers composing the being described layer, in case the resource is an aggregate of other resources.\n *\n * @returns {Object} aggregatedLayers - Layers IDs composing the being described aggregated layer.\n */\n getAggregatedLayers : function () {\n if (this.isAggregate) {\n return this.aggregatedLayers;\n } else {\n\n }\n }\n\n};\n\nexport default Layer;\n" - }, - { - "id": 28, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Response/model/Legend.js", - "name": "./src/Services/AutoConf/Response/model/Legend.js", - "index": 38, - "index2": 32, - "size": 681, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 58, - "building": 437 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/AutoConf/Response/model/Legend", - "loc": "11:0-63" - }, - { - "moduleId": 62, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "module": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "moduleName": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "type": "harmony import", - "userRequest": "../Response/model/Legend", - "loc": "16:0-46" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\n/**\n * Object used to describe a legend file associated with a geoportal resource (WMTS, WMS, WFS layers).\n *\n * @property {String} format - mime-type of the legend file.\n * @property {String} url - legend file URL\n * @property {Number} minScaleDenominator - minimum scale denominator where this legend applies.\n *\n * @namespace\n * @alias Gp.Services.Config.Legend\n */\n\nfunction Legend () {\n if (!(this instanceof Legend)) {\n throw new TypeError(\"Legend constructor cannot be called as a function.\");\n }\n\n this.format = null;\n\n this.url = null;\n\n this.minScaleDenominator = null;\n}\n\nLegend.prototype = {\n\n constructor : Legend\n\n};\n\nexport default Legend;\n" - }, - { - "id": 29, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Response/model/Metadata.js", - "name": "./src/Services/AutoConf/Response/model/Metadata.js", - "index": 39, - "index2": 33, - "size": 542, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 57, - "building": 432 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/AutoConf/Response/model/Metadata", - "loc": "12:0-67" - }, - { - "moduleId": 62, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "module": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "moduleName": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "type": "harmony import", - "userRequest": "../Response/model/Metadata", - "loc": "17:0-50" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\n/**\n * Object used to describe a metadata file associated with a geoportal resource.\n *\n * @property {String} format - mime-type of the metadata file.\n * @property {String} url - metadata file URL\n *\n * @namespace\n * @alias Gp.Services.Config.Metadata\n */\n\nfunction Metadata () {\n if (!(this instanceof Metadata)) {\n throw new TypeError(\"Metadata constructor cannot be called as a function.\");\n }\n\n this.format = null;\n\n this.url = null;\n}\n\nMetadata.prototype = {\n\n constructor : Metadata\n\n};\n\nexport default Metadata;\n" - }, - { - "id": 30, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Response/model/Originator.js", - "name": "./src/Services/AutoConf/Response/model/Originator.js", - "index": 40, - "index2": 34, - "size": 841, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 58, - "building": 446 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/AutoConf/Response/model/Originator", - "loc": "13:0-71" - }, - { - "moduleId": 62, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "module": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "moduleName": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "type": "harmony import", - "userRequest": "../Response/model/Originator", - "loc": "18:0-54" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\n/**\n * Object used to describe an Originator of geoportal resource.\n *\n * @property {String} name - originator name\n * @property {String} attribution - originator full name\n * @property {String} logo - originator logo file URL\n * @property {String} url - originator web site URL\n * @property {Array.} constraints - where and when the originator applies for the ressource.\n *\n * @namespace\n * @alias Gp.Services.Config.Originator\n */\n\nfunction Originator () {\n if (!(this instanceof Originator)) {\n throw new TypeError(\"Originator constructor cannot be called as a function.\");\n }\n\n this.name = null;\n\n this.attribution = null;\n\n this.logo = null;\n\n this.url = null;\n\n this.constraints = [];\n}\n\nOriginator.prototype = {\n\n constructor : Originator\n\n};\n\nexport default Originator;\n" - }, - { - "id": 31, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Response/model/Service.js", - "name": "./src/Services/AutoConf/Response/model/Service.js", - "index": 41, - "index2": 35, - "size": 711, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 58, - "building": 456 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/AutoConf/Response/model/Service", - "loc": "14:0-65" - }, - { - "moduleId": 62, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "module": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "moduleName": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "type": "harmony import", - "userRequest": "../Response/model/Service", - "loc": "19:0-48" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\n/**\n * Object used to describe a web service of the geoportal platform.\n *\n * @property {String} title - Web service name\n * @property {Object} serverUrl - Associative array mapping geoportal access key (keys) with their properties (URLs of the web service, with the geoportal access key).\n * @property {String} version - web service version.\n *\n * @namespace\n * @alias Gp.Services.Config.Service\n */\nfunction Service () {\n if (!(this instanceof Service)) {\n throw new TypeError(\"Service constructor cannot be called as a function.\");\n }\n\n this.title = null;\n\n this.serverUrl = null;\n\n this.version = null;\n}\n\nService.prototype = {\n\n constructor : Service\n\n};\n\nexport default Service;\n" - }, - { - "id": 32, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Response/model/Style.js", - "name": "./src/Services/AutoConf/Response/model/Style.js", - "index": 42, - "index2": 36, - "size": 651, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 58, - "building": 471 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/AutoConf/Response/model/Style", - "loc": "15:0-61" - }, - { - "moduleId": 62, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "module": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "moduleName": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "type": "harmony import", - "userRequest": "../Response/model/Style", - "loc": "20:0-44" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\n/**\n * Object used to describe a style that may be used for a geoportal resource.\n *\n * @property {String} name - Style identifier (eg : \"normal\", \"bdparcellaire\", ...)\n * @property {String} title - human readable name of the style.\n * @property {Boolean} current - true if this is the default style.\n *\n * @namespace\n * @alias Gp.Services.Config.Style\n */\n\nfunction Style () {\n if (!(this instanceof Style)) {\n throw new TypeError(\"Style constructor cannot be called as a function.\");\n }\n\n this.name = null;\n\n this.title = null;\n\n this.current = null;\n}\n\nStyle.prototype = {\n\n constructor : Style\n\n};\n\nexport default Style;\n" - }, - { - "id": 33, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Response/model/Territory.js", - "name": "./src/Services/AutoConf/Response/model/Territory.js", - "index": 43, - "index2": 37, - "size": 1996, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 59, - "building": 495 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/AutoConf/Response/model/Territory", - "loc": "16:0-69" - }, - { - "moduleId": 62, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "module": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "moduleName": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "type": "harmony import", - "userRequest": "../Response/model/Territory", - "loc": "21:0-52" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\n/**\n * Object used to describe properties of a french territory covered by geoportal resources.\n *\n * @property {Boolean} isDefault - if this territory is to use by default.\n * @property {String} defaultCRS - Identifier of the coordinates system to use by default for that territory.\n * @property {Array.} additionalCRS - Identifiers of additional coordinates systems availables for that territory.\n * @property {Array.} defaultLayers - Identifiers of layers to load by default for that territory.\n * @property {Object} defaultOptions - options to use by default for that territory.\n * @property {Number} defaultOptions.resolution - resolution to use by default for that territory (in meter per pixel).\n * @property {Number} defaultOptions.minScaleDenominator - minimum scaleDenominator accessible for that territory.\n * @property {Number} defaultOptions.maxScaleDenominator - maximum scaleDenominator accessible for that territory.\n * @property {Gp.BBox} geoBBox - Bounding Box of the territory (expressed in geographical coordinates)\n * @property {Object} geoCenter - center of the territory (expressed in geographical coordinates)\n * @property {Float} geoCenter.lon - center longitude\n * @property {Float} geoCenter.lat - center latitude\n *\n * @namespace\n * @alias Gp.Services.Config.Territory\n */\nfunction Territory () {\n if (!(this instanceof Territory)) {\n throw new TypeError(\"Territory constructor cannot be called as a function.\");\n }\n\n this.isDefault = null;\n\n this.defaultCRS = null;\n\n this.additionalCRS = [];\n\n this.geoBBOX = {\n left : null,\n right : null,\n top : null,\n bottom : null\n };\n\n this.geoCenter = {\n lon : null,\n lat : null\n };\n\n this.defaultOptions = {\n resolution : null,\n minScaleDenominator : null,\n maxScaleDenominator : null\n };\n\n this.defaultLayers = [];\n}\n\nTerritory.prototype = {\n\n constructor : Territory\n\n};\n\nexport default Territory;\n" - }, - { - "id": 34, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Response/model/Thematic.js", - "name": "./src/Services/AutoConf/Response/model/Thematic.js", - "index": 44, - "index2": 38, - "size": 576, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 59, - "building": 480 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/AutoConf/Response/model/Thematic", - "loc": "17:0-67" - }, - { - "moduleId": 62, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "module": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "moduleName": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "type": "harmony import", - "userRequest": "../Response/model/Thematic", - "loc": "22:0-50" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\n/**\n * Object used to describe a thematic\n *\n * @property {String} name - Thematic name\n * @property {Boolean} inspire - true if the thematic name is an [INSPIRE one]{@link http://inspire.ec.europa.eu/index.cfm/pageid/2/list/7}.\n *\n * @namespace\n * @alias Gp.Services.Config.Thematic\n */\n\nfunction Thematic () {\n if (!(this instanceof Thematic)) {\n throw new TypeError(\"Thematic constructor cannot be called as a function.\");\n }\n\n this.inspire = null;\n\n this.name = null;\n}\n\nThematic.prototype = {\n\n constructor : Thematic\n\n};\n\nexport default Thematic;\n" - }, - { - "id": 35, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Response/model/TileMatrixSet.js", - "name": "./src/Services/AutoConf/Response/model/TileMatrixSet.js", - "index": 45, - "index2": 39, - "size": 2525, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 60, - "building": 534 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/AutoConf/Response/model/TileMatrixSet", - "loc": "20:0-67" - }, - { - "moduleId": 62, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "module": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "moduleName": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "type": "harmony import", - "userRequest": "../Response/model/TileMatrixSet", - "loc": "23:0-60" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\n/**\n *\n * Object used to describe a TileMatrix set (for WMTS use).\n *\n * @property {Array.} matrixIds - Array of IDs for each TileMatrix of the set.\n * @property {Array.} tileMatrices - Array of TileMatrix descriptions.\n * @property {Array.} nativeResolutions - Array of resolutions (in meter per pixel) applying for each TileMatrix of the set.\n * @property {String} projection - Identifier of the Cordinates System used for the tileMatrixSet.\n *\n * @namespace\n * @alias Gp.Services.Config.TileMatrixSet\n */\nfunction TileMatrixSet () {\n if (!(this instanceof TileMatrixSet)) {\n throw new TypeError(\"TileMatrixSet constructor cannot be called as a function.\");\n }\n\n this.projection = null;\n\n this.nativeResolutions = [];\n\n this.matrixIds = [];\n\n this.tileMatrices = {};\n}\n\nTileMatrixSet.prototype = {\n\n constructor : TileMatrixSet,\n\n /**\n * Returns Tile Matrix Set resolutions\n *\n * @returns {Array} nativeResolutions - Array of resolutions (in meter per pixel) applying for each TileMatrix of the set.\n */\n getResolutions : function () {\n return this.nativeResolutions;\n },\n\n /**\n * Returns Tile Matrix Set identifiers\n *\n * @returns {Array} matrixIds - Array of IDs for each TileMatrix of the set.\n */\n getMatrixIds : function () {\n return this.matrixIds;\n },\n\n /**\n * Returns Tile Matrix Set projection\n *\n * @returns {String} projection - Identifier of the Cordinates System used for the tileMatrixSet.\n */\n getProjection : function () {\n return this.projection;\n },\n\n /**\n * Returns Tile Matrices descriptions.\n *\n * @returns {Array.} tileMatrices - Array of TileMatrix descriptions.\n */\n getTileMatrices : function () {\n return this.tileMatrices;\n },\n\n /**\n * Returns top left corner point of matrices\n *\n * @returns {Gp.Point} topLeftCorner - Top Left Corner Point of TMS matrices, expressed in the tileMatrixSet coordinates system.\n */\n getTopLeftCorner : function () {\n var topLeftCorner;\n var matrices = this.getTileMatrices();\n if (matrices) {\n for (var id in matrices) {\n if (matrices.hasOwnProperty(id)) {\n topLeftCorner = matrices[id].topLeftCorner;\n break;\n }\n }\n }\n return topLeftCorner;\n }\n\n};\n\nexport default TileMatrixSet;\n" - }, - { - "id": 36, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Response/model/TileMatrix.js", - "name": "./src/Services/AutoConf/Response/model/TileMatrix.js", - "index": 46, - "index2": 40, - "size": 2590, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 59, - "building": 511 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/AutoConf/Response/model/TileMatrix", - "loc": "18:0-63" - }, - { - "moduleId": 62, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "module": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "moduleName": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "type": "harmony import", - "userRequest": "../Response/model/TileMatrix", - "loc": "24:0-54" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\n/**\n * Object used to describe a TileMatrix.\n *\n * @property {String} matrixId - matrix Identifier\n * @property {Number} matrixHeight - Number of tiles from the top to the bottom of the matrix.\n * @property {Number} matrixWidth - Number of tiles from the left to the right of the matrix.\n * @property {Number} scaleDenominator - Scale denominator associated to that matrix.\n * @property {Number} tileHeight - tile height in number of pixels\n * @property {Number} tileWidth - tile width in number of pixels\n * @property {Gp.Point} topLeftCorner - Top Left Corner Point of the matrix expressed in the tileMatrixSet coordinates system.\n *\n * @namespace\n * @alias Gp.Services.Config.TileMatrix\n */\n\nfunction TileMatrix () {\n if (!(this instanceof TileMatrix)) {\n throw new TypeError(\"TileMatrix constructor cannot be called as a function.\");\n }\n\n this.matrixId = null;\n\n this.matrixHeight = null;\n\n this.matrixWidth = null;\n\n this.scaleDenominator = null;\n\n this.tileHeight = null;\n\n this.tileWidth = null;\n\n this.topLeftCorner = null;\n}\n\nTileMatrix.prototype = {\n\n constructor : TileMatrix,\n\n /**\n * Returns top left corner point of the matrix\n *\n * @returns {Gp.Point} topLeftCorner - Top Left Corner Point of the matrix expressed in the tileMatrixSet coordinates system.\n */\n getTopLeftCorner : function () {\n return this.topLeftCorner;\n },\n\n /**\n * Returns Scale denominator associated to that matrix.\n *\n * @returns {Number} scaleDenominator - Scale denominator associated to that matrix.\n */\n getScaleDenominator : function () {\n return this.scaleDenominator;\n },\n\n /**\n * Returns tile height of matrix\n *\n * @returns {Number} tileHeight - tile height in number of pixels\n */\n getTileHeight : function () {\n return this.tileHeight;\n },\n\n /**\n * Returns tile width of matrix\n *\n * @returns {Number} tileWidth - tile width in number of pixels\n */\n getTileWidth : function () {\n return this.tileWidth;\n },\n\n /**\n * Returns matrix height (number of tiles)\n *\n * @returns {Number} matrixHeight - Number of tiles from the top to the bottom of the matrix.\n */\n getMatrixHeight : function () {\n return this.matrixHeight;\n },\n\n /**\n * Returns matrix width (number of tiles)\n *\n * @returns {Number} matrixWidth - Number of tiles from the left to the right of the matrix.\n */\n getMatrixWidth : function () {\n return this.matrixWidth;\n }\n\n};\n\nexport default TileMatrix;\n" - }, - { - "id": 37, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Response/model/TileMatrixLimit.js", - "name": "./src/Services/AutoConf/Response/model/TileMatrixLimit.js", - "index": 47, - "index2": 41, - "size": 982, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 59, - "building": 521 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/AutoConf/Response/model/TileMatrixLimit", - "loc": "19:0-73" - }, - { - "moduleId": 62, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "module": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "moduleName": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "type": "harmony import", - "userRequest": "../Response/model/TileMatrixLimit", - "loc": "25:0-64" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\n/**\n * Object used to describe a layer extent on a Tile Matrix.\n *\n * @property {Number} minTileCol - minimum column index where tile can be found on the Tile matrix.\n * @property {Number} maxTileCol - maximum column index where tile can be found on the Tile matrix.\n * @property {Number} minTileRow - minimum row index where tile can be found on the Tile matrix.\n * @property {Number} maxTileCol - maximum row index where tile can be found on the Tile matrix.\n *\n * @namespace\n * @alias Gp.Services.Config.TileMatrixLimit\n */\n\nfunction TileMatrixLimit () {\n if (!(this instanceof TileMatrixLimit)) {\n throw new TypeError(\"TileMatrixLimit constructor cannot be called as a function.\");\n }\n\n this.minTileRow = null;\n\n this.maxTileRow = null;\n\n this.minTileCol = null;\n\n this.maxTileCol = null;\n}\n\n/**\n * @lends module:Autoconf/Response/TileMatrixLimit\n */\nTileMatrixLimit.prototype = {\n\n constructor : TileMatrixLimit\n};\n\nexport default TileMatrixLimit;\n" - }, - { - "id": 38, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService.js", - "name": "./src/Formats/XLS/LocationUtilityService.js", - "index": 54, - "index2": 55, - "size": 6296, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/ReverseGeocodeRequestFactory.js", - "issuerId": 79, - "issuerName": "./src/Services/Geocode/Request/ReverseGeocodeRequestFactory.js", - "profile": { - "factory": 96, - "building": 284, - "dependencies": 713 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 64, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "module": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "moduleName": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "type": "harmony import", - "userRequest": "../../../Formats/XLS/LocationUtilityService", - "loc": "11:0-81" - }, - { - "moduleId": 79, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/ReverseGeocodeRequestFactory.js", - "module": "./src/Services/Geocode/Request/ReverseGeocodeRequestFactory.js", - "moduleName": "./src/Services/Geocode/Request/ReverseGeocodeRequestFactory.js", - "type": "harmony import", - "userRequest": "../../../Formats/XLS/LocationUtilityService", - "loc": "11:0-81" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "import Logger from \"../../Utils/LoggerByDefault\";\nimport AbstractService from \"./AbstractService\";\nimport GeocodeRequest from \"./LocationUtilityService/GeocodeRequest\";\nimport ReverseGeocodeRequest from \"./LocationUtilityService/ReverseGeocodeRequest\";\nimport GeocodeFilterExtension from \"./LocationUtilityService/GeocodeFilterExtension\";\n\n/**\n * @classdesc\n *\n * Requête de type LocationUtilityService (LUS)\n * (Factory)\n *\n * @example\n * // encapsule un objet dans une coquille XSL, Factory sur les objets Geocode/ReverseGeocode\n * lus = new LocationUtilityService ();\n * lus.addRequest (req);\n * lus.toString();\n * ou\n * lus = new LocationUtilityService ({\n * location : \"saint mandé\",\n * returnFreeForm : true,\n * filterOptions : {\n * type : ['PositionOfInterest']\n * }\n * });\n * lus.toString();\n *\n * // out ->\n * // \n * //
\n * // saint mandé\n * //
\n * //
\n *\n * // creation de l'objet Geocode\n * req = new GeocodeRequest ();\n * req.addAddress (new Address (/*todo/*));\n * req.toString();\n * // out ->\n * // \n * //
\n * // saint mandé\n * //
\n * //
\n *\n * // creation de l'objet ReverseGeocode\n * req = new ReverseGeocodeRequest ();\n * req.addPosition (new Position (position:{x: , y: }));\n * req.addPreference (['StreetAddress']);\n * req.toString();\n * // out ->\n * // \n * // \n * // \n * // 50.347775 3.205098\n * // \n * // \n * // StreetAddress\n * // \n *\n * @constructor\n * @alias Gp.Formats.XLS.LocationUtilityService\n * @param {Object} options - options\n * @param {Object} options.location - location\n * @param {String} options.position - position : {x : \"\", y : \"\"}\n * @param {String} options.returnFreeForm - true|false\n * @param {Object} options.filterOptions - filtres\n * @param {Function} options.onsuccess - function callback success (TODO)\n * @param {Function} options.onerror - function callback error (TODO)\n *\n * @private\n */\nfunction LocationUtilityService (options) {\n this.logger = Logger.getLogger();\n this.logger.trace(\"[Constructeur LocationUtilityService ()]\");\n\n if (!(this instanceof LocationUtilityService)) {\n throw new TypeError(\"LocationUtilityService constructor cannot be called as a function.\");\n }\n\n /**\n * Nom de la classe\n */\n this.CLASSNAME = \"LocationUtilityService\";\n\n /**\n * Type de classe de geocodage\n * ex. GeocodeRequest ou ReverseGeocodeRequest\n */\n this.CLASSTYPE = null;\n\n // appel du constructeur par heritage\n AbstractService.apply(this, arguments);\n\n // on determine le type de geocodage si les options sont renseignées\n if (this.options) {\n this.CLASSTYPE = (this.options.location) ? \"GeocodeRequest\" : (this.options.position) ? \"ReverseGeocodeRequest\" : null;\n }\n}\n\n/**\n * @lends module:LocationUtilityService#\n */\nLocationUtilityService.prototype = Object.create(AbstractService.prototype, {\n // todo\n // getter/setter\n});\n\n/**\n * Constructeur (alias)\n */\nLocationUtilityService.prototype.constructor = LocationUtilityService;\n\n/**\n * (overwrite) Ajout d'un objet de type LUS : GeocodeRequest ou ReverseGeocodeRequest\n *\n * @param {Object} oLUSRequest - objet de type LUS\n */\nLocationUtilityService.prototype.addRequest = function (oLUSRequest) {\n // on determine le type de geocodage\n this.CLASSTYPE = oLUSRequest.CLASSNAME;\n\n // on controle les types acceptés\n switch (this.CLASSTYPE) {\n case \"GeocodeRequest\":\n case \"ReverseGeocodeRequest\":\n this.oRequest = oLUSRequest;\n break;\n default:\n throw new Error(\"Ce n'est pas un objet de type 'LUS Request' !?\");\n }\n};\n\n/**\n * (overwrite) Ajout d'un objet de type GeocodeFilterExtension\n *\n * @param {Object} oFilter - objet de type Filtre\n */\nLocationUtilityService.prototype.addFilter = function (oFilter) {\n // FIXME gestion des filtres à partir des tables de geocodages\n if (oFilter instanceof GeocodeFilterExtension) {\n this.oFilter = oFilter;\n }\n};\n\n/**\n * (overwrite) toString\n *\n * @returns {String} requête\n */\nLocationUtilityService.prototype.toString = function () {\n // soit, on a un objet LUS Request déjà instancié\n // sinon, il faut le construire à partir des options à disposition\n if (!this.oRequest) {\n // il nous faut des options\n if (!this.options) {\n throw new Error(\"Les options ne sont pas renseignées, impossible de construire la requête !\");\n }\n\n // si les options 'location' et 'position' sont renseignées,\n // on prendra par defaut le choix du geocodage direct\n if (this.CLASSTYPE === \"GeocodeRequest\") {\n var settingsDirect = {\n location : this.options.location,\n returnFreeForm : this.options.returnFreeForm,\n filterOptions : this.options.filterOptions || {}\n };\n this.oRequest = new GeocodeRequest(settingsDirect);\n // ajout des filtres spécifiques au service du geocodage direct de l'IGN\n if (this.oFilter) {\n this.oRequest.addFilter(this.oFilter);\n }\n } else if (this.CLASSTYPE === \"ReverseGeocodeRequest\") {\n var settingsInv = {\n position : this.options.position,\n returnFreeForm : this.options.returnFreeForm,\n filterOptions : this.options.filterOptions || {}\n };\n this.oRequest = new ReverseGeocodeRequest(settingsInv);\n } else {\n this.logger.error(\"impossible de determiner le type de geocodage : Direct ou Inverse !?\");\n }\n }\n\n // objet indefini !?\n if (!this.oRequest) {\n throw new Error(\"Type de Geocodage indefini !\");\n }\n\n this.strRequest = this.oRequest.toString();\n return this.strRequest;\n};\n\nexport default LocationUtilityService;\n" - }, - { - "id": 39, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Response/model/DirectGeocodedLocation.js", - "name": "./src/Services/Geocode/Response/model/DirectGeocodedLocation.js", - "index": 69, - "index2": 64, - "size": 1091, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 61, - "building": 581, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/Geocode/Response/model/DirectGeocodedLocation", - "loc": "23:0-94" - }, - { - "moduleId": 77, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Formats/DirectGeocodeResponseReader.js", - "module": "./src/Services/Geocode/Formats/DirectGeocodeResponseReader.js", - "moduleName": "./src/Services/Geocode/Formats/DirectGeocodeResponseReader.js", - "type": "harmony import", - "userRequest": "../Response/model/DirectGeocodedLocation", - "loc": "15:0-78" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\nimport GeocodedLocation from \"./GeocodedLocation\";\n\n/**\n * Single location object returned by the underlying geocoding web service.\n *\n * @property {Float} accuracy - Accuracy of the response towards the requested location between 0 (unaccurate) and 1 (exact match).\n *\n * @namespace\n * @extends {Gp.Services.Geocode.GeocodedLocation}\n * @alias Gp.Services.Geocode.DirectGeocodedLocation\n */\nfunction DirectGeocodedLocation () {\n if (!(this instanceof DirectGeocodedLocation)) {\n throw new TypeError(\"DirectGeocodedLocation constructor cannot be called as a function.\");\n }\n\n // INFO\n // appel du constructeur de la classe mère\n // avec passage de param.\n GeocodedLocation.apply(this, arguments);\n\n /**\n * Nom de la classe (heritage) : \"DirectGeocodedLocation\"\n * @type {String}\n */\n this.CLASSNAME = \"DirectGeocodedLocation\";\n\n this.accuracy = null;\n}\n\nDirectGeocodedLocation.prototype = Object.create(GeocodedLocation.prototype);\n\nDirectGeocodedLocation.prototype.constructor = DirectGeocodedLocation;\n\nexport default DirectGeocodedLocation;\n" - }, - { - "id": 40, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Response/model/ReverseGeocodedLocation.js", - "name": "./src/Services/Geocode/Response/model/ReverseGeocodedLocation.js", - "index": 75, - "index2": 69, - "size": 1088, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 61, - "building": 569, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/Geocode/Response/model/ReverseGeocodedLocation", - "loc": "24:0-96" - }, - { - "moduleId": 81, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Formats/ReverseGeocodeResponseReader.js", - "module": "./src/Services/Geocode/Formats/ReverseGeocodeResponseReader.js", - "moduleName": "./src/Services/Geocode/Formats/ReverseGeocodeResponseReader.js", - "type": "harmony import", - "userRequest": "../Response/model/ReverseGeocodedLocation", - "loc": "15:0-80" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\nimport GeocodedLocation from \"./GeocodedLocation\";\n\n/**\n * Single location object returned by the underlying reverse geocoding web service.\n *\n * @property {Float} searchCenterDistance - Distance between the requested point and the location.\n *\n * @namespace\n * @extends {Gp.Services.Geocode.GeocodedLocation}\n * @alias Gp.Services.Geocode.ReverseGeocodedLocation\n */\nfunction ReverseGeocodedLocation () {\n if (!(this instanceof ReverseGeocodedLocation)) {\n throw new TypeError(\"ReverseGeocodedLocation constructor cannot be called as a function.\");\n }\n\n // INFO\n // appel du constructeur de la classe mère\n // avec passage de param.\n GeocodedLocation.apply(this, arguments);\n\n /**\n * Nom de la classe (heritage) : \"ReverseGeocodedLocation\"\n * @type {String}\n */\n this.CLASSNAME = \"ReverseGeocodedLocation\";\n\n this.searchCenterDistance = null;\n}\n\nReverseGeocodedLocation.prototype = Object.create(GeocodedLocation.prototype);\n\nReverseGeocodedLocation.prototype.constructor = ReverseGeocodedLocation;\n\nexport default ReverseGeocodedLocation;\n" - }, - { - "id": 41, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoComplete/Response/model/AutoCompleteResponse.js", - "name": "./src/Services/AutoComplete/Response/model/AutoCompleteResponse.js", - "index": 78, - "index2": 73, - "size": 701, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 56, - "building": 290 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/AutoComplete/Response/model/AutoCompleteResponse", - "loc": "5:0-95" - }, - { - "moduleId": 83, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoComplete/Response/AutoCompleteResponseFactory.js", - "module": "./src/Services/AutoComplete/Response/AutoCompleteResponseFactory.js", - "moduleName": "./src/Services/AutoComplete/Response/AutoCompleteResponseFactory.js", - "type": "harmony import", - "userRequest": "./model/AutoCompleteResponse", - "loc": "12:0-64" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "/**\n * Response object for {@link module:Services~autoComplete Gp.Services.autoComplete ()} invocation when successful. Received as the argument of onSuccess callback function.\n *\n * @property {Array.} suggestedLocations - SuggestedLocations array.\n *\n * @namespace\n * @alias Gp.Services.AutoCompleteResponse\n */\nfunction AutoCompleteResponse () {\n if (!(this instanceof AutoCompleteResponse)) {\n throw new TypeError(\"AutoCompleteResponse constructor cannot be called as a function.\");\n }\n\n this.suggestedLocations = [];\n}\n\nAutoCompleteResponse.prototype = {\n\n constructor : AutoCompleteResponse\n\n};\n\nexport default AutoCompleteResponse;\n" - }, - { - "id": 42, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoComplete/Response/model/SuggestedLocation.js", - "name": "./src/Services/AutoComplete/Response/model/SuggestedLocation.js", - "index": 79, - "index2": 74, - "size": 3634, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 56, - "building": 368 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/AutoComplete/Response/model/SuggestedLocation", - "loc": "6:0-89" - }, - { - "moduleId": 83, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoComplete/Response/AutoCompleteResponseFactory.js", - "module": "./src/Services/AutoComplete/Response/AutoCompleteResponseFactory.js", - "moduleName": "./src/Services/AutoComplete/Response/AutoCompleteResponseFactory.js", - "type": "harmony import", - "userRequest": "./model/SuggestedLocation", - "loc": "13:0-58" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "\n/**\n * Single SuggestedLocation Object returned by underlying web service.\n * Each suggested location represents a street address (\"StreetAddress\") or a place name (\"PositionOfInterest\").\n *\n * @property {String} type - Suggested location type : \"StreetAddress\" ou \"PositionOfInterest\"\n * @property {Gp.Point} position - Position of the suggested location given in requested coordinates system.\n * @property {String} commune - Suggested municipality\n * @property {String} fullText - Full text representation of the suggested location.\n * @property {String} postalCode - Suggested location postcode\n * @property {Integer} classification - Number used to classify the importance of the place where is the suggested location from 1 (most important) to 7 (less important).\n * @property {String} street - Street name of the suggested location (\"StreetAddress\" only).\n * @property {String} kind - Nature of the suggested location : \"prefecture\", \"monument\", \"commune\", ... for instance (\"PositionOfInterest\" only).\n *\n * @namespace\n * @alias Gp.Services.AutoComplete.SuggestedLocation\n */\nfunction SuggestedLocation () {\n if (!(this instanceof SuggestedLocation)) {\n throw new TypeError(\"SuggestedLocation constructor cannot be called as a function.\");\n }\n\n /* REPONSE :\n {\n \"status\" : \"OK\",\n \"results\" : [\n {\n \"country\":\"PositionOfInterest\",\n \"x\":-1.559185,\n \"y\":47.952603,\n \"city\":\"Brie\",\n \"zipcode\":\"35150\",\n \"street\":\"corbe\",\n \"kind\":\"Lieu-dit habité\",\n \"fulltext\":\"corbe, 35150 Brie\",\n \"classification\":6\n },\n {\n \"country\":\"StreetAddress\",\n \"x\":1.538295,\n \"y\":43.19646,\n \"city\":\"Brie\",\n \"zipcode\":\"09700\",\n \"street\":\"courreste\",\n \"kind\":\"\",\n \"fulltext\":\"courreste, 09700 Brie\",\n \"classification\":7\n }\n ]\n }\n */\n\n /* REPONSE EN ERREUR\n {\n status : \"ERROR\",\n results : [ ]\n }\n */\n\n /**\n * Suggested location type : \"StreetAddress\" ou \"PositionOfInterest\"\n * @type {String}\n */\n this.type = null;\n\n /**\n * Position of the suggested location given in requested coordinates system.\n * @type {Gp.Point}\n */\n this.position = {\n x : null,\n y : null\n };\n\n /**\n * Suggested municipality\n * @type {String}\n */\n this.commune = null;\n\n /**\n * Full text representation of the suggested location.\n * @type {String}\n */\n this.fullText = null;\n\n /**\n * Suggested location postcode\n * @type {Number}\n */\n this.postalCode = null;\n\n /**\n * Number used to classify the importance of the place where is the suggested location from 1 (most important) to 7 (less important).\n * @type {Integer}\n */\n this.classification = null;\n\n /**\n * Street name of the suggested location (\"StreetAddress\" only).\n * @type {String}\n */\n this.street = null;\n\n /**\n * Place name of the suggested location (\"PositionOfInterest\" only).\n * @type {String}\n */\n this.poi = null;\n\n /**\n * Nature of the suggested location : \"prefecture\", \"monument\", \"commune\", ... for instance (\"PositionOfInterest\" only).\n * @type {String}\n */\n this.kind = null;\n}\n\nSuggestedLocation.prototype = {\n\n constructor : SuggestedLocation\n};\n\nexport default SuggestedLocation;\n" - }, - { - "id": 43, - "identifier": "multi /home/jpbazonnais/Projets/geoportal-access-lib/src/Gp", - "name": "multi ./src/Gp", - "index": 0, - "index2": 100, - "size": 28, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": null, - "issuerId": null, - "issuerName": null, - "profile": { - "factory": 0, - "building": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [], - "depth": 0 - }, - { - "id": 44, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "name": "./src/Gp.js", - "index": 1, - "index2": 99, - "size": 4895, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "multi /home/jpbazonnais/Projets/geoportal-access-lib/src/Gp", - "issuerId": 43, - "issuerName": "multi ./src/Gp", - "profile": { - "factory": 194, - "building": 616 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 43, - "moduleIdentifier": "multi /home/jpbazonnais/Projets/geoportal-access-lib/src/Gp", - "module": "multi ./src/Gp", - "moduleName": "multi ./src/Gp", - "type": "single entry", - "userRequest": "/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp", - "loc": "main:100000" - } - ], - "usedExports": true, - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 1, - "source": "import Services from \"./Services/Services\";\nimport DefaultUrl from \"./Services/DefaultUrlService\";\nimport AltiResponse from \"./Services/Alti/Response/model/AltiResponse\";\nimport Elevation from \"./Services/Alti/Response/model/Elevation\";\nimport AutoCompleteResponse from \"./Services/AutoComplete/Response/model/AutoCompleteResponse\";\nimport SuggestedLocation from \"./Services/AutoComplete/Response/model/SuggestedLocation\";\nimport GetConfigResponse from \"./Services/AutoConf/Response/model/AutoConfResponse\";\nimport Constraint from \"./Services/AutoConf/Response/model/Constraint\";\nimport Format from \"./Services/AutoConf/Response/model/Format\";\nimport Layer from \"./Services/AutoConf/Response/model/Layer\";\nimport Legend from \"./Services/AutoConf/Response/model/Legend\";\nimport Metadata from \"./Services/AutoConf/Response/model/Metadata\";\nimport Originator from \"./Services/AutoConf/Response/model/Originator\";\nimport Service from \"./Services/AutoConf/Response/model/Service\";\nimport Style from \"./Services/AutoConf/Response/model/Style\";\nimport Territory from \"./Services/AutoConf/Response/model/Territory\";\nimport Thematic from \"./Services/AutoConf/Response/model/Thematic\";\nimport TM from \"./Services/AutoConf/Response/model/TileMatrix\";\nimport TMLimit from \"./Services/AutoConf/Response/model/TileMatrixLimit\";\nimport TMS from \"./Services/AutoConf/Response/model/TileMatrixSet\";\nimport GeocodeResponse from \"./Services/Geocode/Response/model/GeocodeResponse\";\nimport GeocodedLocation from \"./Services/Geocode/Response/model/GeocodedLocation\";\nimport DirectGeocodedLocation from \"./Services/Geocode/Response/model/DirectGeocodedLocation\";\nimport ReverseGeocodedLocation from \"./Services/Geocode/Response/model/ReverseGeocodedLocation\";\nimport IsoCurveResponse from \"./Services/ProcessIsoCurve/Response/model/ProcessIsoCurveResponse\";\nimport RouteResponse from \"./Services/Route/Response/model/RouteResponse\";\nimport RouteInstruction from \"./Services/Route/Response/model/RouteInstruction\";\nimport XHR from \"./Protocols/XHR\";\nimport Error from \"./Exceptions/ErrorService\";\nimport Helper from \"./Utils/Helper\";\n\nvar Gp = {\n servicesVersion : \"__GPVERSION__\",\n servicesDate : \"__GPDATE__\",\n /**\n * Methode pour rajouter une classe / objet au namespace global.\n *\n * @method extend\n * @param {String} strNS - nom sous lequel on veut présenter la\n * classe / objet (Gp.\"strNS\").\n * @param {Object} value - la classe / objet à rajouter au NS global.\n * @returns {Object} this\n */\n extend : function (strNS, value) {\n var parts = strNS.split(\".\");\n var parent = this;\n var pl;\n\n pl = parts.length;\n\n for (var i = 0; i < pl; i++) {\n // create a property if it doesn't exist\n if (typeof parent[parts[i]] === \"undefined\") {\n parent[parts[i]] = {};\n }\n\n var n = pl - 1;\n if (i === n) {\n parent[parts[i]] = value;\n }\n\n parent = parent[parts[i]];\n }\n\n return this;\n }\n};\n\n// on declare les ns dans root global\nGp.extend(\"Protocols\", {});\nGp.extend(\"Protocols.XHR\", XHR);\nGp.extend(\"Services\", Services);\n// Export Alti\nGp.extend(\"Services.AltiResponse\", AltiResponse);\nGp.extend(\"Services.Alti.Elevation\", Elevation);\n// Export Autocomplete\nGp.extend(\"Services.AutoCompleteResponse\", AutoCompleteResponse);\nGp.extend(\"Services.AutoComplete.SuggestedLocation\", SuggestedLocation);\n// Export Autoconf\nGp.extend(\"Services.GetConfigResponse\", GetConfigResponse);\nGp.extend(\"Services.Config.Constraint\", Constraint);\nGp.extend(\"Services.Config.Format\", Format);\nGp.extend(\"Services.Config.Layer\", Layer);\nGp.extend(\"Services.Config.Legend\", Legend);\nGp.extend(\"Services.Config.Metadata\", Metadata);\nGp.extend(\"Services.Config.Originator\", Originator);\nGp.extend(\"Services.Config.Service\", Service);\nGp.extend(\"Services.Config.Style\", Style);\nGp.extend(\"Services.Config.Territory\", Territory);\nGp.extend(\"Services.Config.Thematic\", Thematic);\nGp.extend(\"Services.Config.TileMatrix\", TM);\nGp.extend(\"Services.Config.TileMatrixLimit\", TMLimit);\nGp.extend(\"Services.Config.TileMatrixSet\", TMS);\n// Export Geocode\nGp.extend(\"Services.GeocodeResponse\", GeocodeResponse);\nGp.extend(\"Services.Geocode.GeocodedLocation\", GeocodedLocation);\nGp.extend(\"Services.Geocode.DirectGeocodedLocation\", DirectGeocodedLocation);\nGp.extend(\"Services.Geocode.ReverseGeocodedLocation\", ReverseGeocodedLocation);\n// Export IsoCurve\nGp.extend(\"Services.IsoCurveResponse\", IsoCurveResponse);\n// Export Route\nGp.extend(\"Services.RouteResponse\", RouteResponse);\nGp.extend(\"Services.Route.RouteInstruction\", RouteInstruction);\n// Export Erreurs et Outils\nGp.extend(\"Error\", Error);\nGp.extend(\"Helper\", Helper);\n// Export DefaultUrls\nGp.extend(\"Services.DefaultUrl\", DefaultUrl);\n\nexport default Gp; // = export { Gp as default };\n" - }, - { - "id": 45, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Services.js", - "name": "./src/Services/Services.js", - "index": 2, - "index2": 98, - "size": 34733, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "issuerId": 44, - "issuerName": "./src/Gp.js", - "profile": { - "factory": 52, - "building": 115 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 44, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Gp.js", - "module": "./src/Gp.js", - "moduleName": "./src/Gp.js", - "type": "harmony import", - "userRequest": "./Services/Services", - "loc": "1:0-43" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 2, - "source": "/* eslint no-unused-vars: [\"error\", { \"varsIgnorePattern\": \"point|circle|bbox\" }] */\n\n/**\n* Geoportal web services invocation namespace.\n*\n* @module Services\n* @alias Gp.Services\n*/\nimport Alti from \"./Alti/Alti\";\nimport AutoConf from \"./AutoConf/AutoConf\";\nimport Geocode from \"./Geocode/Geocode\";\nimport ReverseGeocode from \"./Geocode/ReverseGeocode\";\nimport AutoComplete from \"./AutoComplete/AutoComplete\";\nimport Route from \"./Route/Route\";\nimport ProcessIsoCurve from \"./ProcessIsoCurve/ProcessIsoCurve\";\n\nvar Services = {\n /**\n * Access to Geoportal resources metadata availables with one ore several keys, using [Auto-configuration service]{@link https://wxs.ign.fr/APIKEY/autoconf} of the Geoportal platform.\n *\n * @method getConfig\n * @param {Object} options - Options for function call.\n * @param {String} options.apiKey - Access key to Geoportal platform, obtained [here]{@link http://professionnels.ign.fr/ign/contrats}.\n * @param {Function} options.onSuccess - Callback function for getting successful service response. Takes a {@link Gp.Services.GetConfigResponse} object as a parameter except if \"rawResponse\" parameter is set to true : a String will be returned.\n * @param {Function} [options.onFailure] - Callback function for handling unsuccessful service responses (timeOut, missing rights, ...). Takes a {@link Gp.Error} object as parameter.\n * @param {Number} [options.timeOut=0] - Number of milliseconds above which a timeOut response will be returned with onFailure callback (see above). Default value is 0 which means timeOut will not be handled.\n * @param {String} [options.serverUrl=http (s)://wxs.ign.fr/APIKEY/autoconf] - Web service URL. If used, options.apiKey parameter is ignored. Only use if you know what you're doing.\n * @param {String} [options.protocol=JSONP] - Protocol used to handle dialog with web service. Possible values are 'JSONP' ({@link https://en.wikipedia.org/wiki/JSONP}) and 'XHR' ({@link https://en.wikipedia.org/wiki/XMLHttpRequest}). Only XHR protocol is supported in a NodeJS environment. Only use if you know what you're doing.\n * @param {String} [options.proxyURL] - Proxy URL to use when requesting an underlying web service. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you're doing.\n * @param {String} [options.callbackSuffix] - Callback function name suffix to use in case of a JSONP protocol use (see above), to set your own suffix instead of auto-increment. Ignored when options.protocol is set to 'XHR' value. Only use if you know what you're doing.\n * @param {String} [options.httpMethod=GET] - HTTP method to use when requesting underlying web service in case of a XHR protocol use (see above). Possible values are 'GET' and 'POST'. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {String} [options.contentType=\"application/xml\"] - Content-Type to use when requesting underlying web service in case of a XHR protocol use (see above) and if method HTTP is POST. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {Boolean} [options.rawResponse=false] - Setting this parameter to true implies you want to handle the service response by yourself : it will be returned as an unparsed String in onSuccess callback parameter. Only use if you know what you are doing.\n * @param {Function} [options.onBeforeParse] - Callback function for handling service response before parsing (as an unparsed String). Takes a String as a parameter (the raw service response). Returns a String that will be parsed as the service response. Only use if you know what you are doing.\n */\n getConfig : function (options) {\n var autoconfService = new AutoConf(options);\n autoconfService.call();\n },\n\n /**\n * Getting elevations in or along of one or several points on french territories using the [elevation services of the Geoportal Platform]{@link https://geoservices.ign.fr/documentation/geoservices/alti.html}.
\n * Two use cases are availables :
\n * 1. getting elevations of the given points : don't use the options.sampling parameter ;
\n * 2. getting a regular set of elevations along the given points : use the options.sampling parameter.\n *\n * @method getAltitude\n * @param {Object} options - Options for function call.\n * @param {String} options.apiKey - Access key to Geoportal platform, obtained [here]{@link http://professionnels.ign.fr/ign/contrats}.\n * @param {Array.} options.positions - Array of positions ({lon:float, lat:float}) expressed in CRS:84 coordinates system, where to get elevations. 50 positions maximum may be given. 2 positions minimum are required if you use the options.sampling parameter.\n * @param {Number} [options.sampling] - Number of points to use (between 2 and 5000) in order to compute an elevation path. The points given with the options.positions parameter are used to fix the planimetric path along which the elevations will be computed.
\n * If not used, only elevations of these positions will be returned.\n * @param {Boolean} [options.zonly=false] - Set this parameter to true if you only want to have elevations returned without corresponding coordinates.\n * @param {Function} options.onSuccess - Callback function for getting successful service response. Takes a {@link Gp.Services.AltiResponse} object as a parameter, except if \"rawResponse\" is set to true.\n * @param {Function} [options.onFailure] - Callback function for handling unsuccessful service responses (timeOut, missing rights, ...). Takes a {@link Gp.Error} object as parameter.\n * @param {Number} [options.timeOut=0] - Number of milliseconds above which a timeOut response will be returned with onFailure callback (see above). Default value is 0 which means timeOut will not be handled.\n * @param {String} [options.serverUrl=http (s)://wxs.ign.fr/APIKEY/alti/rest/elevation.json] - Web service URL. If used, options.apiKey parameter is ignored. Only use if you know what you're doing.\n * @param {String} [options.protocol=XHR] - Protocol used to handle dialog with web service. Possible values are 'JSONP' ({@link https://en.wikipedia.org/wiki/JSONP}) and 'XHR' ({@link https://en.wikipedia.org/wiki/XMLHttpRequest}). Only XHR protocol is supported in a NodeJS environment. Only use if you know what you're doing.\n * @param {String} [options.proxyURL] - Proxy URL to use when requesting underlying web service. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you're doing.\n * @param {String} [options.callbackSuffix] - Callback function name suffix to use in case of a JSONP protocol use (see above), to set your own suffix instead of auto-increment. Ignored when options.protocol is set to 'XHR' value. Only use if you know what you're doing.\n * @param {String} [options.httpMethod=GET] - HTTP method to use when requesting underlying web service in case of a XHR protocol use (see above). Possible values are 'GET' and 'POST'. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {String} [options.contentType=\"application/xml\"] - Content-Type to use when requesting underlying web service in case of a XHR protocol use (see above) and if method HTTP is POST. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {Boolean} [options.rawResponse=false] - Setting this parameter to true implies you want to handle the service response by yourself : it will be returned as an unparsed String in onSuccess callback parameter. Only use if you know what you are doing.\n * @param {Function} [options.onBeforeParse] - Callback function for handling service response before parsing (as an unparsed String). Takes a String as a parameter (the raw service response). Returns a String that will be parsed as the service response. Only use if you know what you are doing.\n * @param {String} [options.api='REST'] - What API to use for interacting with underlying web service : 'REST' or 'WPS'. Only use if you know what you are doing.\n * @param {String} [options.outputFormat='xml'] - Output format for underlying web service response : 'xml' or 'json'. Only use if you know what you are doing.\n */\n getAltitude : function (options) {\n var altiService = new Alti(options);\n altiService.call();\n },\n /**\n * Getting positon of a geographic identifier (places names, address, cadastral parcel, other...) using the [geocoding web service of the Geoportal Platform]{@link https://geoservices.ign.fr/documentation/geoservices/geocodage.html}.\n *\n * @example\n * Gp.Services.geocode ({\n * apiKey : \"jhyvi0fgmnuxvfv0zjzorvdn\",\n * location : \"73 avenue de Paris, Saint-Mandé\",\n * // traitement des resultats\n * onSuccess : function (result) {\n * console.log(\"found (x:\"+result.position.x+\", y:\"+result.position.y+\")\") ;\n * }\n * }) ;\n *\n *\n * @method geocode\n * @param {Object} options - Options for function call.\n * @param {String} options.apiKey - Access key to Geoportal platform, obtained [here]{@link http://professionnels.ign.fr/ign/contrats}.\n * @param {String|Object} options.location - Geographic identifier to locate. May be provided as a single String or a structured Object for an address search. In this last case, the following properties are availaibles.\n * @param {Number} [options.location.number] - Street number.\n * @param {String} [options.location.street] - Street name.\n * @param {String} [options.location.city] - City name.\n * @param {Number} [options.location.postalCode] - Postal Code\n * @param {Object} [options.filterOptions] - Additional filters to apply to search. The following properties may be given.\n * @param {Gp.BBox} [options.filterOptions.bbox] - Bounding box where to perform the search. Properties expressed in options.srs coordinates system.\n * @param {Array.} [options.filterOptions.type] - Geographical identifier types to search. Values currently availables are : \"PositionOfInterest\" for place names, \"StreetAddress\" for address search, \"CadastralParcel\" for Cadastral parcels search. Default is \"StreetAddress\".\n *\n * @param {String} [options.filterOptions.[prop]] - Additionnal properties to filter search. Properties depends on options.filterOptions.type, and values type should be \"String\".\n *

\n * Common Properties availables for all search types :
\n * \"municipality\", \"insee\", \"department\".\n *

\n * Properties availables for address search :
\n * \"quality\", \"ID\", \"ID_TR\" and \"territory\".\n *

\n * Properties availables for place names search :
\n * \"importance\", \"nature\" and \"territory\".\n *

\n * Properties availables for cadastral parcels search :
\n * \"sheet\", \"section\", and \"absorbedcity\".\n * @param {Number} [options.maximumResponses = 25] - Maximum number of responses. Default underlying service value applies (25) if not provided.\n * @param {Boolean} [options.returnFreeForm = false] - Set this parameter to true if you wish to have an address returned in a single String (unstructured). If unset, default underlying service value (false) applies.\n * @param {String} [options.srs = EPSG:4326] - Coordinates System used to expres coordinates for parameters and responses. Default underlying service value (EPSG:4326) applies.\n * @param {Function} options.onSuccess - Callback function for getting successful service response. Takes a {@link Gp.Services.GeocodeResponse} object as a parameter except if \"rawResponse\" is set to true.\n * @param {Function} [options.onFailure] - Callback function for handling unsuccessful service responses (timeOut, missing rights, ...). Takes a {@link Gp.Error} object as parameter.\n * @param {Number} [options.timeOut=0] - Number of milliseconds above which a timeOut response will be returned with onFailure callback (see above). Default value is 0 which means timeOut will not be handled.\n * @param {String} [options.serverUrl=http (s)://wxs.ign.fr/APIKEY/geoportail/ols] - Web service URL. If used, options.apiKey parameter is ignored. Only use if you know what you're doing.\n * @param {String} [options.protocol=XHR] - Protocol used to handle dialog with web service. Possible values are 'JSONP' ({@link https://en.wikipedia.org/wiki/JSONP}) and 'XHR' ({@link https://en.wikipedia.org/wiki/XMLHttpRequest}). Only XHR protocol is supported in a NodeJS environment. Only use if you know what you're doing.\n * @param {String} [options.proxyURL] - Proxy URL to use when requesting underlying web service. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you're doing.\n * @param {String} [options.callbackSuffix] - Callback function name suffix to use in case of a JSONP protocol use (see above), to set your own suffix instead of auto-increment. Ignored when options.protocol is set to 'XHR' value. Only use if you know what you're doing.\n * @param {String} [options.httpMethod=GET] - HTTP method to use when requesting underlying web service in case of a XHR protocol use (see above). Possible values are 'GET' and 'POST'. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {String} [options.contentType=\"application/xml\"] - Content-Type to use when requesting underlying web service in case of a XHR protocol use (see above) and if method HTTP is POST. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {Boolean} [options.rawResponse=false] - Setting this parameter to true implies you want to handle the service response by yourself : it will be returned as an unparsed String in onSuccess callback parameter. Only use if you know what you are doing.\n * @param {Function} [options.onBeforeParse] - Callback function for handling service response before parsing (as an unparsed String). Takes a String as a parameter (the raw service response). Returns a String that will be parsed as the service response. Only use if you know what you are doing.\n */\n geocode : function (options) {\n var geocodeService = new Geocode(options);\n geocodeService.call();\n },\n /**\n * Retrieving geographical identifiers (place names, address, cadastral parcels, ...) near a given position, using the [reverse geocoding web service of the Geoportal Platform]{@link https://geoservices.ign.fr/documentation/geoservices/geocodage-inverse.html}.\n *\n * @method reverseGeocode\n * @param {Object} options - Options for function call.\n * @param {String} options.apiKey - Access key to Geoportal platform, obtained [here]{@link http://professionnels.ign.fr/ign/contrats}.\n * @param {Gp.Point} options.position - Reference position where to search geographical identifiers. Its coordinates are expressed in the coordinates system given with options.srs parameter. (default is CRS:84, that means position.x is the longitude and position.y the latitude)\n * @param {Object} [options.filterOptions] - Additional filters to apply to search. The following properties may be given.\n * @param {Array.} [options.filterOptions.type] - Geographical identifier types to search. Values currently availables are : \"PositionOfInterest\" for place names, \"StreetAddress\" for address search, \"CadastralParcel\" for Cadastral parcels search. Default is \"StreetAddress\".\n * @param {Gp.BBox} [options.filterOptions.bbox] - Bounding box where to perform the search. Expressed in options.srs coordinates system.\n * @param {Gp.Circle} [options.filterOptions.circle] - Circle where to perform the search. Expressed in options.srs coordinates system.\n * @param {Array.} [options.filterOptions.polygon] - Polygon where to perform the search. Expressed in options.srs coordinates system.\n * @param {Number} [options.maximumResponses] - Maximum number of responses. Default underlying service value applies (25) if not provided.\n * @param {Boolean} [options.returnFreeForm = false] - Set this parameter to true if you wish to have an address returned in a single String (unstructured). If unset, default underlying service value (false) applies.\n * @param {String} [options.srs = CRS:84] - Coordinates System used to express coordinates for parameters and responses. Only WGS 84 geographical positioning is supported. Therefore, two values are allowed : \"CRS:84\" (position.x is the longitude and position.y the latitude) and \"EPSG:4326\" (position.x is the latitude and position.y the longitude) . Default is CRS:84.\n * @param {Function} options.onSuccess - Callback function for getting successful service response. Takes a {@link Gp.Services.GeocodeResponse} object as a parameter except if \"rawResponse\" is set to true.\n * @param {Function} [options.onFailure] - Callback function for handling unsuccessful service responses (timeOut, missing rights, ...). Takes a {@link Gp.Error} object as parameter.\n * @param {Number} [options.timeOut=0] - Number of milliseconds above which a timeOut response will be returned with onFailure callback (see above). Default value is 0 which means timeOut will not be handled.\n * @param {String} [options.serverUrl=http (s)://wxs.ign.fr/APIKEY/geoportail/ols] - Web service URL. If used, options.apiKey parameter is ignored. Only use if you know what you're doing.\n * @param {String} [options.protocol=XHR] - Protocol used to handle dialog with web service. Possible values are 'JSONP' ({@link https://en.wikipedia.org/wiki/JSONP}) and 'XHR' ({@link https://en.wikipedia.org/wiki/XMLHttpRequest}). Only XHR protocol is supported in a NodeJS environment. Only use if you know what you're doing.\n * @param {String} [options.proxyURL] - Proxy URL to use when requesting underlying web service. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you're doing.\n * @param {String} [options.callbackSuffix] - Callback function name suffix to use in case of a JSONP protocol use (see above), to set your own suffix instead of auto-increment. Ignored when options.protocol is set to 'XHR' value. Only use if you know what you're doing.\n * @param {String} [options.httpMethod=GET] - HTTP method to use when requesting underlying web service in case of a XHR protocol use (see above). Possible values are 'GET' and 'POST'. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {String} [options.contentType=\"application/xml\"] - Content-Type to use when requesting underlying web service in case of a XHR protocol use (see above) and if method HTTP is POST. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {Boolean} [options.rawResponse=false] - Setting this parameter to true implies you want to handle the service response by yourself : it will be returned as an unparsed String in onSuccess callback parameter. Only use if you know what you are doing.\n * @param {Function} [options.onBeforeParse] - Callback function for handling service response before parsing (as an unparsed String). Takes a String as a parameter (the raw service response). Returns a String that will be parsed as the service response. Only use if you know what you are doing.\n */\n reverseGeocode : function (options) {\n var reverseGeocodeService = new ReverseGeocode(options);\n reverseGeocodeService.call();\n },\n /**\n * Getting suggestions of probable places names or address based on uncomplete texts, using the [autocompletion service of the Geoportal Platform]{@link https://geoservices.ign.fr/documentation/geoservices/autocompletion.html}\n *\n * @method autoComplete\n * @param {Object} options - Options for function call.\n * @param {String} options.apiKey - Access key to Geoportal platform, obtained [here]{@link http://professionnels.ign.fr/ign/contrats}.\n * @param {String} options.text - Text input to complete.\n * @param {Array.} [options.filterOptions.type = \"StreetAddress\"] - Suggestion types to provide : address (\"StreetAddress\") and/or place name (\"PositionOfInterest\").\n * @param {Array.} [options.filterOptions.territory] - Places where to limit the search of suggestions : \"METROPOLE\" (Corsica and metropolitan France), \"DOMTOM\" (French overseas departments and territories), or an INSEE code of a department. No limitation by default. For instance : ['METROPOLE', '31']\n * @param {Number} [options.maximumResponses = 10] - Maximum number of responses.\n * @param {Function} options.onSuccess - Callback function for getting successful service response. Takes a {@link Gp.Services.AutoCompleteResponse} object as a parameter except if \"rawResponse\" is set to true.\n * @param {Function} [options.onFailure] - Callback function for handling unsuccessful service responses (timeOut, missing rights, ...). Takes a {@link Gp.Error} object as parameter.\n * @param {Number} [options.timeOut=0] - Number of milliseconds above which a timeOut response will be returned with onFailure callback (see above). Default value is 0 which means timeOut will not be handled.\n * @param {String} [options.serverUrl=http (s)://wxs.ign.fr/APIKEY/ols/apis/completion] - Web service URL. If used, options.apiKey parameter is ignored. Only use if you know what you're doing.\n * @param {String} [options.protocol=XHR] - Protocol used to handle dialog with web service. Possible values are 'JSONP' ({@link https://en.wikipedia.org/wiki/JSONP}) and 'XHR' ({@link https://en.wikipedia.org/wiki/XMLHttpRequest}). Only XHR protocol is supported in a NodeJS environment. Only use if you know what you're doing.\n * @param {String} [options.proxyURL] - Proxy URL to use when requesting underlying web service. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you're doing.\n * @param {String} [options.callbackSuffix] - Callback function name suffix to use in case of a JSONP protocol use (see above), to set your own suffix instead of auto-increment. Ignored when options.protocol is set to 'XHR' value. Only use if you know what you're doing.\n * @param {String} [options.httpMethod=GET] - HTTP method to use when requesting underlying web service in case of a XHR protocol use (see above). Possible values are 'GET' and 'POST'. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {String} [options.contentType=\"application/xml\"] - Content-Type to use when requesting underlying web service in case of a XHR protocol use (see above) and if method HTTP is POST. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {Boolean} [options.rawResponse=false] - Setting this parameter to true implies you want to handle the service response by yourself : it will be returned as an unparsed String in onSuccess callback parameter. Only use if you know what you are doing.\n * @param {Function} [options.onBeforeParse] - Callback function for handling service response before parsing (as an unparsed String). Takes a String as a parameter (the raw service response). Returns a String that will be parsed as the service response. Only use if you know what you are doing.\n */\n autoComplete : function (options) {\n var autoCompleteService = new AutoComplete(options);\n autoCompleteService.call();\n },\n /**\n * Getting a route from one point to another using the [route service of the Geoportal Platform]{@link https://geoservices.ign.fr/documentation/geoservices/itineraires.html}.\n *\n * @method route\n * @param {Object} options - Options for function call.\n * @param {String} options.apiKey - Access key to Geoportal platform, obtained [here]{@link http://professionnels.ign.fr/ign/contrats}.\n * @param {String} [options.routePreference = \"fastest\"] - Indicates the way to compute the route : \"fastest\" (time optimisation) or \"shortest\" (distance optimisation).\n * @param {Gp.Point} options.startPoint - Start point of the route. Expressed in CRS:84 coordinates system (startPoint.x corresponds to longitude, startPoint.y corresponds to latitude).\n * @param {Gp.Point} options.endPoint - End point of the route. Expressed in CRS:84 coordinates system (endPoint.x corresponds to longitude, endPoint.y corresponds to latitude).\n * @param {Array.} [options.viaPoints] - Ordered via Points of the route. Expressed in CRS:84 coordinates system (viaPoints[i].x corresponds to longitude, viaPoints[i].y corresponds to latitude).\n * @param {String} [options.graph = \"Voiture\"] - User profile to use to compute the route : \"Voiture\" (using a vehicule) or \"Pieton\" (pedestrian). Has an influence on the kind of roads the route may use and the average speed.\n * @param {Array.} [options.exclusions] - Indicates if route has to avoid some features (\"toll\", \"bridge\" or \"tunnel\").\n * @param {Boolean} [options.geometryInInstructions = false] - Indicates if route geometry has to be also returned with route instructions.\n * @param {Boolean} [options.provideBoundingBox = true] - Indicates if route instructions has to be localised with a BBOX in the response.\n * @param {String} [options.distanceUnit = \"km\"] - The unit used to provide distances in the response (\"m\" or \"km\").\n * @param {Function} options.onSuccess - Callback function for getting successful service response. Takes a {@link Gp.Services.RouteResponse} object as a parameter except if \"rawResponse\" is set to true.\n * @param {Function} [options.onFailure] - Callback function for handling unsuccessful service responses (timeOut, missing rights, ...). Takes a {@link Gp.Error} object as parameter.\n * @param {Number} [options.timeOut=0] - Number of milliseconds above which a timeOut response will be returned with onFailure callback (see above). Default value is 0 which means timeOut will not be handled.\n * @param {String} [options.outputFormat='json'] - Output format (\"json\" or \"xml\") to use for underlying webService. Only use if you know what you are doing.\n * @param {String} [options.serverUrl=http (s)://wxs.ign.fr/APIKEY/itineraire/rest/route.json] - Web service URL. If used, options.apiKey parameter is ignored. Only use if you know what you're doing.\n * @param {String} [options.protocol=XHR] - Protocol used to handle dialog with web service. Possible values are 'JSONP' ({@link https://en.wikipedia.org/wiki/JSONP}) and 'XHR' ({@link https://en.wikipedia.org/wiki/XMLHttpRequest}). Only XHR protocol is supported in a NodeJS environment. Only use if you know what you're doing.\n * @param {String} [options.proxyURL] - Proxy URL to use when requesting underlying web service. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you're doing.\n * @param {String} [options.callbackSuffix] - Callback function name suffix to use in case of a JSONP protocol use (see above), to set your own suffix instead of auto-increment. Ignored when options.protocol is set to 'XHR' value. Only use if you know what you're doing.\n * @param {String} [options.httpMethod=GET] - HTTP method to use when requesting underlying web service in case of a XHR protocol use (see above). Possible values are 'GET' and 'POST'. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {String} [options.contentType=\"application/xml\"] - Content-Type to use when requesting underlying web service in case of a XHR protocol use (see above) and if method HTTP is POST. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {Boolean} [options.rawResponse=false] - Setting this parameter to true implies you want to handle the service response by yourself : it will be returned as an unparsed String in onSuccess callback parameter. Only use if you know what you are doing.\n * @param {Function} [options.onBeforeParse] - Callback function for handling service response before parsing (as an unparsed String). Takes a String as a parameter (the raw service response). Returns a String that will be parsed as the service response. Only use if you know what you are doing.\n */\n route : function (options) {\n var routeService = new Route(options);\n routeService.call();\n },\n /**\n * Computing a set of places (curve) reachable from a given point (or from where to start to reach a given point) within a time or distance constraint using the [isochrone service of the Geoportal Platform]{@link https://geoservices.ign.fr/documentation/geoservices/isochrones.html}.\n *\n * @method isoCurve\n * @param {Object} options - Options for function call.\n * @param {String} options.apiKey - Access key to Geoportal platform, obtained [here]{@link http://professionnels.ign.fr/ign/contrats}.\n * @param {Gp.Point} options.position - Start or Arrival (options.reverse===true) Point for the computing. Expressed in CRS:84 coordinates system (position.x corresponds to longitude, position.y corresponds to latitude).\n * @param {String} [options.graph = \"Voiture\"] - User profile to use to compute the isoCurve : \"Voiture\" (using a vehicule) or \"Pieton\" (pedestrian). Has an influence on the kind of roads to use and the average speed.\n * @param {Array.} [options.exclusions] - Indicates if route has to avoid some features (\"toll\", \"bridge\" or \"tunnel\").\n * @param {String} [options.method = \"time\"] - Computing method to use : \"time\" (using a duration as a constraint) or \"distance\" (using a distance as a constraint).\n * @param {Float} options.time - Maximum duration (expressed in seconds) to use when options.method is set to \"time\".\n * @param {Float} options.distance - Maximum distance (expressed in meters) to use when options.method is set to \"distance\".\n * @param {Boolean} [options.reverse = false] - Set this parameter to true if you want options.position to be the destination (instead of departure) for the computing.\n * @param {Boolean} [options.smoothing = false] - Set this parameter to true if you want the resulting geometry to be smoothed.\n * @param {Boolean} [options.holes = false] - Set this parameter to true if you want the resulting geometry (polygon) to have holes if pertinent.\n * @param {Function} options.onSuccess - Callback function for getting successful service response. Takes a {@link Gp.Services.IsoCurveResponse} object as a parameter except if \"rawResponse\" is set to true.\n * @param {Function} [options.onFailure] - Callback function for handling unsuccessful service responses (timeOut, missing rights, ...). Takes a {@link Gp.Error} object as parameter.\n * @param {Number} [options.timeOut=0] - Number of milliseconds above which a timeOut response will be returned with onFailure callback (see above). Default value is 0 which means timeOut will not be handled.\n * @param {String} [options.outputFormat='json'] - Output format (\"json\" or \"xml\") to use for underlying webService. Only use if you know what you are doing.\n * @param {String} [options.serverUrl=http (s)://wxs.ign.fr/APIKEY/isochrone/isochrone.json] - Web service URL. If used, options.apiKey parameter is ignored. Only use if you know what you're doing.\n * @param {String} [options.protocol=XHR] - Protocol used to handle dialog with web service. Possible values are 'JSONP' ({@link https://en.wikipedia.org/wiki/JSONP}) and 'XHR' ({@link https://en.wikipedia.org/wiki/XMLHttpRequest}). Only XHR protocol is supported in a NodeJS environment. Only use if you know what you're doing.\n * @param {String} [options.proxyURL] - Proxy URL to use when requesting underlying web service. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you're doing.\n * @param {String} [options.callbackSuffix] - Callback function name suffix to use in case of a JSONP protocol use (see above), to set your own suffix instead of auto-increment. Ignored when options.protocol is set to 'XHR' value. Only use if you know what you're doing.\n * @param {String} [options.httpMethod=GET] - HTTP method to use when requesting underlying web service in case of a XHR protocol use (see above). Possible values are 'GET' and 'POST'. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {String} [options.contentType=\"application/xml\"] - Content-Type to use when requesting underlying web service in case of a XHR protocol use (see above) and if method HTTP is POST. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {Boolean} [options.rawResponse=false] - Setting this parameter to true implies you want to handle the service response by yourself : it will be returned as an unparsed String in onSuccess callback parameter. Only use if you know what you are doing.\n * @param {Function} [options.onBeforeParse] - Callback function for handling service response before parsing (as an unparsed String). Takes a String as a parameter (the raw service response). Returns a String that will be parsed as the service response. Only use if you know what you are doing.\n */\n isoCurve : function (options) {\n var processIsoCurveService = new ProcessIsoCurve(options);\n processIsoCurveService.call();\n }\n};\n\n/**\n * Point object.\n *\n * @namespace\n * @alias Gp.Point\n *\n * @property {Float} x - Point abscissa\n * @property {Float} y - Point ordinate\n */\nvar point = {};\n\n/**\n * Circle object.\n *\n * @namespace\n * @alias Gp.Circle\n *\n * @property {Float} x - Circle center abscissa.\n * @property {Float} y - Circle center ordinate.\n * @property {Float} radius - Circle radius.\n */\nvar circle = {};\n\n/**\n * Bounding box object, expressed with four coordinates.\n *\n * @namespace\n * @alias Gp.BBox\n *\n * @property {Float} left - minimum abscissa\n * @property {Float} right - maximum abscissa\n * @property {Float} bottom - minimum ordinate\n * @property {Float} top - maximum ordinate\n */\nvar bbox = {};\n\nexport default Services;\n" - }, - { - "id": 46, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Alti.js", - "name": "./src/Services/Alti/Alti.js", - "index": 3, - "index2": 27, - "size": 8785, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Services.js", - "issuerId": 45, - "issuerName": "./src/Services/Services.js", - "profile": { - "factory": 512, - "building": 54, - "dependencies": 2 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 45, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Services.js", - "module": "./src/Services/Services.js", - "moduleName": "./src/Services/Services.js", - "type": "harmony import", - "userRequest": "./Alti/Alti", - "loc": "9:0-31" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 3, - "source": "\nimport Logger from \"../../Utils/LoggerByDefault\";\nimport _ from \"../../Utils/MessagesResources\";\nimport ErrorService from \"../../Exceptions/ErrorService\";\nimport CommonService from \"../CommonService\";\nimport DefaultUrlService from \"../DefaultUrlService\";\nimport AltiRequestFactory from \"./Request/AltiRequestFactory\";\nimport AltiResponseFactory from \"./Response/AltiResponseFactory\";\n\n/**\n * @classdesc\n *\n * Appel du service d'altimétrie du Géoportail\n *\n * @todo gestion du parma. output et callback\n * @todo outputFormat (REST) et format (WPS)\n * @todo La reponse JSON peut encapsuler un XML !\n *\n * @constructor\n * @extends {Gp.Services.CommonService}\n * @alias Gp.Services.Alti\n * @param {Object} options - options spécifiques au service (+ les options heritées)\n *\n * @param {Array.} options.positions - Tableau ({lon:float,lat:float}) contenant les coordonnées des points (CRS:84)\n * dont on veut connaître les altitudes (ou à partir desquelles on va calculer le profil).\n * Chaque élément du tableau est un objet JavaScript avec deux attributs : lon et lat, qui sont des flottants.\n * Minimum 2 éléments si on souhaite calculer un profil altimétrique (ElevationLine).\n * Maximum 50 éléments.\n *\n * @param {String} options.outputFormat - Le format de la réponse du service alti : 'xml' ou 'json'.\n * Ce paramètre déterminera l'extension '.xml' ou '.json' du service dans le cas de l'API REST,\n * ou la valeur du paramètre 'format' dans le cas de la norme WPS.\n * Nécessaire si serverUrl est renseigné, et qu'on souhaite passer par l'API REST,\n * pour connaître le format dans lequel sera fournie la réponse (pour son traitement).\n * Non nécessaire pour la norme WPS. Par défaut, ce paramètre vaut 'json'.\n *\n * @param {Number} [options.sampling] - Nombre de points à utiliser pour déterminer le tracé d'un profil altimétrique, compris entre 2 et 5000.\n * A spécifier lorsqu'on souhaite accéder à cette fonctionnalité.\n * Dans ce cas, les points fournis en entrée (au minimum de deux) servent à déterminer l'axe planimétrique\n * le long duquel le profil doit être calculé.\n * Si le paramètre sampling n'est pas spécifié ou moins de deux points sont fournis,\n * c'est le service Elevation qui sera interrogé (altitudes simples calculées pour les points fournis).\n * Une valeur de sampling strictement inférieure à 2 déclenchera un échantillonnage avec la valeur par défaut du service (3 points).\n *\n * @param {String} [options.api] - Manière d'accéder au service : 'REST' (via l'API REST) ou 'WPS' (via la norme WPS).\n * Par défaut, on utilise l'API REST.\n *\n * @param {Boolean} [options.zonly] - Permet de ne récupérer que les altitudes en sortie s'il vaut 'true'.\n * Vaut 'false' par défaut.\n *\n * @example\n * var options = {\n * apiKey : null,\n * serverUrl : 'http://localhost/service/',\n * protocol : 'JSONP', // JSONP|XHR\n * proxyURL : null,\n * httpMethod : 'GET', // GET|POST\n * timeOut : 10000, // ms\n * rawResponse : false, // true|false\n * scope : null, // this\n * onSuccess : function (response) {},\n * onFailure : function (error) {},\n * // spécifique au service\n * positions : [{lon:, lat:}, {lon:, lat:}],\n * outputFormat : 'json' // json|xml\n * sampling : 3,\n * api : 'REST', // REST|WPS\n * zonly : false // false|true\n * };\n *\n * @private\n */\nfunction Alti (options) {\n if (!(this instanceof Alti)) {\n throw new TypeError(_.getMessage(\"CLASS_CONSTRUCTOR\", \"Alti\"));\n }\n\n /**\n * Nom de la classe (heritage)\n * FIXME instance ou classe ?\n */\n this.CLASSNAME = \"Alti\";\n\n // appel du constructeur par heritage\n CommonService.apply(this, arguments);\n\n this.logger = Logger.getLogger(\"Gp.Services.Alti\");\n this.logger.trace(\"[Constructeur Alti (options)]\");\n\n // #####################\n // analyse des options\n // #####################\n\n if (!options.positions) {\n throw new Error(_.getMessage(\"PARAM_MISSING\", \"positions\"));\n }\n\n if (options.positions.length === 0) {\n throw new Error(_.getMessage(\"PARAM_EMPTY\", \"positions\"));\n }\n\n // ajout des options spécifiques au service\n this.options.positions = options.positions;\n\n // format de réponse du service : \"json\" ou \"xml\" (valeur par défaut), en minuscule !\n this.options.outputFormat = (typeof options.outputFormat === \"string\") ? options.outputFormat.toLowerCase() : \"xml\";\n\n // sampling\n this.options.sampling = options.sampling || null;\n\n // type d'api utilisé pour requeter le service, en majuscule !\n this.options.api = (typeof options.api === \"string\") ? options.api.toUpperCase() : \"REST\";\n\n // l'api ne peut être interrogée qu'en GET.\n if (this.options.api === \"REST\") {\n this.options.httpMethod = \"GET\";\n }\n\n // param. zonly\n this.options.zonly = options.zonly || false;\n\n // gestion de l'url du service par defaut\n // si l'url n'est pas renseignée, il faut utiliser les urls par defaut\n // en fonction du type d'api, REST ou WPS, du format de reponse demandé (outputFormat)\n // ainsi que sur le type de service (profil ou elevation)\n if (!this.options.serverUrl) {\n var lstUrlByDefault = DefaultUrlService.Alti.url(this.options.apiKey);\n var urlFound = null;\n switch (this.options.api) {\n case \"WPS\":\n urlFound = lstUrlByDefault.wps;\n break;\n case \"REST\":\n var key = (options.sampling ? \"profil\" : \"elevation\") + \"-\" + this.options.outputFormat;\n urlFound = lstUrlByDefault[key];\n break;\n default:\n throw new Error(_.getMessage(\"PARAM_UNKNOWN\", \"api\"));\n }\n\n if (!urlFound) {\n throw new Error(\"Url by default not found !\");\n }\n this.options.serverUrl = urlFound;\n this.logger.trace(\"Server URL by default : \" + this.options.serverUrl);\n }\n\n // gestion du type de service\n // si l'extension de l'url est .json ou .xml, on surcharge le format de sortie (outputFormat)\n var idx = this.options.serverUrl.lastIndexOf(\".\");\n if (idx !== -1) {\n var extension = this.options.serverUrl.substring(idx + 1);\n if (extension && extension.length < 5) { // FIXME extension de moins de 4 car. ...\n this.logger.trace(\"Server Extension URL : \" + extension);\n switch (extension.toLowerCase()) {\n case \"json\":\n case \"xml\":\n this.options.outputFormat = extension.toLowerCase();\n break;\n default:\n throw new Error(\"type of service : unknown or unsupported (json or xml) !\");\n }\n }\n }\n}\n\n/**\n * @lends module:Alti#\n */\nAlti.prototype = Object.create(CommonService.prototype, {\n // todo\n // getter/setter\n});\n\n/**\n * Constructeur (alias)\n */\nAlti.prototype.constructor = Alti;\n\n/**\n * Création de la requête (overwrite)\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nAlti.prototype.buildRequest = function (error, success) {\n // utilisation en mode callback\n var options = {\n httpMethod : this.options.httpMethod,\n // callback\n onSuccess : function (result) {\n // sauvegarde de la requete !\n this.request = result;\n success.call(this, this.request);\n },\n onError : error,\n scope : this,\n // spécifique au service :\n positions : this.options.positions,\n outputFormat : this.options.outputFormat,\n sampling : this.options.sampling,\n api : this.options.api,\n zonly : this.options.zonly\n };\n\n AltiRequestFactory.build(options);\n};\n\n/**\n * Analyse de la reponse (overwrite)\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nAlti.prototype.analyzeResponse = function (error, success) {\n // INFO\n // Factory pour masquer la complexité du retour du service qui renvoie soit\n // - une 'string' qui contient du XML ou JSON natif en mode XHR\n // - un objet JSON qui est natif ou encapsulé\n\n if (this.response) {\n var options = {\n response : this.response,\n outputFormat : this.options.outputFormat, // utile pour parser la string en mode XHR : JSON ou XML !\n rawResponse : this.options.rawResponse,\n onError : error,\n onSuccess : success,\n scope : this\n };\n\n AltiResponseFactory.build(options);\n } else {\n error.call(this, new ErrorService(_.getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n }\n};\n\nexport default Alti;\n" - }, - { - "id": 47, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/loglevel/lib/loglevel.js", - "name": "./node_modules/loglevel/lib/loglevel.js", - "index": 5, - "index2": 0, - "size": 7862, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Utils/LoggerByDefault.js", - "issuerId": 0, - "issuerName": "./src/Utils/LoggerByDefault.js", - "profile": { - "factory": 610, - "building": 988 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 0, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Utils/LoggerByDefault.js", - "module": "./src/Utils/LoggerByDefault.js", - "moduleName": "./src/Utils/LoggerByDefault.js", - "type": "harmony import", - "userRequest": "loglevel", - "loc": "2:0-32" - } - ], - "usedExports": [ - "enableAll", - "getLogger" - ], - "providedExports": null, - "optimizationBailout": [], - "depth": 4, - "source": "/*\n* loglevel - https://github.com/pimterry/loglevel\n*\n* Copyright (c) 2013 Tim Perry\n* Licensed under the MIT license.\n*/\n(function (root, definition) {\n \"use strict\";\n if (typeof define === 'function' && define.amd) {\n define(definition);\n } else if (typeof module === 'object' && module.exports) {\n module.exports = definition();\n } else {\n root.log = definition();\n }\n}(this, function () {\n \"use strict\";\n\n // Slightly dubious tricks to cut down minimized file size\n var noop = function() {};\n var undefinedType = \"undefined\";\n\n var logMethods = [\n \"trace\",\n \"debug\",\n \"info\",\n \"warn\",\n \"error\"\n ];\n\n // Cross-browser bind equivalent that works at least back to IE6\n function bindMethod(obj, methodName) {\n var method = obj[methodName];\n if (typeof method.bind === 'function') {\n return method.bind(obj);\n } else {\n try {\n return Function.prototype.bind.call(method, obj);\n } catch (e) {\n // Missing bind shim or IE8 + Modernizr, fallback to wrapping\n return function() {\n return Function.prototype.apply.apply(method, [obj, arguments]);\n };\n }\n }\n }\n\n // Build the best logging method possible for this env\n // Wherever possible we want to bind, not wrap, to preserve stack traces\n function realMethod(methodName) {\n if (methodName === 'debug') {\n methodName = 'log';\n }\n\n if (typeof console === undefinedType) {\n return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives\n } else if (console[methodName] !== undefined) {\n return bindMethod(console, methodName);\n } else if (console.log !== undefined) {\n return bindMethod(console, 'log');\n } else {\n return noop;\n }\n }\n\n // These private functions always need `this` to be set properly\n\n function replaceLoggingMethods(level, loggerName) {\n /*jshint validthis:true */\n for (var i = 0; i < logMethods.length; i++) {\n var methodName = logMethods[i];\n this[methodName] = (i < level) ?\n noop :\n this.methodFactory(methodName, level, loggerName);\n }\n\n // Define log.log as an alias for log.debug\n this.log = this.debug;\n }\n\n // In old IE versions, the console isn't present until you first open it.\n // We build realMethod() replacements here that regenerate logging methods\n function enableLoggingWhenConsoleArrives(methodName, level, loggerName) {\n return function () {\n if (typeof console !== undefinedType) {\n replaceLoggingMethods.call(this, level, loggerName);\n this[methodName].apply(this, arguments);\n }\n };\n }\n\n // By default, we use closely bound real methods wherever possible, and\n // otherwise we wait for a console to appear, and then try again.\n function defaultMethodFactory(methodName, level, loggerName) {\n /*jshint validthis:true */\n return realMethod(methodName) ||\n enableLoggingWhenConsoleArrives.apply(this, arguments);\n }\n\n function Logger(name, defaultLevel, factory) {\n var self = this;\n var currentLevel;\n var storageKey = \"loglevel\";\n if (name) {\n storageKey += \":\" + name;\n }\n\n function persistLevelIfPossible(levelNum) {\n var levelName = (logMethods[levelNum] || 'silent').toUpperCase();\n\n if (typeof window === undefinedType) return;\n\n // Use localStorage if available\n try {\n window.localStorage[storageKey] = levelName;\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=\" + levelName + \";\";\n } catch (ignore) {}\n }\n\n function getPersistedLevel() {\n var storedLevel;\n\n if (typeof window === undefinedType) return;\n\n try {\n storedLevel = window.localStorage[storageKey];\n } catch (ignore) {}\n\n // Fallback to cookies if local storage gives us nothing\n if (typeof storedLevel === undefinedType) {\n try {\n var cookie = window.document.cookie;\n var location = cookie.indexOf(\n encodeURIComponent(storageKey) + \"=\");\n if (location !== -1) {\n storedLevel = /^([^;]+)/.exec(cookie.slice(location))[1];\n }\n } catch (ignore) {}\n }\n\n // If the stored level is not valid, treat it as if nothing was stored.\n if (self.levels[storedLevel] === undefined) {\n storedLevel = undefined;\n }\n\n return storedLevel;\n }\n\n /*\n *\n * Public logger API - see https://github.com/pimterry/loglevel for details\n *\n */\n\n self.name = name;\n\n self.levels = { \"TRACE\": 0, \"DEBUG\": 1, \"INFO\": 2, \"WARN\": 3,\n \"ERROR\": 4, \"SILENT\": 5};\n\n self.methodFactory = factory || defaultMethodFactory;\n\n self.getLevel = function () {\n return currentLevel;\n };\n\n self.setLevel = function (level, persist) {\n if (typeof level === \"string\" && self.levels[level.toUpperCase()] !== undefined) {\n level = self.levels[level.toUpperCase()];\n }\n if (typeof level === \"number\" && level >= 0 && level <= self.levels.SILENT) {\n currentLevel = level;\n if (persist !== false) { // defaults to true\n persistLevelIfPossible(level);\n }\n replaceLoggingMethods.call(self, level, name);\n if (typeof console === undefinedType && level < self.levels.SILENT) {\n return \"No console available for logging\";\n }\n } else {\n throw \"log.setLevel() called with invalid level: \" + level;\n }\n };\n\n self.setDefaultLevel = function (level) {\n if (!getPersistedLevel()) {\n self.setLevel(level, false);\n }\n };\n\n self.enableAll = function(persist) {\n self.setLevel(self.levels.TRACE, persist);\n };\n\n self.disableAll = function(persist) {\n self.setLevel(self.levels.SILENT, persist);\n };\n\n // Initialize with the right level\n var initialLevel = getPersistedLevel();\n if (initialLevel == null) {\n initialLevel = defaultLevel == null ? \"WARN\" : defaultLevel;\n }\n self.setLevel(initialLevel, false);\n }\n\n /*\n *\n * Top-level API\n *\n */\n\n var defaultLogger = new Logger();\n\n var _loggersByName = {};\n defaultLogger.getLogger = function getLogger(name) {\n if (typeof name !== \"string\" || name === \"\") {\n throw new TypeError(\"You must supply a name when creating a logger.\");\n }\n\n var logger = _loggersByName[name];\n if (!logger) {\n logger = _loggersByName[name] = new Logger(\n name, defaultLogger.getLevel(), defaultLogger.methodFactory);\n }\n return logger;\n };\n\n // Grab the current global log variable in case of overwrite\n var _log = (typeof window !== undefinedType) ? window.log : undefined;\n defaultLogger.noConflict = function() {\n if (typeof window !== undefinedType &&\n window.log === defaultLogger) {\n window.log = _log;\n }\n\n return defaultLogger;\n };\n\n defaultLogger.getLoggers = function getLoggers() {\n return _loggersByName;\n };\n\n return defaultLogger;\n}));\n" - }, - { - "id": 48, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Protocols/Protocol.js", - "name": "./src/Protocols/Protocol.js", - "index": 10, - "index2": 12, - "size": 6108, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/CommonService.js", - "issuerId": 3, - "issuerName": "./src/Services/CommonService.js", - "profile": { - "factory": 451, - "building": 32, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 1, - "reasons": [ - { - "moduleId": 3, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/CommonService.js", - "module": "./src/Services/CommonService.js", - "moduleName": "./src/Services/CommonService.js", - "type": "harmony import", - "userRequest": "../Protocols/Protocol", - "loc": "4:0-45" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "/**\n * Protocols : Interface de dialogue avec les webservices\n *\n * @module Protocols\n * @private\n * @alias Gp.Protocols.Protocols\n */\nimport Helper from \"../Utils/Helper\";\nimport XHR from \"./XHR\";\nimport JSONP from \"./JSONP\";\n\nvar Protocol = {\n\n /**\n * Interface unique d\"envoi d\"une requête.\n *\n * @method send\n * @static\n * @param {Object} options - options generales\n * @param {String} options.url - url du service\n * @param {String} options.method - GET, POST, PUT, DELETE\n * @param {String} options.protocol - XHR | JSONP\n * @param {String} options.format - format de la reponse du service : json, xml ou null (brute)...\n * @param {String} options.wrap - encapsuler la reponse du service dans du JSON : true|false (true par defaut sur le protocole JSONP)\n * @param {String} options.callbackSuffix - suffixe de la fonction de callback (JSONP uniquement) (ex: si callbackSuffix=\"\", la fonction s'appellera \"callback\")\n * @param {String} options.timeOut - 0 ms\n * @param {Boolean} options.nocache - true|false\n * @param {Object|String} options.data - content (post) ou param (get)\n * @param {Object|String} options.headers - (post) ex. referer\n * @param {Object|String} options.content - (post) ex. \"application/json\"\n * @param {String} options.scope - this (TODO)\n * @param {Function} options.onResponse - callback\n * @param {Function} options.onFailure - callback\n * @param {Function} options.onTimeOut - callback\n * @param {String} options.proxyUrl - (TODO)\n */\n send : function (options) {\n // INFO\n // \"output\" - param est interne à la classe \"Protocol\" (parametrable via \"wrap\"), et à ajouter à l\"url\n // ce param est independant du service car il est géré par le filtre LUA :\n // ex. json|xml (json par defaut).\n // Ce param. permet d\"encapsuler du XML dans du JSON :\n // {http : {status:200, error:null},xml :\"réponse du service\"}\n // Utile pour les services qui ne repondent que du XML (ex. Geocodage)\n //\n // |-------------------------------------------------|\n // | \\service | | | |\n // | output\\ format| json | xml | remarques |\n // |--------\\------|------|-----|--------------------|\n // | json | json | json| json/xml encapsulé |\n // | xml | json | xml | param inactif |\n // |-------------------------------------------------|\n // ex. le service demande une reponse native au \"format\" json et avec un \"output\" json.\n // on a donc une reponse json encapsulé dans un json : ce qu'on ne souhaite pas !\n // dans ce cas on ne renseigne pas output=json\n\n // INFO\n // \"wrap\" - choix d\"encapsuler ou non les reponses dans du JSON.\n // Par defaut, on encapsule uniquement les reponses sur le protocole JSONP (et qui sont en xml) !\n\n // INFO\n // \"callback\" - param est interne à la classe \"Protocol\" (non parametrable), et à ajouter à l\"url\n // ce param est independant du service car il est géré aussi par le filtre LUA :\n // ex. callback|null\n // Ce param. permet de renvoyer une reponse javascript :\n // callback ({http : {status:200, error:null},xml :\"réponse du service\"})\n // Ce param. est non renseigné par defaut car pour du JSONP, on utilise le\n // le protocol JSONP, et ce dernier implemente déjà le callback !\n\n // settings par defaut\n var settings = options || {\n method : \"GET\",\n // protocol : \"JSONP\",\n protocol : \"XHR\",\n timeOut : 0,\n format : null,\n wrap : true,\n nocache : true,\n output : \"json\",\n callback : null,\n callbackSuffix : null\n };\n\n // on determine l'environnement d'execution : browser ou non ?\n // et on stoppe pour nodeJS... sur un protocole JSONP !\n if (typeof window === \"undefined\" && options.protocol === \"JSONP\") {\n console.log(\"Value (s) for parameter (s) 'protocol=JSONP (instead use XHR)' not supported to NodeJS\");\n return;\n }\n\n if (options.protocol === \"XHR\" || options.format === \"json\") {\n settings.wrap = false;\n } else if (options.protocol === \"JSONP\" && options.format === \"xml\") {\n settings.wrap = true;\n }\n\n settings.callback = (options.protocol === \"JSONP\") ? null : null; // FIXME non géré !?\n settings.output = settings.wrap ? \"json\" : null;\n\n // on encapsule les reponses dans un objet JSON\n if (settings.wrap) {\n var params = {};\n params.output = settings.output;\n params.callback = settings.callback;\n delete params.callback; // FIXME non géré !?\n settings.url = Helper.normalyzeUrl(options.url, params);\n }\n\n // choix de l\"implementation :\n // XHR ou JSONP\n switch (settings.protocol) {\n case \"XHR\":\n // on normalise l'url (gestion du cache)\n if (options.method === \"GET\" && options.nocache) {\n settings.url = Helper.normalyzeUrl(settings.url, {\n t : new Date().getTime()\n });\n }\n // appel du service en XHR\n XHR.call(settings);\n break;\n case \"JSONP\":\n\n // on normalise l'url si les params. sont renseignés dans la string|object \"data\"\n if (settings.data) {\n settings.url = Helper.normalyzeUrl(settings.url, settings.data);\n }\n\n // appel du service en JSONP\n JSONP.call(settings);\n break;\n default:\n throw new Error(\"protocol not supported (XHR|JSONP) !\");\n }\n }\n\n};\n\nexport default Protocol;\n" - }, - { - "id": 49, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/es6-promise/dist/es6-promise.js", - "name": "./node_modules/es6-promise/dist/es6-promise.js", - "index": 12, - "index2": 7, - "size": 29288, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Protocols/XHR.js", - "issuerId": 19, - "issuerName": "./src/Protocols/XHR.js", - "profile": { - "factory": 812, - "building": 398 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 19, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Protocols/XHR.js", - "module": "./src/Protocols/XHR.js", - "moduleName": "./src/Protocols/XHR.js", - "type": "harmony import", - "userRequest": "es6-promise", - "loc": "5:0-37" - } - ], - "usedExports": [ - "default" - ], - "providedExports": null, - "optimizationBailout": [], - "depth": 3, - "source": "/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.4+314e4831\n */\n\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.ES6Promise = factory());\n}(this, (function () { 'use strict';\n\nfunction objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\n\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nvar isArray = _isArray;\n\nvar len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}\n\nfunction then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve$1(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n resolve(promise, object);\n return promise;\n}\n\nvar PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar TRY_CATCH_ERROR = { error: null };\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n TRY_CATCH_ERROR.error = error;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) {\n try {\n then$$1.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then$$1) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then$$1, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then$$1) {\n if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then$$1 === TRY_CATCH_ERROR) {\n reject(promise, TRY_CATCH_ERROR.error);\n TRY_CATCH_ERROR.error = null;\n } else if (then$$1 === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then$$1)) {\n handleForeignThenable(promise, maybeThenable, then$$1);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = void 0,\n failed = void 0;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n}\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve$$1 = c.resolve;\n\n\n if (resolve$$1 === resolve$1) {\n var _then = getThen(entry);\n\n if (_then === then && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise$1) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve$$1) {\n return resolve$$1(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve$$1(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all(entries) {\n return new Enumerator(this, entries).promise;\n}\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject$1(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n reject(promise, reason);\n return promise;\n}\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise$1 = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n };\n\n return Promise;\n}();\n\nPromise$1.prototype.then = then;\nPromise$1.all = all;\nPromise$1.race = race;\nPromise$1.resolve = resolve$1;\nPromise$1.reject = reject$1;\nPromise$1._setScheduler = setScheduler;\nPromise$1._setAsap = setAsap;\nPromise$1._asap = asap;\n\n/*global self*/\nfunction polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise$1;\n}\n\n// Strange compat..\nPromise$1.polyfill = polyfill;\nPromise$1.Promise = Promise$1;\n\nreturn Promise$1;\n\n})));\n\n\n\n//# sourceMappingURL=es6-promise.map\n" - }, - { - "id": 50, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/process/browser.js", - "name": "./node_modules/process/browser.js", - "index": 13, - "index2": 5, - "size": 5418, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/es6-promise/dist/es6-promise.js", - "issuerId": 49, - "issuerName": "./node_modules/es6-promise/dist/es6-promise.js", - "profile": { - "factory": 152, - "building": 984 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 49, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/es6-promise/dist/es6-promise.js", - "module": "./node_modules/es6-promise/dist/es6-promise.js", - "moduleName": "./node_modules/es6-promise/dist/es6-promise.js", - "type": "cjs require", - "userRequest": "process", - "loc": "1:0-37" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [], - "depth": 4, - "source": "// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n" - }, - { - "id": 51, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/webpack/buildin/global.js", - "name": "(webpack)/buildin/global.js", - "index": 14, - "index2": 6, - "size": 509, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/es6-promise/dist/es6-promise.js", - "issuerId": 49, - "issuerName": "./node_modules/es6-promise/dist/es6-promise.js", - "profile": { - "factory": 177, - "building": 965 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 49, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/es6-promise/dist/es6-promise.js", - "module": "./node_modules/es6-promise/dist/es6-promise.js", - "moduleName": "./node_modules/es6-promise/dist/es6-promise.js", - "type": "cjs require", - "userRequest": "global", - "loc": "1:0-44" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [], - "depth": 4, - "source": "var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n" - }, - { - "id": 52, - "identifier": "external {\"commonjs2\":\"request\",\"commonjs\":\"request\",\"amd\":\"require\"}", - "name": "external {\"commonjs2\":\"request\",\"commonjs\":\"request\",\"amd\":\"require\"}", - "index": 15, - "index2": 8, - "size": 42, - "cacheable": false, - "built": false, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Protocols/XHR.js", - "issuerId": 19, - "issuerName": "./src/Protocols/XHR.js", - "profile": { - "factory": 1, - "building": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 19, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Protocols/XHR.js", - "module": "./src/Protocols/XHR.js", - "moduleName": "./src/Protocols/XHR.js", - "type": "cjs require", - "userRequest": "request", - "loc": "162:30-48" - } - ], - "usedExports": true, - "providedExports": null, - "optimizationBailout": [], - "depth": 3 - }, - { - "id": 53, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Protocols/JSONP.js", - "name": "./src/Protocols/JSONP.js", - "index": 17, - "index2": 11, - "size": 10034, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Protocols/Protocol.js", - "issuerId": 48, - "issuerName": "./src/Protocols/Protocol.js", - "profile": { - "factory": 966, - "building": 49, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 1, - "reasons": [ - { - "moduleId": 48, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Protocols/Protocol.js", - "module": "./src/Protocols/Protocol.js", - "moduleName": "./src/Protocols/Protocol.js", - "type": "harmony import", - "userRequest": "./JSONP", - "loc": "10:0-28" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 6, - "source": "/**\n * JSONP : Implémentation du protocole JSONP de la plateforme Géoportail (cf. {@link https://github.com/sobstel/jsonp.js}).\n *\n * @module JSONP\n * @private\n * @alias Gp.Protocols.JSONP\n */\nimport Logger from \"../Utils/LoggerByDefault\";\n\nvar JSONP = {\n\n /**\n * Construction d'un identifiant statique basé sur le timestamp,\n * et qui s'incremente de +1 à chaque appel\n */\n uuid : (function () {\n var id = Math.floor(Date.now());\n return function () {\n return id++;\n };\n })(),\n\n /**\n * Cette fonction réalise l'appel du service fourni via le paramètre \"options.url\"\n * en mettant en œuvre le protocole JSONP.\n *\n * @method call\n * @static\n * @param {Object} options - parametres d'invocation du service en JSONP\n * @param {String} options.url - URL du service à invoquer (indépendamment du protocole JSONP).\n * Cette URL contient déjà les paramètres du service.\n * Si le paramètre dédié à la mise en oeuvre du protocole JSONP (callback=xxx) n'est pas présent, il est rajouté par la fonction ;\n * sa valeur est déterminée en fonction du paramètre callbackName.\n * @param {Number} [options.timeOut = 0] - Nombre de ms au bout duquel on considère que le service n'a pas répondu.\n * Une valeur de 0 pour ce paramètre permet de désactiver la gestion du timeOut.\n * @param {String} [options.callbackSuffix = null] - Suffixe de la fonction de callback à rajouter sur l'URL.\n * Si aucun suffixe n'est spécifié (cas par défaut), on utilisera l'identifiant this.uuid () comme suffixe. Ex: \"callback1458574396582 ()\"\n * @param {String} [options.callbackName = gp.protocol.jsonp] - Valeur du paramètre callback à rajouter sur l'URL.\n * Si l'URL fournie contient déjà le paramètre callback, le paramètre callbackName ne sera pas pris en compte.\n * La fonction de callback est créée dynamiquement par la fonction JSONP ;\n * elle a deux fonctions :\n * elle annule la condition de timeOut\n * puis appelle la fonction fournie par l'utilisateur via le paramètre onResponse.\n * @param {Function} options.onResponse - Nom de la fonction qui sera appelée lors de la réception des résultats du service.\n * Ce paramètre sera ignoré si l'URL contient déjà le paramètre callback.\n * La fonction de rappel appelée sera alors celle ayant pour nom la valeur de ce paramètre.\n * @param {Function} [options.onTimeOut] - Nom de la fonction qui sera appelée en cas de non réponse du service.\n * Le temps au bout duquel on considère que le service n'a pas répondu est déterminé par le paramètre timeOut.\n * @example\n * var options = {\n * url : 'http://localhost/some/test.json&callback=myResults',\n * timeOut : 100,\n * callbackName : 'myResults',\n * callbackSuffix : \"\",\n * onResponse : function (response) {\n * console.log('results : ', response);\n * },\n *\n * };\n * JSONP.call(options);\n */\n call : function (options) {\n // logger\n var logger = Logger.getLogger(\"JSONP\");\n logger.trace(\"[JSONP::call ()]\");\n\n // analyse parametres\n\n if (!options) {\n logger.error(\"missing parameter : options !\");\n throw new Error(\"missing parameter : options !\");\n }\n\n if (!options.url) {\n logger.error(\"missing parameter : options.url !\");\n throw new Error(\"missing parameter : options.url !\");\n }\n\n if (!options.timeOut) {\n logger.info(\"setting 'options.timeOut' default value\");\n options.timeOut = 0;\n }\n\n // FIXME si un callback coté client a été mis en place,\n // cette condition sur cette methode n'a pas de sens !?\n if (!options.onResponse) {\n logger.error(\"missing parameter : options.onResponse !\");\n throw new Error(\"missing parameter : options.onResponse !\");\n // FIXME doit on definir un callback interne par defaut !?\n // options.onResponse = function (data) {\n // console.log(\"response callback (inner) : \", data);\n // };\n }\n\n // ID du callback à utiliser : null ou string.\n // si l'utilisateur a spécifié un suffixe pour le callback, on le récupère comme un ID (ex: options.callbackSuffix = \"\")\n // sinon, on utilise un timestamp : this.uuid ()\n var callbackId = (typeof options.callbackSuffix === \"string\") ? options.callbackSuffix : this.uuid();\n\n // on recherche le parametre callback et son nom de fonction dans l'url\n var urlHasCallbackKey = false;\n var urlHasCallbackName = false;\n\n var idx = options.url.indexOf(\"callback=\");\n\n if (idx !== -1) {\n urlHasCallbackKey = true;\n // extraction callbackName de l'url : entre \"callback=\" et \"&\" ou fin de ligne\n var j = options.url.indexOf(\"&\", idx);\n if (j === -1) {\n j = options.url.length;\n }\n\n // on ecrase le parametre options.callbackName s'il avait été défini\n var callbackName = options.url.substring(idx + 9, j);\n\n if (callbackName) {\n urlHasCallbackName = true;\n options.callbackName = callbackName;\n logger.info(\"setting 'options.callbackName' value (\" + options.callbackName + \") from 'options.url' parameter\");\n }\n }\n\n // on ajoute le parametre callback dans l'URL s'il n'existe pas\n if (!urlHasCallbackKey) {\n // gestion des autres param. et \"?\"\n var k = options.url.indexOf(\"?\");\n if (k === -1) {\n // aucun param., ni de '?'\n options.url = options.url + \"?\" + \"callback=\";\n } else if (k === options.url.length) {\n // uniquement le '?'\n options.url = options.url + \"callback=\";\n } else {\n // le '?' et les param. existent\n options.url = options.url + \"&\" + \"callback=\";\n }\n logger.info(\"setting callback default key in 'options.url' : \" + options.url);\n }\n\n // utilisation de la fonction callback coté client ?\n var HasCallbackName = options.callbackName ? true : urlHasCallbackName;\n\n // on ajoute le nom de la fonction callback dans l'URL si elle n'existe pas\n if (!urlHasCallbackName) {\n // fonction callback par defaut\n if (!options.callbackName) {\n logger.info(\"setting 'options.callbackName' default value\");\n options.callbackName = \"callback\"; // ou \"gp.protocol.jsonp\" ?\n // info : si on ne veut pas gerer d'ID dans le callback,\n // options.callbackSuffix = \"\"\n if (callbackId || callbackId === \"\") {\n options.callbackName += callbackId;\n }\n }\n options.url = options.url.replace(\"callback=\", \"callback=\" + options.callbackName);\n logger.info(\"setting callback function name in 'options.url' : \" + options.url);\n }\n\n // timeOut par defaut\n if (!options.onTimeOut) {\n logger.info(\"setting 'options.onTimeOut' default value\");\n /** callback timeout par defaut */\n options.onTimeOut = function (/* error */) {\n console.log(\"TimeOut while invoking url : \" + options.url);\n };\n }\n\n if (!HasCallbackName) {\n var self = this;\n\n // event du timeout\n var onTimeOutTrigger = null;\n\n // declenche le timeout si > à 0 !\n if (options.timeOut > 0) {\n onTimeOutTrigger = window.setTimeout(\n function () {\n /** fonction de reponse du service */\n window[options.callbackName] = function () {};\n options.onTimeOut();\n self._deleteScript(callbackId);\n }, options.timeOut);\n }\n\n // FIXME le nom de la fonction n'accepte pas de namespace !\n // ex. Gp.Function.callback\n /**\n * fonction de reponse du service\n * @param {Object} data - data\n * @private\n */\n window[options.callbackName] = function (data) {\n window.clearTimeout(onTimeOutTrigger);\n options.onResponse(data);\n self._deleteScript(callbackId);\n };\n }\n\n this._createScript(callbackId, options.url);\n },\n\n /**\n * create Script\n * @param {String} callbackId - callback Id\n * @param {String} url - url\n * @private\n */\n _createScript : function (callbackId, url) {\n var scriptu;\n var scripto = document.getElementById(\"results\" + callbackId);\n\n scriptu = document.createElement(\"script\");\n scriptu.setAttribute(\"type\", \"text/javascript\");\n scriptu.setAttribute(\"src\", url);\n scriptu.setAttribute(\"charset\", \"UTF-8\");\n scriptu.setAttribute(\"id\", \"results\" + callbackId);\n scriptu.setAttribute(\"async\", \"true\"); // FIXME async ?\n // head ou body ou autres ?\n var node = document.documentElement || document.getElementsByTagName(\"head\")[0];\n if (scripto === null) {\n node.appendChild(scriptu);\n } else {\n // s'il existe déjà, on le remplace !\n node.replaceChild(scriptu, scripto);\n }\n },\n\n /**\n * delete Script\n * @param {String} callbackId - callback Id\n * @private\n */\n _deleteScript : function (callbackId) {\n var script = document.getElementById(\"results\" + callbackId);\n if (script) {\n var node = script.parentNode || document.documentElement;\n if (!node) {\n return;\n }\n node.removeChild(script);\n }\n }\n};\n\nexport default JSONP;\n" - }, - { - "id": 54, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestFactory.js", - "name": "./src/Services/Alti/Request/AltiRequestFactory.js", - "index": 19, - "index2": 21, - "size": 4471, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Alti.js", - "issuerId": 46, - "issuerName": "./src/Services/Alti/Alti.js", - "profile": { - "factory": 367, - "building": 424, - "dependencies": 3 - }, - "failed": false, - "errors": 0, - "warnings": 1, - "reasons": [ - { - "moduleId": 46, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Alti.js", - "module": "./src/Services/Alti/Alti.js", - "moduleName": "./src/Services/Alti/Alti.js", - "type": "harmony import", - "userRequest": "./Request/AltiRequestFactory", - "loc": "7:0-62" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 4, - "source": "/**\n * Creation d'une requête en REST ou WPS\n * (Factory)\n *\n * @module AltiRequestFactory\n * @alias Gp.Services.Alti.Request.AltiRequestFactory\n * @private\n */\nimport Logger from \"../../../Utils/LoggerByDefault\";\nimport ErrorService from \"../../../Exceptions/ErrorService\";\nimport AltiRequestREST from \"./AltiRequestREST\";\nimport AltiRequestWPS from \"./AltiRequestWPS\";\n\nvar AltiRequestFactory = {\n\n /**\n * interface unique\n *\n * @method build\n * @static\n * @param {Object} options - options definies dans le composant Alti\n *\n * @example\n * var options = {\n * httpMethod : 'GET', // GET|POST\n * onSuccess : function (response) {},\n * onError : function (error) {},\n * scope : this,\n * positions : [{lon:, lat:}, {lon:, lat:}],\n * outputFormat : 'json' // json|xml\n * sampling : 3,\n * api : 'REST', // REST|WPS\n * zonly : false // false|true\n * };\n *\n */\n build : function (options) {\n // logger\n var logger = Logger.getLogger(\"AltiRequestFactory\");\n logger.trace([\"AltiRequestFactory::build()\"]);\n\n var request = null;\n\n // on factorise les options par groupe;\n // - global,\n // - param, les params pour les data inputs\n // - wps, les param du service\n // - callback\n\n var settings = {\n // ajout des valeurs par defaut spécifiques au service\n type : options.sampling ? \"Profil\" : \"Elevation\",\n method : options.httpMethod,\n param : {\n positions : null,\n delimiter : null, // FIXME par defaut, on ne le met pas en place car ça fait planter la requête !?\n indent : null, // par defaut\n crs : null, // par defaut\n format : null, // (only to POST)\n sampling : null, // (only use by Profil)\n zonly : null // (only use by Elevation)\n }\n };\n\n // surcharge des valeurs obligatoires\n settings.param.positions = options.positions;\n settings.param.format = options.outputFormat;\n settings.param.sampling = options.sampling;\n settings.param.zonly = options.zonly;\n\n // gestion des callback\n var bOnError = !!((options.onError !== null && typeof options.onError === \"function\"));\n var bOnSuccess = !!((options.onSuccess !== null && typeof options.onSuccess === \"function\"));\n\n var message = null;\n switch (options.api) {\n case \"REST\":\n // FIXME les exceptions ne sont pas 'catchées' sur le constructeur !\n var myReq = new AltiRequestREST(settings);\n if (!myReq.processRequestString()) {\n message = \"Error in process request (rest) !\";\n if (bOnError) {\n options.onError.call(options.scope, new ErrorService(message));\n return;\n }\n throw new Error(message);\n }\n request = myReq.requestString;\n break;\n case \"WPS\":\n // ajout des valeurs par defaut spécifiques au service WPS\n settings.wps = {\n service : null, // par defaut\n version : null, // par defaut\n identifier : null, // par defaut\n rawdataoutput : null, // par defaut\n request : null // par defaut\n };\n\n request = AltiRequestWPS.build(settings);\n if (!request) {\n message = \"Error in process request (wps) !\";\n if (bOnError) {\n options.onError.call(options.scope, new ErrorService(message));\n return;\n }\n throw new Error(message);\n }\n break;\n default:\n message = \"Type of API is not supported by service (REST or WPS) !\";\n if (bOnError) {\n options.onError.call(options.scope, new ErrorService(message));\n return;\n }\n throw new Error(message);\n }\n\n if (bOnSuccess) {\n options.onSuccess.call(options.scope, request);\n }\n\n return request;\n }\n};\n\nexport default AltiRequestFactory;\n" - }, - { - "id": 55, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestREST.js", - "name": "./src/Services/Alti/Request/AltiRequestREST.js", - "index": 20, - "index2": 18, - "size": 6649, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestFactory.js", - "issuerId": 54, - "issuerName": "./src/Services/Alti/Request/AltiRequestFactory.js", - "profile": { - "factory": 119, - "building": 198, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 1, - "reasons": [ - { - "moduleId": 54, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestFactory.js", - "module": "./src/Services/Alti/Request/AltiRequestFactory.js", - "moduleName": "./src/Services/Alti/Request/AltiRequestFactory.js", - "type": "harmony import", - "userRequest": "./AltiRequestREST", - "loc": "11:0-48" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "/* jshint multistr : true */\n\nimport Logger from \"../../../Utils/LoggerByDefault\";\nimport _ from \"../../../Utils/MessagesResources\";\nimport AltiElevationRequest from \"./model/AltiElevationRequest\";\nimport AltiProfilRequest from \"./model/AltiProfilRequest\";\n\n/**\n * @classdesc\n * Classe de gestion des requêtes de type REST sur le service altimetrique.\n *\n * @todo Le service Alti n'implemente pas le POST !?\n * @constructor\n * @alias Gp.Services.Alti.Request.AltiRequestREST\n * @param {Object} options - options\n * @param {Object} options.param.positions - tableau de coordonnées lon/lat\n * @param {String} options.param.delimiter - '|'\n * @param {Boolean} options.param.indent - false|true\n * @param {String} options.param.crs - 'CRS:84'\n * @param {String} options.param.sampling - 3\n * @param {Boolean} options.param.zonly - false|true\n * @param {String} options.param.format - \"JSON|XML\"\n * @param {String} options.type - \"Profil|Elevation\"\n * @param {String} options.method - GET|POST\n *\n * @example\n * var options = {\n * type : 'Profil', // Elevation\n * method : 'GET', // par defaut\n * param : {\n * positions : [\n * {lon:'1.11', lat:'1.11'},\n * {lon:'1.10', lat:'1.10'},\n * {lon:'1.12', lat:'1.12'}\n * ],\n * delimiter : \";\", // par defaut\n * indent : true, // par defaut\n * crs : 'EPSG:4326', // par defaut\n * format : 'json', // par defaut (only to POST)\n * sampling : 3 , // par defaut (only use by Profil)\n * zonly : false // par defaut (only use by Elevation)\n * }\n * };\n *\n * var result;\n * try {\n * var obj = new AltiRequestREST (options);\n * if (! obj.processRequestString ()) {\n * throw new Error(\"Request empty !?\")\n * }\n * result = obj.requestString;\n * } catch (e) {\n * // exceptions...\n * }\n * @private\n */\nfunction AltiRequestREST (options) {\n this.logger = Logger.getLogger(\"AltiRequestREST\");\n this.logger.trace(\"[Constructeur AltiRequestREST ()]\");\n\n if (!(this instanceof AltiRequestREST)) {\n throw new TypeError(\"AltiRequestREST constructor cannot be called as a function.\");\n }\n\n this.options = options || {};\n\n // existance des options\n if (!this.options) {\n throw new Error(_.getMessage(\"PARAM_EMPTY\", \"options\"));\n }\n\n // type de requete : Altitude ou Profil\n // (param. à determiner en fonction des parametres d'entrée)\n if (!this.options.type) {\n throw new Error(_.getMessage(\"PARAM_EMPTY\", \"type (Elevation or Profil)\"));\n }\n\n // construction du modele de requête\n // (test du type d'objet candidat)\n this.DataObject = null;\n switch (this.options.type) {\n case \"Elevation\":\n this.DataObject = new AltiElevationRequest(this.options.param);\n break;\n case \"Profil\":\n this.DataObject = new AltiProfilRequest(this.options.param);\n break;\n default:\n throw new Error(_.getMessage(\"PARAM_TYPE\", \"type (Elevation or Profil)\"));\n }\n\n /**\n * methode.\n * Par defaut, \"GET\".\n */\n this.method = this.options.method || \"GET\";\n}\n\nAltiRequestREST.prototype = {\n\n /**\n * request\n * @type {String}\n */\n requestString : null,\n\n /**\n * Constructeur (alias)\n */\n constructor : AltiRequestREST,\n\n /**\n * Template de la requête.\n */\n template : {\n get : {\n // FIXME on retire le param 'delimiter' : &delimiter='__DELIMITER__'\n value : \"lon=__LON__&lat=__LAT__&indent=__INDENT__&crs='__CRS__'\",\n input : {\n point : \"&zonly=__ZONLY__\",\n profil : \"&sampling=__SAMPLING__\"\n }\n },\n post : {\n // FIXME on retire le param 'delimiter' : delimiter='__DELIMITER__'\\n\\\n value : \"lon=__LON__\\n\" +\n \"lat=__LAT__\\n\" +\n \"indent=__INDENT__\\n\" +\n \"crs='__CRS__'\\n\",\n input : {\n point : \"zonly=__ZONLY__\",\n profil : \"sampling=__SAMPLING__\"\n }\n }\n },\n\n /**\n * Construction de la requête.\n *\n * @example\n * // GET out : lon=0.2367,2.1570&lat=48.0551,46.6077&delimiter=,&indent=true&zonly=true&crs='CRS:84'\n * // POST out : Not yet supported method POST !\n * @returns {String}\n */\n processRequestString : function () {\n this.logger.trace(\"AltiRequestREST::processRequestString ()\");\n\n var template = \"\";\n if (this.method === \"POST\") {\n template = this.template.post.value;\n } else if (this.method === \"GET\") {\n template = this.template.get.value;\n }\n\n template = template.replace(/__LON__/g, this.DataObject.getLon());\n template = template.replace(/__LAT__/g, this.DataObject.getLat());\n // FIXME on retire le param 'delimiter'\n // template = template.replace(/__DELIMITER__/g, this.DataObject.delimiter);\n template = template.replace(/__INDENT__/g, this.DataObject.indent);\n template = template.replace(/__CRS__/g, this.DataObject.crs);\n\n // ajout +\n template = template + this.__addDataInputs();\n this.logger.trace(\"traduction tmpl\", template);\n\n // sauvegarde\n this.requestString = template;\n\n return this.requestString;\n },\n\n /**\n * Ajout de parametres spécifiques (ex. zonly)\n *\n * @returns {String}\n */\n __addDataInputs : function () {\n this.logger.trace(\"AltiRequestREST::addDataInput ()\");\n\n var myTemplate;\n if (this.method === \"POST\") {\n myTemplate = this.template.post;\n } else if (this.method === \"GET\") {\n myTemplate = this.template.get;\n } else {\n throw new Error(\"No other HTTP method supported by the service !\");\n }\n\n var tmpl = null;\n if (this.DataObject.CLASSNAME === \"AltiElevationRequest\") {\n tmpl = myTemplate.input.point;\n return tmpl.replace(/__ZONLY__/g, this.DataObject.zonly);\n } else if (this.DataObject.CLASSNAME === \"AltiProfilRequest\") {\n tmpl = myTemplate.input.profil;\n return tmpl.replace(/__SAMPLING__/g, this.DataObject.sampling);\n } else {\n throw new Error(\"No other object supported than elevation or profil !?\");\n }\n }\n};\n\nexport default AltiRequestREST;\n" - }, - { - "id": 56, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestWPS.js", - "name": "./src/Services/Alti/Request/AltiRequestWPS.js", - "index": 24, - "index2": 20, - "size": 4406, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestFactory.js", - "issuerId": 54, - "issuerName": "./src/Services/Alti/Request/AltiRequestFactory.js", - "profile": { - "factory": 120, - "building": 212, - "dependencies": 786 - }, - "failed": false, - "errors": 0, - "warnings": 1, - "reasons": [ - { - "moduleId": 54, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestFactory.js", - "module": "./src/Services/Alti/Request/AltiRequestFactory.js", - "moduleName": "./src/Services/Alti/Request/AltiRequestFactory.js", - "type": "harmony import", - "userRequest": "./AltiRequestWPS", - "loc": "12:0-46" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "/**\n * Classe d'interface des requêtes de type WPS sur le service altimetrique.\n * (Factory)\n *\n * @module Gp.Services.Alti.Request.AltiRequestWPS\n * @alias Gp.Services.Alti.Request.AltiRequestWPS\n * @private\n */\nimport Logger from \"../../../Utils/LoggerByDefault\";\nimport _ from \"../../../Utils/MessagesResources\";\nimport WPS from \"../../../Formats/WPS\";\nimport AltiElevationRequest from \"./model/AltiElevationRequest\";\nimport AltiProfilRequest from \"./model/AltiProfilRequest\";\n\nvar AltiRequestWPS = {\n\n /**\n * Interface unique de construction de la requête.\n *\n * @method build\n * @param {Object} options - options\n * @param {Object} options.param.positions - tableau de coordonnées lon/lat\n * @param {String} options.param.delimiter - '|'\n * @param {Boolean} options.param.indent - false|true\n * @param {String} options.param.crs - 'CRS:84'\n * @param {String} options.param.sampling - 3\n * @param {Boolean} options.param.zonly - false|true\n * @param {String} options.param.format - \"JSON|XML\" (only to POST)\n * @param {String} options.wps.service - \"WPS\"\n * @param {String} options.wps.version - \"1.0.0\"\n * @param {String} options.wps.identifier - \"gs:WPSElevation|gs:WPSLineElevation\"\n * @param {String} options.wps.rawdataoutput - \"result\"\n * @param {String} options.wps.request - \"Execute\"\n * @param {String} options.type - \"Profil|Elevation\"\n * @param {String} options.method - GET|POST\n * @example\n * var options = {\n * type : 'Profil', // Elevation\n * method : 'GET', // par defaut\n * param : {\n * positions : [\n * {lon:'1.11', lat:'1.11'},\n * {lon:'1.10', lat:'1.10'},\n * {lon:'1.12', lat:'1.12'}\n * ],\n * delimiter : \";\", // par defaut\n * indent : true, // par defaut\n * crs : 'EPSG:4326', // par defaut\n * format : 'json', // par defaut (only to POST)\n * sampling : 3 , // par defaut (only use by Profil)\n * zonly : false, // par defaut (only use by Elevation)\n * },\n * wps : {\n * service : 'WPS', // par defaut\n * version : '1.0.0', // par defaut\n * identifier : 'gs:WPS', // par defaut, Elevation = gs:WPSElevation, Profil = gs:WPSLineElevation\n * rawdataoutput : 'result',// par defaut\n * request : 'Execute' // par defaut\n * }\n * };\n */\n build : function (options) {\n // logger\n var logger = Logger.getLogger(\"AltiRequestWPS\");\n logger.trace([\"AltiRequestWPS::build()\"]);\n\n // existance des options\n if (!options) {\n throw new Error(_.getMessage(\"PARAM_EMPTY\", \"options\"));\n }\n\n // type de requete : Altitude ou Profil\n // (param. à determiner en fonction des parametres d'entrée)\n if (!options.type) {\n throw new Error(_.getMessage(\"PARAM_EMPTY\", \"type (Elevation or Profil)\"));\n }\n\n // construction du modele de requête\n // (test du type d'objet candidat)\n var DataObject = null;\n switch (options.type) {\n case \"Elevation\":\n // surcharge\n options.wps.identifier = \"gs:WPSElevation\";\n DataObject = new AltiElevationRequest(options.param);\n break;\n case \"Profil\":\n // surcharge\n options.wps.identifier = \"gs:WPSLineElevation\";\n DataObject = new AltiProfilRequest(options.param);\n break;\n default:\n throw new Error(_.getMessage(\"PARAM_TYPE\", \"type (Elevation or Profil)\"));\n }\n\n // construction de la requête WPS\n var settings = {\n data : DataObject,\n method : options.method,\n param : options.wps\n };\n\n var rqstWPS = new WPS(settings);\n\n if (!rqstWPS.processRequestString()) {\n throw new Error(\"Enable to process request !\");\n }\n\n return rqstWPS.requestString;\n }\n};\n\nexport default AltiRequestWPS;\n" - }, - { - "id": 57, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/WPS.js", - "name": "./src/Formats/WPS.js", - "index": 25, - "index2": 19, - "size": 9252, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestWPS.js", - "issuerId": 56, - "issuerName": "./src/Services/Alti/Request/AltiRequestWPS.js", - "profile": { - "factory": 784, - "building": 81, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 56, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Request/AltiRequestWPS.js", - "module": "./src/Services/Alti/Request/AltiRequestWPS.js", - "moduleName": "./src/Services/Alti/Request/AltiRequestWPS.js", - "type": "harmony import", - "userRequest": "../../../Formats/WPS", - "loc": "11:0-39" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 6, - "source": "import Logger from \"../Utils/LoggerByDefault\";\n\n/**\n * @classdesc\n * Standard WPS\n *\n * @constructor\n * @alias Gp.Formats.WPS\n * @param {Object} options - options\n * @param {Object} options.data - objet\n * @param {String} options.method - POST|GET\n * @param {String} options.param.service - \"WPS\"\n * @param {String} options.param.version - \"1.0.0\"\n * @param {String} options.param.identifier - \"gs:WPSElevation|gs:WPSLineElevation\"\n * @param {String} options.param.rawdataoutput - \"result\"\n * @param {String} options.param.request - \"Execute\"\n * @param {Function} options.onsuccess - function callback success (TODO)\n * @param {Function} options.onerror - function callback error (TODO)\n * @private\n */\nfunction WPS (options) {\n this.logger = Logger.getLogger();\n this.logger.trace(\"[Constructeur WPS()]\");\n\n if (!(this instanceof WPS)) {\n throw new TypeError(\"WPS constructor cannot be called as a function.\");\n }\n\n this.options = options || {};\n\n /**\n * Objet DATA\n */\n this.DataObject = this.options.data;\n\n if (!this.DataObject) {\n throw new TypeError(\"This data object is not defined !\");\n }\n\n /**\n * param service.\n * Par defaut, \"WPS\".\n */\n this.paramservice = this.options.param.service || \"WPS\";\n\n /**\n * param version.\n * Par defaut, \"1.0.0\".\n */\n this.paramversion = this.options.param.version || \"1.0.0\";\n\n /**\n * param identifier\n * Par defaut, \"gs:WPS\"\n */\n this.paramidentifier = this.options.param.identifier || \"gs:WPS\";\n\n /**\n * param rawdataoutput\n * Par defaut, \"result\".\n */\n this.paramrawdataoutput = this.options.param.rawdataoutput || \"result\";\n\n /**\n * param request\n * Par defaut, \"Execute\".\n */\n this.paramrequest = this.options.param.request || \"Execute\";\n\n /**\n * methode.\n * Par defaut, \"GET\".\n */\n this.method = this.options.method || \"GET\";\n}\n\nWPS.prototype = {\n\n /**\n * @lends module:WPS#\n */\n\n /**\n * request\n * @type {String}\n */\n requestString : null,\n\n /**\n * Constructeur (alias)\n */\n constructor : WPS,\n\n /**\n * Template de la requête.\n */\n template : {\n get : {\n value : \"service=__SERVICE__\" +\n \"&version=__VERSION__\" +\n \"&rawdataoutput=__RAWDATAOUTPUT__\" +\n \"&identifier=__IDENTIFIER__\" +\n \"&request=__REQUEST__\" +\n \"&datainputs=\",\n\n input : \"__KEY__=__DATA__\"\n\n },\n post : {\n\n value : \"\" +\n \"\" +\n \"__IDENTIFIER__\" +\n \"\" +\n \"\" +\n \"\" +\n \"\" +\n \"\" +\n \"__RAWDATAOUTPUT__\" +\n \"\" +\n \"\" +\n \"\",\n\n input : \"\" +\n \"__KEY__\" +\n \"\" +\n \"__DATA__\" +\n \"\" +\n \"\"\n }\n },\n\n /**\n * Namespace par defaut de la requete POST.\n *\n * @returns {String} namespace\n */\n namespaceByDefault : function () {\n var ns = [\n \"xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\"\",\n \"xmlns=\\\"http://www.opengis.net/wps/1.0.0\\\"\",\n \"xmlns:wfs=\\\"http://www.opengis.net/wfs\\\"\",\n \"xmlns:wps=\\\"http://www.opengis.net/wps/1.0.0\\\"\",\n \"xmlns:ows=\\\"http://www.opengis.net/ows/1.1\\\"\",\n \"xmlns:gml=\\\"http://www.opengis.net/gml\\\"\",\n \"xmlns:ogc=\\\"http://www.opengis.net/ogc\\\"\",\n \"xmlns:wcs=\\\"http://www.opengis.net/wcs/1.1.1\\\"\",\n \"xmlns:xlink=\\\"http://www.w3.org/1999/xlink\\\"\"\n ];\n\n return ns.join(\" \");\n },\n\n /**\n * Schemalocation par defaut.\n *\n * @returns {String} schemaLocation\n */\n schemaLocationByDefault : function () {\n return \"xsi:schemaLocation=\\\"http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd\\\"\";\n },\n\n /**\n * Construction de la requête.\n *\n * @example\n * // GET out :\n * // service=__SERVICE__\n * // &version=__VERSION__\n * // &rawdataoutput=__RAWDATAOUTPUT__\n * // &identifier=__IDENTIFIER__\n * // &request=__REQUEST__\n * // &datainputs=\"__DATAINPUTS__\"\n * // avec __DATAINPUTS__ = __KEY__=__DATA__;...\n *\n * // POST out :\n * // \n * // \n * // __IDENTIFIER__\n * // \n * // \n * // \n * // \n * // \n * // __RAWDATAOUTPUT__\n * // \n * // \n * // \",\n * // avec __DATAINPUTS__\n * // \n * // __KEY__\n * // \n * // __DATA__\n * // \n * // \n *\n * @returns {Boolean} validation de la construction de la requete\n */\n processRequestString : function () {\n this.logger.trace(\"WPS::processRequestString ()\");\n\n var template = \"\";\n if (this.method === \"POST\") {\n template = this.template.post.value;\n } else if (this.method === \"GET\") {\n template = this.template.get.value;\n } else {\n this.logger.error(\"No other method supported by the service !\");\n return false;\n }\n\n template = template.replace(/__SERVICE__/g, this.paramservice);\n template = template.replace(/__VERSION__/g, this.paramversion);\n template = template.replace(/__RAWDATAOUTPUT__/g, this.paramrawdataoutput);\n template = template.replace(/__IDENTIFIER__/g, this.paramidentifier);\n template = template.replace(/__REQUEST__/g, this.paramrequest);\n\n // ajout +\n if (this.method === \"POST\") {\n template = template.replace(/__NAMESPACE__/g, this.namespaceByDefault);\n template = template.replace(/__SCHEMALOCATION__/g, this.schemaLocationByDefault);\n }\n\n // ajout des datainputs\n template = template.replace(//g, this.__addDataInputs());\n\n if (!template) {\n this.logger.warn(\"traduction tmpl : empty request !?\");\n return false;\n }\n\n this.requestString = template;\n this.logger.trace(\"traduction tmpl\", template);\n\n return true;\n },\n\n /**\n * Ajout des données\n *\n * @returns {String} Données concaténées dans une chaine\n */\n __addDataInputs : function () {\n this.logger.trace(\"WPS::__addDataInputs ()\");\n\n // c'est un peu grossier...\n var tmpl = this.method === \"GET\" ? this.template.get.input : this.template.post.input;\n var sep = this.method === \"GET\" ? \";\" : \"\";\n\n var result = \"\";\n var that = this;\n var map = this.DataObject.getData();\n for (var i = 0; i < map.length; i++) {\n // FIXME closure ?\n (function (j) {\n if (sep) {\n sep = (j === map.length - 1) ? \"\" : \";\";\n }\n result = result.concat(that.__addDataInput(tmpl, map[j].k, map[j].v), sep);\n })(i);\n }\n\n return result;\n },\n\n /**\n * Ajout d'une donnée.\n *\n * @param {String} tmpl - template\n * @param {String} key - clef\n * @param {String} data - valeur\n * @returns {String} chaine avec les substitutions clef/valeur\n */\n __addDataInput : function (tmpl, key, data) {\n var tmp = tmpl;\n tmp = tmp.replace(/__KEY__/g, key);\n tmp = tmp.replace(/__DATA__/g, data);\n return tmp;\n },\n\n /**\n * Definir le mode de requête\n *\n * @param {String} method - GET|POST\n */\n setMethod : function (method) {\n if (method === \"GET\" || method === \"POST\") {\n this.method = method;\n } else {\n this.logger.warn(\"support only GET and POST method !\");\n }\n },\n\n /**\n * Retourne le mode de requete (GET|POST).\n *\n * @returns {AltiRequest.options.mode|String} methode (GET|POST)\n */\n getMethod : function () {\n return this.method;\n }\n};\n\nexport default WPS;\n" - }, - { - "id": 58, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Response/AltiResponseFactory.js", - "name": "./src/Services/Alti/Response/AltiResponseFactory.js", - "index": 26, - "index2": 26, - "size": 7849, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Alti.js", - "issuerId": 46, - "issuerName": "./src/Services/Alti/Alti.js", - "profile": { - "factory": 364, - "building": 136, - "dependencies": 2 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 46, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Alti.js", - "module": "./src/Services/Alti/Alti.js", - "moduleName": "./src/Services/Alti/Alti.js", - "type": "harmony import", - "userRequest": "./Response/AltiResponseFactory", - "loc": "8:0-65" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 4, - "source": "/**\n * Factory pour générer une reponse JSON à partir d'un XML ou d'un JSON\n * (Factory)\n *\n * @module AltiResponseFactory\n * @private\n * @alias Gp.Services.Alti.Response.AltiResponseFactory\n */\nimport Logger from \"../../../Utils/LoggerByDefault\";\nimport MRes from \"../../../Utils/MessagesResources\";\nimport ErrorService from \"../../../Exceptions/ErrorService\";\nimport XML from \"../../../Formats/XML\";\nimport AltiResponseReader from \"../Formats/AltiResponseReader\";\nimport AltiResponse from \"./model/AltiResponse\";\nimport Elevation from \"./model/Elevation\";\n\nvar AltiResponseFactory = {\n\n /**\n * interface unique\n *\n * @method build\n * @static\n * @param {Object} options - options definies dans le composant Alti\n *\n * @example\n * var options = {\n * response :\n * outputFormat :\n * rawResponse :\n * scope :\n * onSuccess :\n * onError :\n * };\n *\n */\n build : function (options) {\n // logger\n var logger = Logger.getLogger(\"AltiResponseFactory\");\n logger.trace([\"AltiResponseFactory::build()\"]);\n\n var data = null;\n\n if (options.response) {\n if (options.rawResponse) {\n logger.trace(\"analyze response : raw\");\n data = options.response;\n } else {\n switch (options.outputFormat) {\n case \"xml\":\n logger.trace(\"analyze response : xml\");\n\n try {\n var p = new XML({\n reader : AltiResponseReader\n });\n\n if (typeof options.response === \"string\") {\n p.setXMLString(options.response);\n } else {\n p.setXMLDoc(options.response);\n }\n\n data = p.parse();\n\n if (!data) {\n throw new Error(MRes.getMessage(\"SERVICE_RESPONSE_EXCEPTION_2\"));\n }\n } catch (e) {\n var message = e.message;\n options.onError.call(options.scope, new ErrorService({\n message : MRes.getMessage(\"SERVICE_RESPONSE_EXCEPTION\", message),\n status : 200,\n type : ErrorService.TYPE_SRVERR\n }));\n return;\n }\n\n break;\n\n case \"json\":\n logger.trace(\"analyze response : json\");\n logger.trace(\"analyze response : \", typeof options.response);\n\n var JSONResponse;\n if (typeof options.response === \"string\") {\n JSONResponse = JSON.parse(options.response);\n } else {\n JSONResponse = options.response;\n }\n\n // le service renvoie t il une erreur ?\n if (JSONResponse.error) {\n // ex. {\"error\": {\"code\": \"BAD_PARAMETER\",\"description\": \"The values () cannot be parsed as a valid longitude (double value such as -180 < lat < 180).\"}}\n options.onError.call(options.scope, new ErrorService({\n message : MRes.getMessage(\"SERVICE_RESPONSE_EXCEPTION\", JSONResponse.error.description),\n status : 200,\n type : ErrorService.TYPE_SRVERR\n }));\n return;\n }\n\n // analyse de la reponse\n if (JSONResponse) {\n var elevations = JSONResponse.elevations;\n var altiResponse = new AltiResponse();\n var elevation;\n if (Array.isArray(elevations) && elevations.length) {\n for (var i = 0; i < elevations.length; i++) {\n elevation = new Elevation();\n\n if (typeof elevations[i] === \"object\") {\n // elevations[i] est un objet elevation\n if (elevations[i].lon) {\n elevation.lon = elevations[i].lon;\n }\n if (elevations[i].lat) {\n elevation.lat = elevations[i].lat;\n }\n if (elevations[i].z) {\n elevation.z = elevations[i].z;\n }\n if (elevations[i].acc) {\n elevation.acc = elevations[i].acc;\n }\n } else if (typeof elevations[i] === \"number\") {\n // elevations[i] est un nombre, dans le cas de zonly=true notamment\n elevation.z = elevations[i];\n }\n\n if (Array.isArray(altiResponse.elevations)) {\n altiResponse.elevations.push(elevation);\n }\n }\n }\n data = altiResponse;\n }\n\n if (!data) {\n options.onError.call(options.scope, new ErrorService({\n message : MRes.getMessage(\"SERVICE_RESPONSE_ANALYSE_2\"),\n type : ErrorService.TYPE_UNKERR,\n status : -1\n }));\n return;\n }\n break;\n\n default:\n options.onError.call(options.scope, new ErrorService({\n message : MRes.getMessage(\"SERVICE_RESPONSE_FORMAT_2\"),\n type : ErrorService.TYPE_UNKERR,\n status : -1\n }));\n return;\n }\n\n // Si la réponse contenait une exception renvoyée par le service\n if (data.exceptionReport) {\n options.onError.call(options.scope, new ErrorService({\n message : MRes.getMessage(\"SERVICE_RESPONSE_EXCEPTION\", data.exceptionReport),\n type : ErrorService.TYPE_SRVERR,\n status : 200\n }));\n return;\n } else if (data.error) {\n var errorMess = data.error.description;\n options.onError.call(options.scope, new ErrorService({\n message : MRes.getMessage(\"SERVICE_RESPONSE_EXCEPTION\", errorMess),\n type : ErrorService.TYPE_SRVERR,\n status : 200\n }));\n return;\n }\n }\n } else {\n options.onError.call(options.scope, new ErrorService(MRes.getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n return;\n }\n\n options.onSuccess.call(options.scope, data);\n }\n};\n\nexport default AltiResponseFactory;\n" - }, - { - "id": 59, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Formats/AltiResponseReader.js", - "name": "./src/Services/Alti/Formats/AltiResponseReader.js", - "index": 28, - "index2": 25, - "size": 12298, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Response/AltiResponseFactory.js", - "issuerId": 58, - "issuerName": "./src/Services/Alti/Response/AltiResponseFactory.js", - "profile": { - "factory": 410, - "building": 166, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 1, - "reasons": [ - { - "moduleId": 58, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Alti/Response/AltiResponseFactory.js", - "module": "./src/Services/Alti/Response/AltiResponseFactory.js", - "moduleName": "./src/Services/Alti/Response/AltiResponseFactory.js", - "type": "harmony import", - "userRequest": "../Formats/AltiResponseReader", - "loc": "13:0-63" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "\n/**\n * Fonction retournant un objet contenant des clés de lecture (readers)\n * qui permettent de parser des réponses XML du service Altimétrique du Géoportail\n * (calcul altimétrique simple ou profil altimétrique d'une courbe),\n * lorsque le paramètre output = xml,\n * afin de récupérer les élévations retournées.\n *\n * @module AltiResponseReader\n * @alias Gp.Services.Alti.Formats.AltiResponseReader\n * @private\n */\n\n// import Logger from \"../../../Utils/LoggerByDefault\";\nimport AltiResponse from \"../Response/model/AltiResponse\";\nimport Elevation from \"../Response/model/Elevation\";\n\n/**\n *\n * Objet AltiResponseReader\n *\n * @member {Object} AltiResponseReader\n *\n * @property {Object} AltiResponseReader.READERS - Objet contenant des fonctions de lecture, appelées \"readers\"\n * dont chaque clé correspond au nom d'un tag du XML que l'on souhaite lire\n * et la valeur associée est une fonction (node, data)\n * où node est un noeud du document DOM\n * et data est un objet où l'on stocke les informations lues dans le XML.\n *\n * @property {Method} AltiResponseReader.READERS.elevations - Lecture d'un noeud \"elevations\" de la réponse XML\n * du service alti, correspondant logiquement à la racine du document\n * (contient un ou plusieurs childNodes correspondant chacun à une élévation retournée)\n *\n * @property {Method} AltiResponseReader.READERS.elevation - ecture d'un noeud \"elevation\" de la réponse xml du service alti.\n * (contient un ou 4 childNode (s) correspondant à l'altitude (z) et éventuellement lat, lon, et acc)\n *\n * @property {Method} AltiResponseReader.READERS.lat - Lecture d'un noeud \"lat\" de la réponse xml du service alti.\n * (contient une valeur de latitude, qui est un flottant)\n *\n * @property {Method} AltiResponseReader.READERS.lon - Lecture d'un noeud \"lon\" de la réponse xml du service alti.\n * (contient une valeur de longitude, qui est un flottant)\n *\n * @property {Method} AltiResponseReader.READERS.z - Lecture d'un noeud \"z\" de la réponse xml du service alti.\n * (contient une valeur d'altitude, qui est un flottant)\n *\n * @property {Method} AltiResponseReader.READERS.acc - Lecture d'un noeud \"acc\" de la réponse xml du service alti.\n * (contient une valeur de précision, qui est un flottant)\n *\n * @property {Method} AltiResponseReader.READERS.exceptionreport - Lecture d'un noeud \"ExceptionReport\" de la réponse xml du service alti.\n *\n * @property {Method} AltiResponseReader.READERS.exception - Lecture d'un noeud \"Exception\" de la réponse xml du service alti.\n *\n * @property {Method} AltiResponseReader.read - Méthode permettant de lancer la lecture d'une réponse XML du service altimétrique,\n * à l'aide des readers de la classe.\n *\n */\nvar AltiResponseReader = {};\n\nAltiResponseReader.READERS = {\n\n /**\n * Lecture d'un noeud \"elevations\" de la réponse XML du service alti, correspondant logiquement à la racine du document\n * (contient un ou plusieurs childNodes correspondant chacun à une élévation retournée)\n *\n * @param {DOMElement} root - racine de la réponse XML\n * @static\n * @memberof AltiResponseReader\n * @returns {Object} Retourne un objet de type AltiResponse\n */\n elevations : function (root) {\n // INFO : on passe en paramètre l'objet en entrée elevations, vide, à remplir.\n var altiResponse = new AltiResponse();\n\n if (root.hasChildNodes()) {\n var children = root.childNodes;\n var child;\n var elevation;\n\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n\n if (AltiResponseReader.READERS[child.nodeName]) {\n elevation = AltiResponseReader.READERS[child.nodeName](child);\n altiResponse.elevations.push(elevation);\n }\n }\n }\n\n return altiResponse;\n },\n\n /**\n * Lecture d'un noeud \"elevation\" de la réponse xml du service alti.\n * (contient un ou 4 childNode (s) correspondant à l'altitude (z) et éventuellement lat, lon, et acc)\n *\n * @param {DOMElement} node - noeud elevation à lire pour récupérer les informations de l'élévation retournée (z [, lon, lat, acc])\n * @return {Array} elevationResponse - format de la réponse en sortie, instance de AltiResponse\n * @static\n * @memberof AltiResponseReader\n */\n elevation : function (node) {\n var elevation = new Elevation();\n\n if (node.hasChildNodes()) {\n var children = node.childNodes;\n var child;\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n if (AltiResponseReader.READERS[child.nodeName]) {\n // INFO : on passe en paramètre l'objet en entrée elevation, vide, à remplir.\n AltiResponseReader.READERS[child.nodeName](child, elevation);\n }\n }\n }\n return elevation;\n },\n\n /**\n * Lecture d'un noeud \"lat\" de la réponse xml du service alti.\n * (contient une valeur de latitude, qui est un flottant)\n *\n * @param {DOMElement} node - noeud à lire pour récupérer la latitude\n * @param {Object} elevation - objet dans lequel stocker la latitude retournée\n * @static\n * @memberof AltiResponseReader\n */\n lat : function (node, elevation) {\n var textNode = node.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n elevation.lat = parseFloat(textNode.nodeValue);\n } else {\n throw new Error(\"Erreur dans la lecture de la réponse du service : latitude attendue mais absente\");\n }\n },\n\n /**\n * Lecture d'un noeud \"lon\" de la réponse xml du service alti.\n * (contient une valeur de longitude, qui est un flottant)\n *\n * @param {DOMElement} node - noeud à lire pour récupérer la longitude\n * @param {Object} elevation - objet dans lequel stocker la longitude retournée\n * @static\n * @memberof AltiResponseReader\n */\n lon : function (node, elevation) {\n var textNode = node.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n elevation.lon = parseFloat(textNode.nodeValue);\n } else {\n throw new Error(\"Erreur dans la lecture de la réponse du service : longitude attendue mais absente\");\n }\n },\n\n /**\n * Lecture d'un noeud \"z\" de la réponse xml du service alti.\n * (contient une valeur d'altitude, qui est un flottant)\n *\n * @param {DOMElement} node - noeud à lire pour récupérer l'altitude\n * @param {Object} elevation - objet dans lequel stocker l'altitude retournée\n * @static\n * @memberof AltiResponseReader\n */\n z : function (node, elevation) {\n var textNode = node.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n if (elevation) {\n elevation.z = parseFloat(textNode.nodeValue);\n } else {\n elevation = new Elevation();\n elevation.z = parseFloat(textNode.nodeValue);\n return elevation;\n }\n } else {\n throw new Error(\"Erreur dans la lecture de la réponse du service : altitude attendue mais absente\");\n }\n },\n\n /**\n * Lecture d'un noeud \"acc\" de la réponse xml du service alti.\n * (contient une valeur de précision, qui est un flottant)\n *\n * @param {DOMElement} node - noeud à lire pour récupérer la précision\n * @param {Object} elevation - objet dans lequel stocker la précision retournée\n * @static\n * @memberof AltiResponseReader\n */\n acc : function (node, elevation) {\n var textNode = node.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n elevation.acc = parseFloat(textNode.nodeValue);\n } else {\n throw new Error(\"Erreur dans la lecture de la réponse du service : précision (acc) attendue mais absente\");\n }\n },\n\n /**\n * Lecture d'un noeud \"ExceptionReport\" de la réponse xml du service alti.\n *\n * @param {DOMElement} node - noeud à lire pour récupérer l'exception\n * @return {Object} exceptionReport - objet contenant l'exception\n * @static\n * @memberof AltiResponseReader\n */\n exceptionreport : function (node) {\n var response = {};\n\n if (node.hasChildNodes()) {\n var children = node.childNodes;\n var child;\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n if (child.nodeName === \"Exception\") {\n response.exceptionReport = AltiResponseReader.READERS.exception(child);\n }\n }\n }\n\n return response;\n },\n\n /**\n * Lecture d'un noeud \"Exception\" de la réponse xml du service alti.\n *\n * @param {DOMElement} node - noeud à lire pour récupérer l'exception\n * @return {Object} exceptionReport - objet contenant l'exception, avec deux attributs :\n * {String} exceptionReport.exceptionCode - qui contient l'identifiant du code de l'exception\n * {String} exceptionReport.exception - qui contient le message de l'exception\n * @static\n * @memberof AltiResponseReader\n */\n exception : function (node) {\n var exceptionReport = {};\n\n // get exception code\n var exceptionCode = node.getAttribute(\"exceptionCode\");\n if (exceptionCode) {\n exceptionReport.exceptionCode = exceptionCode;\n }\n\n // get exception message\n var textNode = node.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n exceptionReport.exception = textNode.nodeValue;\n }\n\n return exceptionReport;\n },\n\n /**\n * Lecture d'un noeud \"Error\" de la réponse xml du service alti.\n *\n * @param {DOMElement} node - noeud à lire pour récupérer l'exception\n * @return {Object} error - objet contenant l'exception\n * @static\n */\n error : function (node) {\n var response = {\n error : {}\n };\n // get error code and description\n if (node.hasChildNodes()) {\n var children = node.childNodes;\n var child;\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n var textNode;\n // get error code\n if (child.nodeType === 1 && child.nodeName === \"code\") { // 1 === node.ELEMENT_NODE\n textNode = child.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n response.error.code = textNode.nodeValue;\n }\n }\n // get error description\n if (child.nodeType === 1 && child.nodeName === \"description\") { // 1 === node.ELEMENT_NODE\n textNode = child.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n response.error.description = textNode.nodeValue;\n }\n }\n }\n }\n return response;\n }\n\n};\n\n/**\n * Méthode permettant de lancer la lecture d'une réponse XML du service altimétrique,\n * à l'aide des readers de la classe.\n *\n * @method AltiResponseReader.read\n * @param {DOMElement} root - racine de la réponse XML à lire\n * @static\n * @memberof AltiResponseReader\n */\nAltiResponseReader.read = function (root) {\n if (root.nodeName === \"elevations\") {\n var altiResponse = AltiResponseReader.READERS.elevations(root);\n return altiResponse;\n } else if (root.nodeName === \"ExceptionReport\") {\n var exceptionReport = AltiResponseReader.READERS.exceptionreport(root);\n return exceptionReport;\n } else if (root.nodeName === \"error\") {\n var error = AltiResponseReader.READERS.error(root);\n return error;\n } else {\n throw new Error(\"Erreur lors de la lecture de la réponse : elle n'est pas au format attendu.\");\n }\n};\n\nexport default AltiResponseReader;\n" - }, - { - "id": 60, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/AutoConf.js", - "name": "./src/Services/AutoConf/AutoConf.js", - "index": 31, - "index2": 44, - "size": 7194, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Services.js", - "issuerId": 45, - "issuerName": "./src/Services/Services.js", - "profile": { - "factory": 512, - "building": 103, - "dependencies": 314 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 45, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Services.js", - "module": "./src/Services/Services.js", - "moduleName": "./src/Services/Services.js", - "type": "harmony import", - "userRequest": "./AutoConf/AutoConf", - "loc": "10:0-43" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 3, - "source": "\nimport Logger from \"../../Utils/LoggerByDefault\";\nimport _ from \"../../Utils/MessagesResources\";\nimport Helper from \"../../Utils/Helper\";\nimport ErrorService from \"../../Exceptions/ErrorService\";\nimport DefaultUrlService from \"../DefaultUrlService\";\nimport CommonService from \"../CommonService\";\nimport AutoConfResponseFactory from \"./Response/AutoConfResponseFactory\";\n\n/**\n * @classdesc\n * Appel du service d'autoconfiguration du Géoportail\n *\n * @private\n * @constructor\n * @extends {Gp.Services.CommonService}\n * @alias Gp.Services.AutoConf\n *\n * @param {Object} options - options spécifiques au service (+ les options heritées)\n *\n * @param {String} [options.layerId] - Le nom de l'agrégat (couche) dont on veut connaître les informations détaillées.\n * La présence de cette propriété implique l'utilisation de la deuxième opération du service pour accéder aux informations d'une couche aggrégée.\n * Dans ce cas, la fonction effectuera quand même dans un premier temps la récupération des informations de l'auto-\n * configuration complète, sauf si un premier appel à l'autoconf a déjà été fait avec cette clé (i.e. si la variable globale est définie\n * pour la clé de contrat). Elle ira ensuite chercher les informations des couches agrégées, qui seront ajoutées à la variable globale Gp.Config.\n *\n * @example\n * var options = {\n * // options communes aux services\n * apiKey : \"apikey\",\n * protocol : 'JSONP', // JSONP|XHR\n * timeOut : 10000, // ms\n * rawResponse : false, // true|false\n * scope : null, // this\n * onSuccess : function (response) {},\n * onFailure : function (error) {},\n * layerId : \"ORTHOIMAGERY.ORTHOPHOTOS.3D$GEOPORTAIL:OGC:WMTS@aggregate\"\n * };\n */\nfunction AutoConf (options) {\n if (!(this instanceof AutoConf)) {\n throw new TypeError(_.getMessage(\"CLASS_CONSTRUCTOR\", \"AutoConf\"));\n }\n\n /**\n * Nom de la classe (heritage)\n * FIXME instance ou classe ?\n */\n this.CLASSNAME = \"AutoConf\";\n\n // Autoconf default protocol remains JSONP (#see http://ignf.github.io/geoportal-access-lib/latest/jsdoc/tutorial-optimize-getconfig.html)\n if (!options) {\n options = {};\n }\n options.protocol = options.protocol || \"JSONP\";\n\n // appel du constructeur par heritage\n CommonService.apply(this, arguments);\n\n this.logger = Logger.getLogger(\"Gp.Services.AutoConf\");\n this.logger.trace(\"[Constructeur AutoConf (options)]\");\n\n // #####################\n // analyse des options\n // #####################\n\n // gestion de l'url du service par defaut\n if (!this.options.serverUrl) {\n // si l'url n'est pas renseignée, il faut utiliser les urls par defaut\n // en fonction du nombre de clés en entrée et du paramètre layerId\n if (!this.options.serverUrl) {\n var lstUrlByDefault = DefaultUrlService.AutoConf.url(this.options.apiKey);\n\n if (!this.options.layerId) {\n // cas d'une autoconf simple\n if (Array.isArray(this.options.apiKey) && this.options.apiKey.length > 0) {\n // cas d'un tableau de clés en entrée\n this.options.serverUrl = lstUrlByDefault.apiKeys;\n } else {\n this.options.serverUrl = lstUrlByDefault.apiKey;\n }\n } else {\n // cas d'une autoconf pour des couches aggrégées\n this.options.serverUrl = lstUrlByDefault.aggregate + this.options.layerId;\n }\n }\n }\n\n // INFO\n // le service ne repond pas en mode POST (405 Method Not Allowed)\n if (this.options.protocol === \"XHR\" && this.options.httpMethod === \"POST\") {\n this.logger.warn(\"Le service ne gére pas le mode d'interrogation en POST, on bascule sur du GET !\");\n this.options.httpMethod = \"GET\"; // on surcharge !\n }\n\n // #####################\n // attributs d'instances\n // #####################\n\n /**\n * Format forcé de la réponse du service : \"xml\"\n * sauf si l'on souhaite une reponse brute (options.rawResponse)\n */\n this.options.outputFormat = (this.options.rawResponse) ? \"\" : \"xml\";\n}\n\n/**\n * @lends module:AutoConf#\n */\n\nAutoConf.prototype = Object.create(CommonService.prototype, {\n // todo\n // getter/setter\n});\n\n/*\n * Constructeur (alias)\n */\nAutoConf.prototype.constructor = AutoConf;\n\n/**\n * Création de la requête (overwrite)\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback de succès de la création de la requête\n */\nAutoConf.prototype.buildRequest = function (error, success) {\n var scope = typeof window !== \"undefined\" ? window : {};\n\n if (scope.Gp && scope.Gp.Config && scope.Gp.Config.generalOptions && scope.Gp.Config.layers) {\n if (scope.Gp.Config.generalOptions.apiKeys[this.options.apiKey]) {\n if (this.options.layerId) { // cas d'une autoconf + détaillée sur une couche agrégée\n if (scope.Gp.Config.layers[this.options.layerId] && scope.Gp.Config.layers[this.options.layerId].aggregatedLayers) {\n this.logger.warn(\"Gp.Config existe déjà pour cette clé et cette couche\");\n this.options.onSuccess.call(this, scope.Gp.Config);\n return;\n }\n } else {\n this.logger.warn(\"Gp.Config existe déjà pour cette clé\");\n this.options.onSuccess.call(this, scope.Gp.Config);\n return;\n }\n }\n }\n\n // requete par defaut\n this.request = \"\";\n\n // gestion de l'autoconf local\n // Le fichier en local doit respecter le format de sortie du service.\n // - En XHR, le format est en xml\n // - En JSONP, le format est en xml encapsulé dans un json avec une fonction de callback\n // ex. callback ({\"http\":{\"status\":200,\"error\":null},\"xml\":\"...\"})\n var bLocal;\n if (this.options.serverUrl.indexOf(\"http://\") === -1) {\n bLocal = true;\n } else {\n bLocal = false;\n }\n\n // FIXME param. KVP optionnel sur un service uniquement (pas sur un autoconf local !)\n if (!bLocal && this.layerId) {\n this.request = Helper.normalyzeParameters({\n layerId : this.layerId\n });\n }\n\n // normalement pas d'erreur d'autoconf...\n (this.request || this.request === \"\")\n ? success.call(this, this.request)\n : error.call(this, new ErrorService(_.getMessage(\"SERVICE_REQUEST_BUILD\")));\n};\n\n/**\n * Analyse de la reponse (overwrite)\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback de succès de l'analyse de la réponse\n */\nAutoConf.prototype.analyzeResponse = function (error, success) {\n if (this.response) {\n var options = {\n layerId : this.options.layerId,\n response : this.response,\n rawResponse : this.options.rawResponse,\n onSuccess : success,\n onError : error,\n scope : this\n };\n\n AutoConfResponseFactory.build(options);\n } else {\n error.call(this, new ErrorService(_.getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n }\n};\n\nexport default AutoConf;\n" - }, - { - "id": 61, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Response/AutoConfResponseFactory.js", - "name": "./src/Services/AutoConf/Response/AutoConfResponseFactory.js", - "index": 32, - "index2": 43, - "size": 7098, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/AutoConf.js", - "issuerId": 60, - "issuerName": "./src/Services/AutoConf/AutoConf.js", - "profile": { - "factory": 315, - "building": 179, - "dependencies": 367 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 60, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/AutoConf.js", - "module": "./src/Services/AutoConf/AutoConf.js", - "moduleName": "./src/Services/AutoConf/AutoConf.js", - "type": "harmony import", - "userRequest": "./Response/AutoConfResponseFactory", - "loc": "8:0-73" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 4, - "source": "/**\n * Factory pour générer une reponse JSON à partir d'un XML\n *\n * @module AutoConfReponseFactory\n * @private\n * @alias Gp.Services.AutoConf.Response.AutoConfResponseFactory\n * @todo gérer le cas du JSONP qui encapsule du XML ?\n */\nimport Logger from \"../../../Utils/LoggerByDefault\";\nimport MRes from \"../../../Utils/MessagesResources\";\nimport ErrorService from \"../../../Exceptions/ErrorService\";\nimport XML from \"../../../Formats/XML\";\nimport AutoConfResponseReader from \"../Formats/AutoConfResponseReader\";\n\nvar AutoConfReponseFactory = {\n\n /**\n * interface unique\n * Fabrique d'analyse des réponses (xml) du service d'autoconfiguration.\n * Création d'un format XML, auquel on associe un reader et une chaîne XML, et qui renverra un objet JavaScript correspondant.\n * Si une erreur est levée lors de l'analyse, ou si l'objet est vide ou contient une exception : appel de la fonction de callback onError\n * Sinon, appel de la fonction de callback onSuccess (définies dans Autoconf.analyzeResponse)\n *\n * @method build\n * @static\n * @param {Object} options - options definies dans le composant AutoConf\n *\n * @example\n * var options = {\n * layerId :\n * response :\n * rawResponse :\n * scope :\n * onSuccess :\n * onError :\n * };\n */\n build : function (options) {\n // logger\n var logger = Logger.getLogger(\"AutoConfResponseFactory\");\n logger.trace([\"AutoConfResponseFactory::build()\"]);\n\n // data de type AutoConfResponse\n var data = null;\n\n if (options.response) {\n if (options.rawResponse) {\n data = options.response;\n } else {\n try {\n var p = new XML({\n reader : AutoConfResponseReader\n });\n\n if (typeof options.response === \"string\") {\n p.setXMLString(options.response);\n } else {\n p.setXMLDoc(options.response);\n }\n\n data = p.parse();\n } catch (e) {\n // si une exception a été levée, on appelle le callback d'erreur avec le message renvoyé\n var message = e.message;\n if (typeof options.response === \"string\") {\n message += \"\\n (raw response service'\" + options.response + \"')\";\n } else {\n message += \"\\n (raw response service'\" + options.response.documentElement.innerHTML + \"')\";\n }\n\n options.onError.call(options.scope, new ErrorService({\n message : MRes.getMessage(\"SERVICE_RESPONSE_EXCEPTION\", message),\n status : 200,\n type : ErrorService.TYPE_SRVERR\n }));\n return;\n }\n\n // Si la réponse est vide, on appelle le callback d'erreur\n var isEmpty = true;\n for (var key in data) {\n if (data.hasOwnProperty(key)) {\n isEmpty = false;\n }\n }\n if (isEmpty) {\n options.onError.call(options.scope, new ErrorService(MRes.getMessage(\"SERVICE_RESPONSE_EMPTY_2\")));\n return;\n }\n\n // Si la réponse contenait une exception renvoyée par le service, on appelle le callback d'erreur\n if (data.exceptionReport) {\n options.onError.call(options.scope, new ErrorService({\n message : MRes.getMessage(\"SERVICE_RESPONSE_EXCEPTION\", data.exceptionReport),\n type : ErrorService.TYPE_SRVERR,\n status : 200\n }));\n return;\n }\n }\n } else {\n // si la réponse (xmlString) est vide, on appelle le callback d'erreur\n options.onError.call(options.scope, new ErrorService(MRes.getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n return;\n }\n\n // définition de la variable globale Gp.Config à partir de la réponse\n var scope = typeof window !== \"undefined\" ? window : {};\n\n if (!scope.Gp) {\n scope.Gp = {};\n }\n if (!scope.Gp.Config) {\n scope.Gp.Config = data;\n } else {\n this.mergeConfig(scope.Gp.Config, data, options.layerId);\n }\n\n // si tout s'est bien passé, on appelle le callback de succès\n options.onSuccess.call(options.scope, scope.Gp.Config);\n },\n\n /**\n * Fonction utilisée dans le cas où l'autoconfiguration est appelée plusieurs fois\n * (par exemple pour des clés différentes ou pour des infos sur une couche agrégée)\n *\n * @method mergeConfig\n * @static\n * @param {Object} GpConfig - Variable Gp.Config préexistante\n * @param {Object} data - la nouvelle réponse de l'autoconf, à fusionner avec GpConfig\n * @param {String} [layerId] - l'identifiant d'une couche agrégée dans le cas d'une 2è opération de l'autoconf\n */\n mergeConfig : function (GpConfig, data, layerId) {\n if (data && GpConfig) {\n // on boucle sur les propriétés (generalOptions, layers, projections, services, tileMatrixSets, territories)\n for (var prop in data) {\n if (data.hasOwnProperty(prop)) {\n // on récupère la nouvelle clé dans generalOptions\n if (prop === \"generalOptions\") {\n for (var key in data[prop].apiKeys) {\n if (data[prop].apiKeys.hasOwnProperty(key) && !GpConfig.generalOptions.apiKeys[key]) {\n GpConfig.generalOptions.apiKeys[key] = data[prop].apiKeys[key];\n }\n }\n // on récupère les nouveaux objets (TMS, layers, projections...)\n } else {\n if (GpConfig[prop]) {\n for (var obj in data[prop]) {\n if (data[prop].hasOwnProperty(obj) && !GpConfig[prop][obj]) {\n GpConfig[prop][obj] = data[prop][obj];\n }\n }\n }\n }\n }\n }\n\n // dans le cas d'une autoconf pour une couche agrégée, on récupère l'info\n if (layerId) {\n var aggregatedLayers = [];\n\n for (var lyr in data.layers) {\n if (data.layers.hasOwnProperty(lyr)) {\n aggregatedLayers.push(lyr);\n }\n }\n\n if (GpConfig.layers[layerId]) {\n GpConfig.layers[layerId].aggregatedLayers = aggregatedLayers;\n }\n }\n }\n }\n};\n\nexport default AutoConfReponseFactory;\n" - }, - { - "id": 62, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "name": "./src/Services/AutoConf/Formats/AutoConfResponseReader.js", - "index": 33, - "index2": 42, - "size": 52312, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Response/AutoConfResponseFactory.js", - "issuerId": 61, - "issuerName": "./src/Services/AutoConf/Response/AutoConfResponseFactory.js", - "profile": { - "factory": 369, - "building": 532, - "dependencies": 3 - }, - "failed": false, - "errors": 0, - "warnings": 1, - "reasons": [ - { - "moduleId": 61, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoConf/Response/AutoConfResponseFactory.js", - "module": "./src/Services/AutoConf/Response/AutoConfResponseFactory.js", - "moduleName": "./src/Services/AutoConf/Response/AutoConfResponseFactory.js", - "type": "harmony import", - "userRequest": "../Formats/AutoConfResponseReader", - "loc": "13:0-71" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "\n/**\n * Fonction retournant un objet contenant des clés de lecture (readers)\n * qui permettent de parser des réponses XML du service d'autoconfiguration du Géoportail\n * afin de récupérer les informations retournées.\n * @module AutoConfResponseReader\n * @private\n * @alias Gp.Services.AutoConf.Formats.AutoConfResponseReader\n */\n\n// import Logger from \"../../../Utils/LoggerByDefault\";\nimport AutoConfResponse from \"../Response/model/AutoConfResponse\";\nimport Constraint from \"../Response/model/Constraint\";\nimport Format from \"../Response/model/Format\";\nimport Layer from \"../Response/model/Layer\";\nimport Legend from \"../Response/model/Legend\";\nimport Metadata from \"../Response/model/Metadata\";\nimport Originator from \"../Response/model/Originator\";\nimport Service from \"../Response/model/Service\";\nimport Style from \"../Response/model/Style\";\nimport Territory from \"../Response/model/Territory\";\nimport Thematic from \"../Response/model/Thematic\";\nimport TileMatrixSet from \"../Response/model/TileMatrixSet\";\nimport TileMatrix from \"../Response/model/TileMatrix\";\nimport TileMatrixLimit from \"../Response/model/TileMatrixLimit\";\n\nvar AutoConfResponseReader = {};\n\n/**\n * version du service d'autoconf\n */\nAutoConfResponseReader.VERSION = \"1.1.0\";\n\n/**\n * Objet stockant les différents namespaces et les URI associées\n */\nAutoConfResponseReader.NAMESPACES = {\n xmlns : \"http://www.opengis.net/context\",\n gpp : \"http://api.ign.fr/geoportail\",\n ows : \"http://www.opengis.net/ows/1.1\",\n sld : \"http://www.opengis.net/sld\",\n wmts : \"http://www.opengis.net/wmts/1.0\",\n xlink : \"http://www.w3.org/1999/xlink\",\n xsi : \"http://www.w3.org/2001/XMLSchema-instance\"\n};\n\n/**\n * Localisation (URL) du schema de définition du XML (XSD)\n */\nAutoConfResponseReader.SCHEMALOCATION = [\n \"http://www.opengis.net/context http://gpp3-wxs.ign.fr/schemas/extContext.xsd http://api.ign.fr/geoportail http://wxs.ign.fr/schemas/autoconf/autoconf.xsd\",\n \"http://www.opengis.net/context http://gpp3-wxs.ign.fr/schemas/extContext.xsd http://api.ign.fr/geoportail http://gpp3-wxs.ign.fr/schemas/autoconf.xsd\"\n];\n\n/**\n * Namespace par défaut du format\n */\nAutoConfResponseReader.DEFAULTPREFIX = \"context\";\n\n/**\n * Objet contenant des fonctions de lecture, appelées \"READERS\"\n * dont chaque clé correspond au nom d'un tag du XML que l'on souhaite lire\n * et la valeur associée est une fonction (node, data)\n * où node est un noeud du document DOM\n * et data est un objet où l'on stocke les informations lues dans le XML.\n */\nAutoConfResponseReader.READERS = {\n\n context : {\n\n /** ViewContext */\n ViewContext : function (viewContextNode) {\n // info : balise \"racine\" de la réponse de l'autoconf\n\n // vérification de la version du service, et des namespaces de l'en-tête\n __checkServiceAttributes(viewContextNode);\n\n // create AutoConfResponse\n var config = new AutoConfResponse();\n\n __getChildNodes(viewContextNode, config);\n\n return config;\n },\n\n // info : /General/Title\n // ou : /LayerList/Layer/Title\n /** Title */\n Title : function (titleNode, data) {\n if (data && data.generalOptions) { // cas de la variable config générale\n data.generalOptions.title = __getChildValue(titleNode);\n } else if (data && data.lyr) { // cas d'une layer\n data.lyr.title = __getChildValue(titleNode);\n }\n },\n\n // info : /LayerList/Layer/Abstract\n /** Abstract */\n Abstract : function (node, data) {\n if (data && data.lyr) {\n data.lyr.description = __getChildValue(node);\n }\n },\n\n // info : /General/Extension/gpp:General/gpp:Services/Server\n // ou : /LayerList/Server\n /** Server */\n Server : function (node, data) {\n var serverId = node.getAttribute(\"service\");\n var title = node.getAttribute(\"title\");\n var version = node.getAttribute(\"version\");\n if (serverId) {\n if (data && data.services && typeof data.services === \"object\" && !data.services[serverId]) {\n // on est dans la balise Services\n var s = new Service();\n s.title = title;\n s.version = version;\n // récupération de l'url du service, dans une balise enfant \"OnlineResource\"\n __getChildNodes(node, s);\n // ajout du service à la variable config\n data.services[serverId] = s;\n } else if (data && data.lyr) {\n // on est dans la balise Layer\n if (!data.lyr.serviceParams) {\n // si l'objet serviceParams n'a pas encore été créé, on le crée.\n data.lyr.serviceParams = {};\n }\n data.lyr.serviceParams.id = serverId;\n data.lyr.serviceParams.version = version;\n }\n }\n },\n\n // info : /General/Extension/gpp:General/gpp:Services/Server/OnlineResource\n // ou : /LayerList/Layer/Server/OnlineResource\n // ou : /LayerList/Layer/Extention/gpp:Layer/gpp:QuickLook/OnlineResource\n // ou : /LayerList/Layer/Extension/gpp:Layer/gpp:Legends/gpp:Legend/gpp:LegendURL/OnlineResource\n // ou : /LayerList/Layer/Extension/gpp:Layer/gpp:MetadataURL/OnlineResource\n /** OnlineResource */\n OnlineResource : function (node, service) {\n if (service && service.hasOwnProperty(\"serverUrl\")) {\n service.serverUrl = node.getAttribute(\"xlink:href\");\n }\n },\n\n // info : /LayerList\n /** LayerList */\n LayerList : function (layerListNode, config) {\n // liste de balises \"layer\"\n __getChildNodes(layerListNode, config);\n\n if (config && config.layers && config.generalOptions && config.services) {\n // récupération des clés et des couches associées\n for (var lyr in config.layers) {\n if (config.layers.hasOwnProperty(lyr)) {\n var layerConfig = config.layers[lyr];\n\n // récupération de la clé associée\n var apiKeys = layerConfig.apiKeys;\n if (apiKeys && Array.isArray(apiKeys)) {\n for (var i = 0; i < apiKeys.length; i++) {\n // pour chaque clé API, on ajoute la couche\n var key = apiKeys[i];\n if (config.generalOptions.apiKeys) {\n if (!config.generalOptions.apiKeys[key] || !Array.isArray(config.generalOptions.apiKeys[key])) {\n config.generalOptions.apiKeys[key] = [];\n }\n config.generalOptions.apiKeys[key].push(lyr);\n }\n }\n }\n\n // récupération du service associé\n var serviceParams = layerConfig.serviceParams;\n if (serviceParams && serviceParams.id) {\n if (!config.services[serviceParams.id]) {\n var s = new Service();\n if (serviceParams.serverUrl) {\n s.serverUrl = serviceParams.serverUrl;\n }\n if (serviceParams.version) {\n s.version = serviceParams.version;\n }\n config.services[serviceParams.id] = s;\n }\n }\n\n // récupération de la projection associée (dans le cas d'une couche WMTS)\n if (layerConfig.wmtsOptions && layerConfig.wmtsOptions.tileMatrixSetLink && config.tileMatrixSets) {\n var tmsLink = layerConfig.wmtsOptions.tileMatrixSetLink;\n var tileMatrixSets = config.tileMatrixSets;\n for (var tms in tileMatrixSets) {\n if (tileMatrixSets.hasOwnProperty(tms) && tms === tmsLink) {\n layerConfig.defaultProjection = tileMatrixSets[tms].projection;\n }\n }\n }\n }\n }\n }\n },\n\n // info : /LayerList/Layer\n /** Layer */\n Layer : function (layerNode, config) {\n if (config && config.layers) {\n var lyrData = {\n lyr : new Layer(),\n lyrId : null\n };\n\n var hidden = layerNode.getAttribute(\"hidden\");\n if (hidden === \"1\") {\n lyrData.lyr.hidden = true;\n } else {\n lyrData.lyr.hidden = false;\n }\n\n var queryable = layerNode.getAttribute(\"queryable\");\n if (queryable === \"1\") {\n lyrData.lyr.queryable = true;\n } else {\n lyrData.lyr.queryable = false;\n }\n\n // on peut avoir les balises : Server, Name, Title, Abstract, DataURL, MetadataURL,\n // sld:MinScaleDenominator, sld:MaxScaleDenominator, SRS, FormatList, StyleList\n // DimensionList, Extension\n __getChildNodes(layerNode, lyrData);\n\n // si on a bien récupéré l'identifiant de la couche, on s'en sert pour l'ajouter au tableau associatif des couches disponibles\n if (lyrData.lyrId) {\n // Dans le cas des services, on modifie le contexte de l'identifiant.\n if (lyrData.lyr.serviceParams && lyrData.lyr.serviceParams.id) {\n var serviceid = lyrData.lyr.serviceParams.id;\n if (serviceid.toUpperCase().indexOf(\"OPENLS\") !== -1 || serviceid.toUpperCase().indexOf(\"ELEVATION\") !== -1) {\n // Il faut changer l'identifiant de la ressource.\n var resourceId = lyrData.lyrId.split(\"$\")[0];\n lyrData.lyrId = resourceId + \"$\" + serviceid;\n }\n }\n\n // on ajoute l'information dans les attributs de la couche\n lyrData.lyr.layerId = lyrData.lyrId;\n // et dans le tableau Gp.Config.layers\n config.layers[lyrData.lyrId] = lyrData.lyr;\n }\n }\n },\n\n // info : /LayerList/Layer/Name\n /** TODO : jsdoc block */\n Name : function (node, lyrData) {\n if (lyrData && lyrData.lyr) {\n lyrData.lyr.name = __getChildValue(node);\n }\n },\n\n // info : /LayerList/Layer/SRS (dans le cas des couches WMS ou WFS)\n /** TODO : jsdoc block */\n SRS : function (node, lyrData) {\n // on récupère la projection de la couche (SRS)\n if (lyrData && lyrData.lyr) {\n lyrData.lyr.defaultProjection = __getChildValue(node);\n }\n },\n\n // info : /LayerList/Layer/FormatList/Format\n /** TODO : jsdoc block */\n Format : function (node, lyrData) {\n if (lyrData && lyrData.lyr) {\n var f = new Format();\n var current = node.getAttribute(\"current\");\n if (current === \"1\") {\n f.current = true;\n } else {\n f.current = false;\n }\n f.name = __getChildValue(node);\n // si on n'a pas encore ajouté de format, on crée le tableau vide\n if (!lyrData.lyr.formats || !Array.isArray(lyrData.lyr.formats)) {\n lyrData.lyr.formats = [];\n }\n lyrData.lyr.formats.push(f);\n }\n },\n\n // info : /LayerList/Layer/StyleList/Style\n /** TODO : jsdoc block */\n Style : function (node, lyrData) {\n if (lyrData && lyrData.lyr) {\n var s = new Style();\n var current = node.getAttribute(\"current\");\n if (current === \"1\" || current === 1) {\n s.current = true;\n } else {\n s.current = false;\n }\n if (node.hasChildNodes) {\n var children = node.childNodes;\n var child;\n var childName;\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n if (child.nodeType === 1) { // 1 === node.ELEMENT_NODE\n childName = child.localName || child.baseName || child.nodeName;\n if (childName === \"Name\") {\n s.name = __getChildValue(child);\n } else if (childName === \"Title\") {\n s.title = __getChildValue(child);\n }\n }\n }\n }\n // si on n'a pas encore ajouté de style, on crée le tableau vide\n if (!lyrData.lyr.styles || !Array.isArray(lyrData.lyr.styles)) {\n lyrData.lyr.styles = [];\n }\n lyrData.lyr.styles.push(s);\n }\n },\n\n // info : /LayerList/Layer/DimensionList/Dimension\n /** TODO : jsdoc block */\n Dimension : function (node, lyrData) {\n // possède des attributs obligatoires : name, units, unitSymbol et userValue\n // et d'autres attributs facultatifs : default, multipleValues, nearestValue, current\n var name = node.getAttribute(\"name\");\n var dim = __getChildValue(node);\n if (lyrData && lyrData.lyr) {\n // si on n'a pas encore ajouté de dimension, on crée l'objet vide\n if (!lyrData.lyr.dimensions) {\n lyrData.lyr.dimensions = {};\n }\n if (name === \"Type\") {\n lyrData.lyr.dimensions.type = dim;\n } else if (name === \"VisibilityRange\") {\n lyrData.lyr.dimensions.visibilityRange = dim;\n } else if (name === \"VisibilityMode \") {\n lyrData.lyr.dimensions.visibilityMode = dim;\n } else if (name === \"GeometricType\") {\n lyrData.lyr.dimensions.geometricType = dim;\n } else if (name === \"NoDataValue\") {\n lyrData.lyr.dimensions.noDataValue = dim;\n }\n }\n }\n\n },\n\n gpp : {\n\n // info : /General/Extension/gpp:General/gpp:Theme\n /** TODO : jsdoc block */\n Theme : function (themeNode, config) {\n if (config && config.generalOptions && config.generalOptions.hasOwnProperty(\"theme\")) {\n config.generalOptions.theme = __getChildValue(themeNode);\n }\n },\n\n // info : /General/Extension/gpp:General/gpp:defaultGMLGFIStyleUrl\n /** TODO : jsdoc block */\n defaultGMLGFIStyleUrl : function (node, config) {\n if (config && config.generalOptions && config.generalOptions.hasOwnProperty(\"defaultGMLGFIStyle\")) {\n config.generalOptions.defaultGMLGFIStyle = __getChildValue(node);\n }\n },\n\n // info : /General/Extension/gpp:General/gpp:Territories/gpp:Territory\n /** TODO : jsdoc block */\n Territory : function (territoryNode, config) {\n // info : Information to configure the API for this territory\n var tid = territoryNode.getAttribute(\"id\");\n if (tid) {\n // create a new Territory\n var t = new Territory();\n\n var isDefault = territoryNode.getAttribute(\"default\");\n if (isDefault === \"1\") {\n t.isDefault = true;\n } else {\n t.isDefault = false;\n }\n // read territory informations\n __getChildNodes(territoryNode, t);\n // add territory to config\n if (config && config.territories && typeof config.territories === \"object\") {\n config.territories[tid] = t;\n }\n }\n },\n\n // info : /General/Extension/gpp:General/gpp:Territories/gpp:Territory/gpp:defaultCRS\n /** TODO : jsdoc block */\n defaultCRS : function (node, territory) {\n // info : Identifier for the default Coordinate Reference System (CRS).\n if (territory && territory.hasOwnProperty(\"defaultCRS\")) {\n territory.defaultCRS = __getChildValue(node);\n }\n },\n\n // info : /General/Extension/gpp:General/gpp:Territories/gpp:Territory/gpp:AdditionalCRS\n // ou : /LayerList/Extension/gpp:Layer/gpp:AdditionalCRS\n /** TODO : jsdoc block */\n AdditionalCRS : function (node, data) {\n // info : Identifier for additional Coordinate Reference System (CRS).\n // info : data peut être une instance de Territory.js, ou une instance de Layer.js\n var addCRS = __getChildValue(node);\n if (addCRS && data) {\n if (Array.isArray(data.additionalCRS)) { // cas d'un territoire\n data.additionalCRS.push(addCRS);\n } else { // cas d'une couche\n // si le tableau n'est pas encore créé\n if (!data.additionalProjections || !Array.isArray(data.additionalProjections)) {\n data.additionalProjections = [];\n }\n data.additionalProjections.push(addCRS);\n }\n }\n },\n\n // info : /General/Extension/gpp:General/gpp:Territories/gpp:Territory/gpp:DefaultLayer\n /** TODO : jsdoc block */\n DefaultLayer : function (node, territory) {\n var lyr = node.getAttribute(\"layerId\");\n if (lyr && territory && Array.isArray(territory.defaultLayers)) {\n territory.defaultLayers.push(lyr);\n }\n },\n\n // info : /General/Extension/gpp:General/gpp:Territories/gpp:Territory/gpp:BoundingBox\n // ou : /LayerList/Extension/gpp:Layer/gpp:BoundingBox\n // ou : /LayerList/Layer/Extension/gpp:Layer/gpp:Constraints/gpp:Constraint/gpp:BoundingBox\n // ou : /LayerList/Extension/gpp:Layer/gpp:Originators/gpp:Originator/gpp:Constraints/gpp:Constraint/gpp:BoundingBox\n /** TODO : jsdoc block */\n BoundingBox : function (node, data) {\n if (data) {\n var values = __getChildValue(node).split(\",\");\n if (values.length === 4) {\n // get bbox coordinates (wgs84)\n var bbox = {\n left : parseFloat(values[0]),\n right : parseFloat(values[2]),\n top : parseFloat(values[3]),\n bottom : parseFloat(values[1])\n };\n // get temporal extent params (constraint or layer)\n var minT = node.getAttribute(\"minT\");\n var maxT = node.getAttribute(\"maxT\");\n\n if (data.hasOwnProperty(\"geoBBOX\")) { // cas d'un territoire\n data.geoBBOX = bbox;\n } else if (data.hasOwnProperty(\"bbox\")) { // cas d'une constraint\n if (data.bbox.left || data.bbox.right || data.bbox.top || data.bbox.bottom) {\n // si on a déjà une bbox, il faut stocker d'autres contraintes\n if (!data.multiConstraints) {\n data.multiConstraints = [];\n }\n var newConstraint = new Constraint();\n newConstraint.bbox = bbox;\n newConstraint.temporalExtent = [minT, maxT];\n data.multiConstraints.push(newConstraint);\n } else {\n // contrainte classique\n data.bbox = bbox;\n data.temporalExtent = [minT, maxT];\n }\n } else { // cas d'une layer\n if (!data.globalConstraint) {\n data.globalConstraint = new Constraint();\n }\n data.globalConstraint.bbox = bbox;\n data.globalConstraint.temporalExtent = [minT, maxT];\n }\n }\n }\n },\n\n // info : /General/Extension/gpp:General/gpp:Territories/gpp:Territory/gpp:Resolution\n /** TODO : jsdoc block */\n Resolution : function (node, territory) {\n // info : The default resolution to display on this territory, in CRS coordinate system\n var res = __getChildValue(node);\n if (res && territory && territory.defaultOptions && territory.defaultOptions.hasOwnProperty(\"resolution\")) {\n territory.defaultOptions.resolution = parseFloat(res);\n }\n },\n\n // info : /General/Extension/gpp:General/gpp:Territories/gpp:Territory/gpp:Center/gpp:x\n /** TODO : jsdoc block */\n x : function (node, territory) {\n var lon = __getChildValue(node);\n if (lon && territory && territory.geoCenter && territory.geoCenter.hasOwnProperty(\"lon\")) {\n territory.geoCenter.lon = parseFloat(lon);\n }\n },\n\n // info : /General/Extension/gpp:General/gpp:Territories/gpp:Territory/gpp:Center/gpp:y\n /** TODO : jsdoc block */\n y : function (node, territory) {\n var lat = __getChildValue(node);\n if (lat && territory && territory.geoCenter && territory.geoCenter.hasOwnProperty(\"lat\")) {\n territory.geoCenter.lat = parseFloat(lat);\n }\n },\n\n // info : /General/Extension/gpp:General/gpp:Resolutions\n /** TODO : jsdoc block */\n Resolutions : function (resNode, config) {\n // info : List of resolutions in CRS:84 (comma separated values)\n if (config && config.generalOptions && config.generalOptions.hasOwnProperty(\"wgs84Resolutions\")) {\n config.generalOptions.wgs84Resolutions = __getChildValue(resNode).split(\",\");\n }\n },\n\n // info : /LayerList/Layer/Extension/gpp:Layer\n /** TODO : jsdoc block */\n Layer : function (node, lyrData) {\n // attributs : id, opacity, order, visibleInCatalog, aggregate, more\n if (lyrData && lyrData.hasOwnProperty(\"lyrId\") && lyrData.lyr) {\n lyrData.lyrId = node.getAttribute(\"id\");\n var aggregate = node.getAttribute(\"aggregate\");\n var more = node.getAttribute(\"more\");\n if (aggregate || more) {\n lyrData.lyr.isAggregate = true;\n }\n __getChildNodes(node, lyrData.lyr);\n }\n },\n\n // info : /LayerList/Layer/Extension/gpp:Layer/gpp:Constraints/gpp:Constraint\n // ou : /LayerList/Extension/gpp:Layer/gpp:Originators/gpp:Originator/gpp:Constraints/gpp:Constraint\n /** TODO : jsdoc block */\n Constraint : function (node, data) {\n var c = new Constraint();\n __getChildNodes(node, c);\n if (data) {\n // on peut être dans le cas d'un originator ou d'une layer, tous les deux ont l'attribut constraints\n if (!data.constraints || !Array.isArray(data.constraints)) {\n data.constraints = [];\n }\n\n // cas de plusieurs contraintes (par ex différents territoires)\n if (c.multiConstraints && Array.isArray(c.multiConstraints)) {\n // on récupère la première contrainte, stockée normalement\n var constraint = new Constraint();\n constraint.crs = c.crs;\n constraint.bbox = c.bbox;\n constraint.minScaleDenominator = c.minScaleDenominator;\n constraint.maxScaleDenominator = c.maxScaleDenominator;\n constraint.temporalExtent = c.temporalExtent;\n data.constraints.push(constraint);\n\n // puis on récupère les autres contraintes, à partir de multiConstraints\n for (var i = 0; i < c.multiConstraints.length; i++) {\n constraint = new Constraint();\n constraint.crs = c.crs;\n constraint.minScaleDenominator = c.minScaleDenominator;\n constraint.maxScaleDenominator = c.maxScaleDenominator;\n constraint.bbox = c.multiConstraints[i].bbox;\n constraint.temporalExtent = c.multiConstraints[i].temporalExtent;\n data.constraints.push(constraint);\n }\n } else {\n // cas d'une contrainte classique\n data.constraints.push(c);\n }\n }\n },\n\n // info : /LayerList/Layer/Extension/gpp:Layer/gpp:Originators/gpp:Originator/gpp:Constraints/gpp:Constraint/gpp:CRS\n // ou : /LayerList/Layer/Extension/gpp:Layer/gpp:Constraints/gpp:Constraint/gpp:CRS\n /** TODO : jsdoc block */\n CRS : function (node, data) {\n // nothing to do.\n if (data && data.hasOwnProperty(\"crs\")) {\n data.crs = __getChildValue(node);\n }\n },\n\n // info : /LayerList/Layer/Extension/gpp:Layer/gpp:Thematics/gpp:Thematic\n /** TODO : jsdoc block */\n Thematic : function (node, lyr) {\n if (lyr) {\n var t = new Thematic();\n t.inspire = false;\n t.name = __getChildValue(node);\n // si aucune thématique n'a été ajoutée, on crée le tableau vide\n if (!lyr.thematics || !Array.isArray(lyr.thematics)) {\n lyr.thematics = [];\n }\n lyr.thematics.push(t);\n }\n },\n\n // info : /LayerList/Layer/Extension/gpp:Layer/gpp:Thematics/gpp:InspireThematic\n /** TODO : jsdoc block */\n InspireThematic : function (node, lyr) {\n if (lyr) {\n var t = new Thematic();\n t.inspire = true;\n t.name = __getChildValue(node);\n // si aucune thématique n'a été ajoutée, on crée le tableau vide\n if (!lyr.thematics || !Array.isArray(lyr.thematics)) {\n lyr.thematics = [];\n }\n lyr.thematics.push(t);\n }\n },\n\n // info : /LayerList/Layer/Extension/gpp:Layer/gpp:Originators/gpp:Originator\n /** TODO : jsdoc block */\n Originator : function (node, lyr) {\n if (lyr) {\n // info : contient des balises Attribution, Logo, URL, et Constraints\n var o = new Originator();\n o.name = node.getAttribute(\"name\");\n __getChildNodes(node, o);\n // si aucun originator n'a été ajouté, on crée le tableau vide\n if (!lyr.originators || !Array.isArray(lyr.originators)) {\n lyr.originators = [];\n }\n lyr.originators.push(o);\n }\n },\n\n // info : /LayerList/Layer/Extension/gpp:Layer/gpp:Originators/gpp:Originator/gpp:Attribution\n /** TODO : jsdoc block */\n Attribution : function (node, originator) {\n if (originator && originator.hasOwnProperty(\"attribution\")) {\n originator.attribution = __getChildValue(node);\n }\n },\n\n // info : /LayerList/Layer/Extension/gpp:Layer/gpp:Originators/gpp:Originator/gpp:Logo\n /** TODO : jsdoc block */\n Logo : function (node, originator) {\n if (originator && originator.hasOwnProperty(\"logo\")) {\n originator.logo = __getChildValue(node);\n }\n },\n\n // info : /LayerList/Layer/Extension/gpp:Layer/gpp:Originators/gpp:Originator/gpp:URL\n /** TODO : jsdoc block */\n URL : function (node, originator) {\n if (originator && originator.hasOwnProperty(\"url\")) {\n originator.url = __getChildValue(node);\n }\n },\n\n // info : /LayerList/Layer/Extension/gpp:Layer/gpp:Legends/gpp:Legend\n /** TODO : jsdoc block */\n Legend : function (node, lyr) {\n // 2 balises : sld:MinScaleDenominator et gpp:LegendURL\n var l = new Legend();\n __getChildNodes(node, l);\n if (lyr) {\n // si aucune légende n'a encore été ajoutée, on crée le tableau vide\n if (!lyr.legends || !Array.isArray(lyr.legends)) {\n lyr.legends = [];\n }\n lyr.legends.push(l);\n }\n },\n\n // info : /LayerList/Layer/Extension/gpp:Layer/gpp:Legends/gpp:Legend/gpp:LegendURL\n /** TODO : jsdoc block */\n LegendURL : function (node, legend) {\n if (legend && legend.hasOwnProperty(\"format\")) {\n legend.format = node.getAttribute(\"format\");\n if (node.hasChildNodes) {\n var child = node.childNodes[0];\n var childName = child.localName || child.baseName || child.nodeName;\n if (childName === \"OnlineResource\" && legend.hasOwnProperty(\"url\")) {\n legend.url = child.getAttribute(\"xlink:href\");\n }\n }\n }\n },\n\n // info : /LayerList/Layer/Extension/gpp:Layer/gpp:QuickLook\n /** TODO : jsdoc block */\n QuickLook : function (node, lyr) {\n // info : contient une balise OnlineResource avec l'url dans l'attribut \"xlink:href\"\n if (node.hasChildNodes) {\n var child = node.childNodes[0];\n var childName = child.localName || child.baseName || child.nodeName;\n if (childName === \"OnlineResource\" && lyr) {\n lyr.quicklookUrl = child.getAttribute(\"xlink:href\");\n }\n }\n },\n\n // info : /LayerList/Layer/Extension/gpp:Layer/gpp:MetadataURL\n /** TODO : jsdoc block */\n MetadataURL : function (node, lyr) {\n if (lyr) {\n // info : contient une balise OnlineResource avec l'url dans l'attribut \"xlink:href\"\n var m = new Metadata();\n m.format = node.getAttribute(\"format\");\n if (node.hasChildNodes) {\n var child = node.childNodes[0];\n var childName = child.localName || child.baseName || child.nodeName;\n if (childName === \"OnlineResource\") {\n m.url = child.getAttribute(\"xlink:href\");\n }\n }\n // si aucune metadata n'a été ajoutée, on crée le tableau vide\n if (!lyr.metadata && !Array.isArray(lyr.metadata)) {\n lyr.metadata = [];\n }\n lyr.metadata.push(m);\n }\n },\n\n // info : /LayerList/Layer/Extension/gpp:Layer/gpp:Keys/gpp:Key\n /** TODO : jsdoc block */\n Key : function (node, lyr) {\n if (lyr) {\n // récupération de la clé API\n var key = node.getAttribute(\"id\");\n // si on n'a pas encore ajouté de clé, on crée le tableau vide\n if (!lyr.apiKeys || !Array.isArray(lyr.apiKeys)) {\n lyr.apiKeys = [];\n }\n lyr.apiKeys.push(key);\n\n // récupération de l'url du service avec la clé API\n var serverUrl = __getChildValue(node);\n if (!lyr.serviceParams) {\n lyr.serviceParams = {};\n }\n if (!lyr.serviceParams.serverUrl) {\n lyr.serviceParams.serverUrl = {};\n }\n if (!lyr.serviceParams.serverUrl[key]) {\n lyr.serviceParams.serverUrl[key] = serverUrl;\n }\n }\n }\n\n },\n\n ows : {\n /** TODO : jsdoc block */\n Identifier : function (node, data) {\n if (data && data.hasOwnProperty(\"TMS\")) { // dans le cas d'un TileMatrixSet\n data.identifier = __getChildValue(node);\n } else if (data && data.hasOwnProperty(\"matrixId\")) { // dans le cas d'une TileMatrix\n data.matrixId = __getChildValue(node);\n }\n },\n\n /** TODO : jsdoc block */\n SupportedCRS : function (node, tmsData) {\n if (tmsData && tmsData.TMS && tmsData.TMS.hasOwnProperty(\"projection\")) {\n tmsData.TMS.projection = __getChildValue(node);\n }\n }\n },\n\n sld : {\n // info : /General/Extension/gpp:General/gpp:Territories/gpp:Territory/sld:MinScaleDenominator\n // ou : /LayerList/Layer/sld:MinScaleDenominator\n // ou : /LayerList/Layer/Extension/gpp:Layer/gpp:Originators/gpp:Originator/gpp:Constraints/sld:MinScaleDenominator\n // ou : /LayerList/Layer/Extension/gpp:Layer/gpp:Legends/gpp:Legend/sld:MinScaleDenominator\n /** TODO : jsdoc block */\n MinScaleDenominator : function (node, data) {\n var minScale = __getChildValue(node);\n if (minScale && data) {\n if (data.hasOwnProperty(\"defaultOptions\")) { // cas d'un territoire\n data.defaultOptions.minScaleDenominator = parseFloat(minScale);\n } else if (data.lyr) { // cas d'une layer\n if (!data.lyr.globalConstraint) {\n data.lyr.globalConstraint = new Constraint();\n }\n data.lyr.globalConstraint.minScaleDenominator = parseFloat(minScale);\n } else if (data.hasOwnProperty(\"minScaleDenominator\")) { // cas d'une contrainte ou d'une légende\n data.minScaleDenominator = parseFloat(minScale);\n }\n }\n },\n\n // info : /General/Extension/gpp:General/gpp:Territories/gpp:Territory/sld:MaxScaleDenominator\n // ou : /LayerList/Layer/sld:MaxScaleDenominator\n // ou : /LayerList/Layer/Extension/gpp:Layer/gpp:Originators/gpp:Originator/gpp:Constraints/sld:MaxScaleDenominator\n /** TODO : jsdoc block */\n MaxScaleDenominator : function (node, data) {\n var maxScale = __getChildValue(node);\n if (maxScale && data) {\n if (data.hasOwnProperty(\"defaultOptions\")) { // cas d'un territoire\n data.defaultOptions.maxScaleDenominator = parseFloat(maxScale);\n } else if (data.lyr) { // cas d'une layer\n if (!data.lyr.globalConstraint) {\n data.lyr.globalConstraint = new Constraint();\n }\n data.lyr.globalConstraint.maxScaleDenominator = parseFloat(maxScale);\n } else if (data.hasOwnProperty(\"maxScaleDenominator\")) { // cas d'une contrainte\n data.maxScaleDenominator = parseFloat(maxScale);\n }\n }\n }\n },\n\n wmts : {\n\n // info : /LayerList/Layer/Extension/gpp:Layer/wmts:TileMatrixSetLink/wmts:TileMatrixSetLimits\n /** TODO : jsdoc block */\n TileMatrixSetLimits : function (node, lyr) {\n // info : contient des balises wmts:TileMatrixLimits\n if (lyr) {\n var limits = {};\n // on récupère les limites dans les balises TileMatrixLimits\n __getChildNodes(node, limits);\n\n if (!lyr.wmtsOptions) {\n lyr.wmtsOptions = {};\n }\n lyr.wmtsOptions.tileMatrixSetLimits = limits;\n }\n },\n\n // info : /LayerList/Layer/Extension/gpp:Layer/wmts:TileMatrixSetLink/wmts:TileMatrixSetLimits/wmts:TileMatrixLimits\n /** TODO : jsdoc block */\n TileMatrixLimits : function (node, limits) {\n var limit = new TileMatrixLimit();\n var limitId;\n if (node.hasChildNodes) {\n var children = node.childNodes;\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n var childName = child.localName || child.baseName || child.nodeName;\n if (childName === \"TileMatrix\") {\n limitId = __getChildValue(child);\n } else if (childName === \"MinTileRow\") {\n limit.minTileRow = __getChildValue(child);\n } else if (childName === \"MaxTileRow\") {\n limit.maxTileRow = __getChildValue(child);\n } else if (childName === \"MinTileCol\") {\n limit.minTileCol = __getChildValue(child);\n } else if (childName === \"MaxTileCol\") {\n limit.maxTileCol = __getChildValue(child);\n }\n }\n if (limitId && limits && !limits[limitId]) {\n limits[limitId] = limit;\n }\n }\n },\n\n // info : /General/Extension/gpp:General/gpp:TileMatrixSets/wmts:TileMatrixSet\n // ou : // info : /LayerList/Layer/Extension/gpp:Layer/wmts:TileMatrixSetLink/wmts:TileMatrixSet\n /** TODO : jsdoc block */\n TileMatrixSet : function (node, data) {\n // info : Describes a particular set of tile matrices.\n\n if (data && data.tileMatrixSets) { // les tileMatrixSets de General\n // nouvel objet TileMatrixSet\n var tmsData = {};\n tmsData.TMS = new TileMatrixSet();\n tmsData.resolutions = [];\n\n // lecture des informations du TMS\n __getChildNodes(node, tmsData);\n\n // récupération des identifiants des niveaux de matrice (pour faciliter l'accès au WMTS via les API carto)\n var tileMatrices = tmsData.TMS.tileMatrices;\n for (var tm in tileMatrices) {\n if (tileMatrices.hasOwnProperty(tm)) {\n tmsData.TMS.matrixIds.push(tm);\n }\n }\n\n if (tmsData.TMS.getProjection() === \"IGNF:WGS84G\" || tmsData.TMS.getProjection() === \"EPSG:4326\") {\n if (data.generalOptions && Array.isArray(data.generalOptions.wgs84Resolutions)) {\n var wgs84Resolutions = data.generalOptions.wgs84Resolutions;\n for (var i = 0; i < wgs84Resolutions.length; i++) {\n // info : les résolutions stockées dans wgs84Resolutions, issues de l'autoconf, sont des string\n tmsData.resolutions[i] = parseFloat(wgs84Resolutions[i]);\n }\n }\n }\n\n // tri des résolutions (par ordre décroissant cette fois)\n if (Array.isArray(tmsData.resolutions) && tmsData.resolutions.sort !== undefined) {\n tmsData.resolutions.sort(\n function (x, y) {\n return y - x;\n }\n );\n }\n tmsData.TMS.nativeResolutions = tmsData.resolutions;\n\n // ajout du TileMatrixSet à la variable config\n data.tileMatrixSets[tmsData.identifier] = tmsData.TMS;\n } else { // le TileMatrixSetLink d'une couche (layer)\n if (data && !data.wmtsOptions) {\n data.wmtsOptions = {};\n }\n // ajout du lien vers le TMS\n data.wmtsOptions.tileMatrixSetLink = __getChildValue(node);\n }\n },\n\n // info : /General/Extension/gpp:General/gpp:TileMatrixSets/wmts:TileMatrixSet/wmts:TileMatrix\n /** TODO : jsdoc block */\n TileMatrix : function (node, tmsData) {\n // info : Describes a particular tile matrix.\n\n if (tmsData) {\n // nouveau niveau de matrice : TileMatrix\n var tileMatrix = new TileMatrix();\n\n // lecture des information du TileMatrix\n __getChildNodes(node, tileMatrix);\n\n // calcul de la résolution associée au dénominateur d'échelle du niveau de pyramide, selon la projection.\n if (tmsData.TMS && tmsData.TMS.getProjection()) {\n var proj = tmsData.TMS.getProjection();\n if (proj === \"EPSG:3857\" || proj === \"EPSG:2154\") {\n // calcul de la résolution associée, en m/px\n // en se basant sur une \"taille standard de pixel\" de 0.28mm*0.28mm (standard WMTS 1.0)\n var r = tileMatrix.scaleDenominator * 0.00028;\n if (tmsData.resolutions && Array.isArray(tmsData.resolutions)) {\n tmsData.resolutions.push(r);\n }\n }\n }\n\n // ajout du TileMatrix au TileMatrixSet\n if (tmsData.TMS && tmsData.TMS.tileMatrices) {\n tmsData.TMS.tileMatrices[tileMatrix.matrixId] = tileMatrix;\n }\n }\n },\n\n // info : /General/Extension/gpp:General/gpp:TileMatrixSets/wmts:TileMatrixSet/wmts:TileMatrix/wmts:ScaleDenominator\n /** TODO : jsdoc block */\n ScaleDenominator : function (node, tileMatrix) {\n var scale = __getChildValue(node);\n if (scale && tileMatrix && tileMatrix.hasOwnProperty(\"scaleDenominator\")) {\n tileMatrix.scaleDenominator = parseFloat(scale);\n }\n },\n\n // info : /General/Extension/gpp:General/gpp:TileMatrixSets/wmts:TileMatrixSet/wmts:TileMatrix/wmts:TopLeftCorner\n /** TODO : jsdoc block */\n TopLeftCorner : function (node, tileMatrix) {\n var values = __getChildValue(node).split(\" \");\n if (values && tileMatrix) {\n tileMatrix.topLeftCorner = {};\n tileMatrix.topLeftCorner.x = parseFloat(values[0]);\n tileMatrix.topLeftCorner.y = parseFloat(values[1]);\n }\n },\n\n // info : /General/Extension/gpp:General/gpp:TileMatrixSets/wmts:TileMatrixSet/wmts:TileMatrix/wmts:TileWidth\n /** TODO : jsdoc block */\n TileWidth : function (node, tileMatrix) {\n var value = __getChildValue(node);\n if (value && tileMatrix && tileMatrix.hasOwnProperty(\"tileWidth\")) {\n tileMatrix.tileWidth = parseInt(value, 10);\n }\n },\n\n // info : /General/Extension/gpp:General/gpp:TileMatrixSets/wmts:TileMatrixSet/wmts:TileMatrix/wmts:TileHeight\n /** TODO : jsdoc block */\n TileHeight : function (node, tileMatrix) {\n var value = __getChildValue(node);\n if (value && tileMatrix && tileMatrix.hasOwnProperty(\"tileHeight\")) {\n tileMatrix.tileHeight = parseInt(value, 10);\n }\n },\n\n // info : /General/Extension/gpp:General/gpp:TileMatrixSets/wmts:TileMatrixSet/wmts:TileMatrix/wmts:MatrixWidth\n /** TODO : jsdoc block */\n MatrixWidth : function (node, tileMatrix) {\n var value = __getChildValue(node);\n if (value && tileMatrix && tileMatrix.hasOwnProperty(\"matrixWidth\")) {\n tileMatrix.matrixWidth = parseInt(value, 10);\n }\n },\n\n // info : /General/Extension/gpp:General/gpp:TileMatrixSets/wmts:TileMatrixSet/wmts:TileMatrix/wmts:MatrixHeight\n /** TODO : jsdoc block */\n MatrixHeight : function (node, tileMatrix) {\n var value = __getChildValue(node);\n if (value && tileMatrix && tileMatrix.hasOwnProperty(\"matrixHeight\")) {\n tileMatrix.matrixHeight = parseInt(value, 10);\n }\n }\n },\n\n /** TODO : jsdoc block */\n serviceException : function (node) {\n var response = {};\n if (node.hasChildNodes()) {\n var children = node.childNodes;\n var child;\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n if (child.nodeName === \"exception\") {\n response.exceptionReport = AutoConfResponseReader.READERS[\"exception\"](child);\n }\n }\n }\n return response;\n },\n\n /** TODO : jsdoc block */\n exception : function (node) {\n var exceptionReport = {};\n\n // get exception code\n var exceptionCode = node.getAttribute(\"code\");\n if (exceptionCode) {\n exceptionReport.exceptionCode = exceptionCode;\n }\n\n // get exception message\n var textNode = node.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n exceptionReport.exception = textNode.nodeValue;\n }\n\n return exceptionReport;\n }\n\n};\n\n/**\n * Méthode permettant de lancer la lecture d'une réponse XML du service d'autoconf,\n * à l'aide des READERS de la classe.\n *\n * @method AutoConfResponseReader.read\n * @param {DOMElement} root - racine de la réponse XML à lire\n * @return {Object} config|exceptionReport : l'objet contenant les informations de la réponse XML,\n * sous la forme d'un objet AutoConfResponse, ou un objet littéral exceptionReport si le service a renvoyé une exception.\n * @static\n * @memberof AutoConfResponseReader\n */\nAutoConfResponseReader.read = function (root) {\n if (root.nodeName === \"ViewContext\") {\n var nsPrefix = root.prefix || AutoConfResponseReader.DEFAULTPREFIX;\n var config = AutoConfResponseReader.READERS[nsPrefix][root.nodeName](root);\n return config;\n } else if (root.nodeName === \"serviceException\") {\n var exceptionReport = AutoConfResponseReader.READERS[root.nodeName](root);\n return exceptionReport;\n } else {\n throw new Error(\"Erreur lors de la lecture de la réponse : elle n'est pas au format attendu.\");\n }\n};\n\n/**\n * Récupération des attributs d'un noeud élément\n *\n * @private\n * @memberof AutoConfResponseReader\n * @method __getAttributes\n * @param {DOMElement} node - noeud contenant l'attribut recherché\n * @return {Object} nodeAttributes - objet contenant les noms et valeurs des différents attributs\n */\nfunction __getAttributes (node) {\n if (node.attributes.length > 0) {\n var nodeAttributes = {};\n var attributes = node.attributes;\n for (var i = 0; i < attributes.length; i++) {\n var attribute = attributes[i];\n nodeAttributes[attribute.nodeName] = attribute.nodeValue;\n }\n return nodeAttributes;\n }\n}\n\n/**\n * Récupération des noeuds enfants (seulement de type ELEMENT), à partir d'un noeud donné, pour lecture (readNode).\n *\n * @private\n * @memberof AutoConfResponseReader\n * @method __getChildNodes\n * @param {DOMElement} node - a DOM node\n * @param {Array|Object} [data] - an object to be filled with node data\n */\nfunction __getChildNodes (node, data) {\n if (node.hasChildNodes()) {\n var children = node.childNodes;\n var child;\n var childName;\n var childPrefix;\n\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n\n if (child.nodeType === 1) { // 1 === node.ELEMENT_NODE\n childName = child.localName || child.baseName || child.nodeName;\n childPrefix = child.prefix || AutoConfResponseReader.DEFAULTPREFIX;\n\n if (AutoConfResponseReader.READERS[childPrefix][childName]) {\n var reader = AutoConfResponseReader.READERS[childPrefix][childName];\n reader(child, data);\n } else {\n __getChildNodes(child, data);\n }\n }\n }\n }\n}\n\n/**\n * Lecture de la valeur du premier child d'un noeud, si elle existe.\n *\n * @private\n * @memberof AutoConfResponseReader\n * @method __getChildValue\n * @param {DOMElement} node - a DOM node\n * @return {String} value - valeur du firstChild du noeud en entrée, ou chaîne vide.\n */\nfunction __getChildValue (node) {\n var textNode;\n var value = \"\";\n\n if (node.hasChildNodes()) {\n textNode = node.firstChild;\n if (textNode.nodeType === 3 || textNode.nodeType === 4) { // 3 === node.TEXT_NODE\n value = textNode.nodeValue;\n }\n }\n return value;\n}\n\n/**\n * Vérification des attributs du service, dans la balise XLS de la réponse :\n * version, namespaces, et namespace par défaut doivent correspondre à ceux attendus.\n *\n * @private\n * @memberof AutoConfResponseReader\n * @method __checkServiceAttributes\n * @param {DOMElement} viewContextNode - a DOM node, corresponding to XLS first tag.\n */\nfunction __checkServiceAttributes (viewContextNode) {\n if (viewContextNode.attributes.length > 0) {\n // on récupère et parcourt les attributs de la balise XLS de la réponse\n var xlsAttributes = __getAttributes(viewContextNode);\n for (var att in xlsAttributes) {\n if (xlsAttributes.hasOwnProperty(att)) {\n // vérification de la version\n if (att === \"version\") {\n if (xlsAttributes[\"version\"] !== AutoConfResponseReader.VERSION) {\n console.log(\"[AutoConfResponseReader] autoconf version is not the expected one : there may be errors in parsing\");\n return;\n }\n }\n\n // on vérifie que l'uri du namespace par défaut est bien celle que l'on attend\n if (att === \"xmlns\") {\n if (xlsAttributes[att] !== AutoConfResponseReader.NAMESPACES.xmlns) {\n console.log(\"[AutoConfResponseReader] autoconf response default namespace is not the expected one\");\n return;\n }\n continue;\n }\n\n var prefix = att.split(\":\")[0];\n var ns = att.split(\":\")[1];\n\n // si on a un autre xmlns, on vérifie aussi les URI\n if (prefix === \"xmlns\" && ns) {\n // si l'attribut correspond à un namespace défini dans le reader\n if (AutoConfResponseReader.NAMESPACES[ns]) {\n // il faut que les URI correspondent aussi.\n if (AutoConfResponseReader.NAMESPACES[ns] !== xlsAttributes[att]) {\n console.log(\"[AutoConfResponseReader] autoconf response \" + att + \" namespace is not the expected one\");\n return;\n }\n }\n }\n\n // pour finir on vérifie la localisation du schema XSD du service\n if (ns === \"schemaLocation\") {\n if (xlsAttributes[att] !== AutoConfResponseReader.SCHEMALOCATION[0] && xlsAttributes[att] !== AutoConfResponseReader.SCHEMALOCATION[1]) {\n console.log(\"[AutoConfResponseReader] autoconf response schema location is not the expected one\");\n return;\n }\n }\n }\n }\n }\n}\n\nexport default AutoConfResponseReader;\n" - }, - { - "id": 63, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Geocode.js", - "name": "./src/Services/Geocode/Geocode.js", - "index": 48, - "index2": 67, - "size": 10978, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Services.js", - "issuerId": 45, - "issuerName": "./src/Services/Services.js", - "profile": { - "factory": 513, - "building": 200, - "dependencies": 216 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 45, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Services.js", - "module": "./src/Services/Services.js", - "moduleName": "./src/Services/Services.js", - "type": "harmony import", - "userRequest": "./Geocode/Geocode", - "loc": "11:0-40" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 3, - "source": "\nimport Logger from \"../../Utils/LoggerByDefault\";\nimport _ from \"../../Utils/MessagesResources\";\nimport ErrorService from \"../../Exceptions/ErrorService\";\nimport CommonService from \"../CommonService\";\nimport DirectGeocodeRequestFactory from \"./Request/DirectGeocodeRequestFactory\";\nimport DirectGeocodeResponseFactory from \"./Response/DirectGeocodeResponseFactory\";\n\n/**\n * @classdesc\n * Appel du service de géocodage direct du Géoportail :\n * envoi de la requête construite selon les paramètres en options,\n * éventuellement parsing et analyse de la réponse,\n * retour d'une réponse en paramètre de la fonction onSuccess.\n *\n *\n * @constructor\n * @extends {Gp.Services.CommonService}\n * @alias Gp.Services.Geocode\n *\n * @param {Object} options - options spécifiques au service (+ les options heritées)\n *\n * @param {String|Object} options.location - Nom de l'adresse, du toponyme, de l'unité administrative ou de la parcelle cadastrale recherchée.\n * Sous forme de String, la propriété permet de faire une recherche déstructurée.\n * Sous forme d'objet, la propriété permet de structurer la recherche.\n * Dans ce cas, les propriétés possibles de cet objet sont décrites ci-après.\n * @param {Number} [options.location.number] - Numéro du bâtiment de l'adresse recherchée, dans le cas d'une recherche structurée\n * (si options.location est un objet Javascript).\n * @param {String} [options.location.street] - Nom de la rue de l'adresse recherchée, dans le cas d'une recherche structurée\n * (si options.location est un objet Javascript).\n * @param {String} [options.location.city] - Nom de la ville de l'adresse recherchée, dans le cas d'une recherche structurée\n * (si options.location est un objet Javascript).\n * @param {Number} [options.location.postalCode] - Numéro du code postal de l'adresse recherchée, dans le cas d'une recherche structurée\n * (si options.location est un objet Javascript).\n *\n * @param {Object} [options.filterOptions] - Les propriétés possibles de cet objet sont décrites ci-après.\n * @param {Object} [options.filterOptions.bbox] - Emprise dans laquelle on souhaite effectuer la recherche.\n * Les propriétés possibles de cet objet sont décrites ci-après.\n * @param {Float} options.filterOptions.bbox.left - Abscisse du côté gauche de la BBOX\n * @param {Float} options.filterOptions.bbox.right - Abscisse du côté droit de la BBOX\n * @param {Float} options.filterOptions.bbox.top - Ordonnée supérieure de la BBOX\n * @param {Float} options.filterOptions.bbox.bottom - Ordonnée inférieure de la BBOX\n *\n * @param {Array.} [options.filterOptions.type = \"StreetAddress\"] - Type de l'objet recherché.\n * Le service de géocodage du Géoportail permet de rechercher des 'PostionOfInterest' pour des toponymes, des 'StreetAddress'\n * pour des adresses postales, et/ou des 'CadastralParcel' pour des parcelles cadastrales.\n * D'autres types pourront être rajoutés selon l'évolution du service.\n * Par défaut, type = ['StreetAddress'].\n *\n * @param {String} [options.filterOptions.[proprietes du filtre]] - Critère supplémentaire pour filtrer la recherche sous la forme\n * d'un couple clé/valeur à définir selon les possibilités du serveur ajouté à la requête.\n * Le service de géocodage du Géoportail permet de filtrer tous les résultats avec les propriétés :\n * \"municipality\", \"insee\", et \"department\".\n * Il permet aussi de filtrer les adresses postales avec les propriétés :\n * \"quality\", \"ID\", \"ID_TR\" et \"territory\".\n * Il permet de filtrer les toponymes avec les propriétés :\n * \"importance\", \"nature\" et \"territory\".\n * Enfin, il permet de filtrer les parcelles cadastrales avec les propriétés :\n * \"sheet\", \"section\", et \"absorbedcity\". Pas de valeur par défaut.\n *\n * @param {Number} [options.maximumResponses] - Nombre de réponses maximal que l'on souhaite recevoir.\n * Pas de valeur par défaut.\n * Si le serveur consulté est celui du Géoportail, la valeur par défaut sera donc celle du service : 25.\n *\n * @param {Boolean} [options.returnFreeForm] - Indique si l'on souhaite en réponse un localisant concaténée plutôt que structuré.\n * Pas de valeur par défaut. Si le serveur consulté est celui du Géoportail, la valeur par défaut sera donc celle du service : 'false'.\n *\n * @param {String} [options.srs] - Système de coordonnées dans lequel les paramètres géographiques en entrée et la réponse du service sont exprimés.\n * Pas de valeur par défaut. Si le serveur consulté est celui du Géoportail, la valeur par défaut sera donc celle du service : 'EPSG:4326'.\n *\n * @example\n * var options = {\n * apiKey : null,\n * serverUrl : 'http://localhost/service/',\n * protocol : 'JSONP', // JSONP|XHR\n * proxyURL : null,\n * httpMethod : 'GET', // GET|POST\n * timeOut : 10000, // ms\n * rawResponse : false, // true|false\n * scope : null, // this\n * onSuccess : function (response) {},\n * onFailure : function (error) {},\n * // spécifique au service\n * positions : [{lon:, lat:}, {lon:, lat:}],\n * (...)\n * };\n * @private\n */\nfunction Geocode (options) {\n if (!(this instanceof Geocode)) {\n throw new TypeError(_.getMessage(\"CLASS_CONSTRUCTOR\", \"Geocode\"));\n }\n\n /**\n * Nom de la classe (heritage)\n * FIXME instance ou classe ?\n */\n this.CLASSNAME = \"Geocode\";\n\n // appel du constructeur par heritage\n CommonService.apply(this, arguments);\n\n this.logger = Logger.getLogger(\"Gp.Services.Geocode\");\n this.logger.trace(\"[Constructeur Geocode (options)]\");\n\n if (!options.location) {\n throw new Error(_.getMessage(\"PARAM_MISSING\", \"location\"));\n }\n\n // FIXME ECMAScript 5 support\n if (typeof options.location === \"object\" && Object.keys(options.location).length === 0) {\n throw new Error(_.getMessage(\"PARAM_EMPTY\", \"location\"));\n } else if (typeof options.location === \"string\" && options.location.length === 0) {\n throw new Error(_.getMessage(\"PARAM_EMPTY\", \"location\"));\n }\n\n // ajout des options spécifiques au service\n this.options.location = options.location;\n\n // on definit des filtres apr defaut\n if (!options.filterOptions || typeof options.filterOptions !== \"object\") {\n this.options.filterOptions = options.filterOptions = {\n type : [\"StreetAddress\"]\n };\n }\n\n // FIXME ECMAScript 5 support (valable pour un objet uniquement !)\n // ceci permet de tester le cas où 'options.filterOptions' : {}\n if (Object.keys(options.filterOptions).length === 0) {\n this.options.filterOptions = {\n type : [\"StreetAddress\"]\n };\n }\n\n var filter = Object.keys(options.filterOptions);\n for (var i = 0; i < filter.length; i++) {\n var key = filter[i];\n // on transforme certains filtres qui pourraient être numériques en string\n var filtersCouldBeNumberList = [\"department\", \"number\", \"postalCode\", \"insee\", \"importance\", \"ID\", \"IDTR\", \"absorbedCity\", \"sheet\", \"section\", \"inseeRegion\", \"inseeDepartment\"];\n if (filtersCouldBeNumberList.indexOf(key) !== -1 && typeof options.filterOptions[key] !== \"string\") {\n options.filterOptions[key] = options.filterOptions[key].toString();\n }\n // on supprime les filtres vides\n if (!options.filterOptions[key]) {\n delete this.options.filterOptions[key];\n }\n }\n\n this.options.filterOptions.type = options.filterOptions.type || [\"StreetAddress\"];\n this.options.maximumResponses = options.maximumResponses || 25;\n this.options.returnFreeForm = options.returnFreeForm || false;\n this.options.srs = options.srs || \"EPSG:4326\";\n\n // attributs d'instances\n\n /**\n * Format forcé de la réponse du service : \"xml\"\n * sauf si l'on souhaite une reponse brute (options.rawResponse)\n */\n this.options.outputFormat = (this.options.rawResponse) ? \"\" : \"xml\";\n}\n\n/**\n * @lends module:Geocode#\n */\nGeocode.prototype = Object.create(CommonService.prototype, {\n // todo\n // getter/setter\n});\n\n/*\n * Constructeur (alias)\n */\nGeocode.prototype.constructor = Geocode;\n\n/**\n * Création de la requête (overwrite)\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nGeocode.prototype.buildRequest = function (error, success) {\n var options = {\n httpMethod : this.options.httpMethod,\n // options specifiques du service\n location : this.options.location,\n returnFreeForm : this.options.returnFreeForm,\n filterOptions : this.options.filterOptions,\n srs : this.options.srs,\n maximumResponses : this.options.maximumResponses\n };\n\n this.request = DirectGeocodeRequestFactory.build(options);\n\n // on teste si la requete a bien été construite !\n (!this.request)\n ? error.call(this, new ErrorService(_.getMessage(\"SERVICE_REQUEST_BUILD\")))\n : success.call(this, this.request);\n};\n\n/**\n * Analyse de la reponse (overwrite)\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nGeocode.prototype.analyzeResponse = function (error, success) {\n /* INFO :\n Etape 1 : Création de la requête\n -> Appel du format OpenLS pour créer une requête à partir des paramètres (par exemple)\n (soit directement une URL si GET, soit une requête XML si POST)\n /!\\ tester si apiKey && serverUrl => on ne garde que serverUrl\n -> stockage de la requête dans this.request\n Etape 2 : Envoi de la requête selon le bon protocole\n -> appel du protocol JSONP ou XHR, et envoi (par ex send ()) (this.protocol)\n -> récupération de la réponse xml dans la fonction onSuccess () (this.response)\n -> si code HTTP 200 et pas de message d'erreur : etape 3\n -> si code HTTP != 200 : lancement de la fonction de callback onFailure avec le message d'erreur\n Etape 3 : Analyse de la réponse xml et construction du JSON (si rawResponse === false )\n -> appel du parser pour récupérer le xmlDocument\n -> appel du reader OpenLS pour lire les éléments et récupérer l'objet JSON\n correspondant au type de géocodage (défini dans les specs)\n Etape 4 : Lancement de la fonction de callback onSuccess avec la réponse :\n -> xmlResponse (si rawResponse === true)\n -> ou geocodedLocations\n */\n\n if (this.response) {\n var options = {\n response : this.response,\n rawResponse : this.options.rawResponse,\n onError : error,\n onSuccess : success,\n scope : this\n };\n\n DirectGeocodeResponseFactory.build(options);\n } else {\n error.call(this, new ErrorService(_.getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n }\n};\n\nexport default Geocode;\n" - }, - { - "id": 64, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "name": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "index": 49, - "index2": 61, - "size": 3292, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Geocode.js", - "issuerId": 63, - "issuerName": "./src/Services/Geocode/Geocode.js", - "profile": { - "factory": 220, - "building": 488, - "dependencies": 56 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 63, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Geocode.js", - "module": "./src/Services/Geocode/Geocode.js", - "moduleName": "./src/Services/Geocode/Geocode.js", - "type": "harmony import", - "userRequest": "./Request/DirectGeocodeRequestFactory", - "loc": "6:0-80" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 4, - "source": "/**\n * Creation d'une requête OpenLS en mode POST ou GET\n * (Factory)\n *\n * @module DirectGeocodeRequestFactory\n * @alias Gp.Services.Geocode.Request.DirectGeocodeRequestFactory\n * @private\n */\nimport Logger from \"../../../Utils/LoggerByDefault\";\nimport XLS from \"../../../Formats/XLS\";\nimport LocationUtilityService from \"../../../Formats/XLS/LocationUtilityService\";\nimport GeocodeFilterExtension from \"../../../Formats/XLS/LocationUtilityService/GeocodeFilterExtension\";\nimport StreetAddress from \"../Request/model/StreetAddress\";\nimport PositionOfInterest from \"../Request/model/PositionOfInterest\";\nimport CadastralParcel from \"../Request/model/CadastralParcel\";\nimport Administratif from \"../Request/model/Administratif\";\n\nvar DirectGeocodeRequestFactory = {\n\n /**\n * interface unique\n *\n * @method build\n * @static\n * @param {Object} options - options definies dans le composant Geocode\n *\n * @example\n * var options = {\n * httpMethod:\n * // options specifiques du service\n * location:\n * returnFreeForm:\n * filterOptions:\n * srs:\n * maximumResponses:\n * };\n * var result = DirectGeocodeRequestFactory.build(options);\n * if (!result) {\n * // error...\n * }\n * @returns {String} request\n */\n build : function (options) {\n // logger\n var logger = Logger.getLogger(\"DirectGeocodeRequestFactory\");\n logger.trace([\"DirectGeocodeRequestFactory::build()\"]);\n\n var request = null;\n\n // gestion des filtres (table de geocodage) !\n // par defaut, on les ajoute toute ...\n var oFilter = new GeocodeFilterExtension();\n oFilter.addFilterExtensions(new Administratif());\n oFilter.addFilterExtensions(new StreetAddress());\n oFilter.addFilterExtensions(new PositionOfInterest());\n oFilter.addFilterExtensions(new CadastralParcel());\n\n // objet LUS\n // on peut aussi par un objet XLS::GeocodeRequest\n var oLUS = new LocationUtilityService({\n location : options.location,\n returnFreeForm : options.returnFreeForm,\n filterOptions : options.filterOptions\n });\n oLUS.addFilter(oFilter);\n\n // Format XLS\n var oXLS = new XLS({\n srsName : options.srs,\n maximumResponses : options.maximumResponses\n });\n oXLS.namespace = true;\n oXLS.setService(oLUS);\n\n // request brute !\n request = oXLS.build();\n\n // en mode GET, la requête est encodée\n // et le param. 'qxml' est ajouté\n if (options.httpMethod === \"GET\") {\n var myRequest = \"qxml=\" +\n encodeURIComponent(request)\n .replace(/-/g, \"%2D\")\n .replace(/_/g, \"%5F\")\n .replace(/\\./g, \"%2E\")\n .replace(/!/g, \"%21\")\n .replace(/~/g, \"%7E\")\n .replace(/\\*/g, \"%2A\")\n .replace(/'/g, \"%27\")\n .replace(/\\(/g, \"%28\")\n .replace(/\\)/g, \"%29\");\n request = myRequest;\n }\n\n logger.trace(request);\n\n return request;\n }\n};\n\nexport default DirectGeocodeRequestFactory;\n" - }, - { - "id": 65, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/RequestHeader.js", - "name": "./src/Formats/XLS/RequestHeader.js", - "index": 51, - "index2": 45, - "size": 1927, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS.js", - "issuerId": 11, - "issuerName": "./src/Formats/XLS.js", - "profile": { - "factory": 742, - "building": 125, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 11, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS.js", - "module": "./src/Formats/XLS.js", - "moduleName": "./src/Formats/XLS.js", - "type": "harmony import", - "userRequest": "./XLS/RequestHeader", - "loc": "2:0-48" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 6, - "source": "import Logger from \"../../Utils/LoggerByDefault\";\n\n/**\n * @classdesc\n *\n * Entête de la requête XSL\n *\n * @example\n * // header XSL\n * header = new RequestHeader ();\n * header.srsName = \"epsg:4326\";\n * header.toString();\n * // out ->\n * // \n *\n * @constructor\n * @alias Gp.Formats.XLS.RequestHeader\n * @param {Object} options - options\n * @param {Object} options.srsName - projection\n * @param {Function} options.onsuccess - function callback success (TODO)\n * @param {Function} options.onerror - function callback error (TODO)\n *\n * @private\n */\nfunction RequestHeader (options) {\n this.logger = Logger.getLogger();\n this.logger.trace(\"[Constructeur RequestHeader ()]\");\n\n if (!(this instanceof RequestHeader)) {\n throw new TypeError(\"RequestHeader constructor cannot be called as a function.\");\n }\n\n // options par defaut\n this.options = options || {\n srsName : \"EPSG:4326\"\n };\n\n // et on ajoute les options en paramètre aux options par défaut\n for (var opt in options) {\n if (options.hasOwnProperty(opt)) {\n this.options[opt] = options[opt];\n }\n }\n}\n\nRequestHeader.prototype = {\n\n /**\n * @lends module:RequestHeader#\n */\n\n /**\n * request (out)\n * @type {String}\n */\n requestString : null,\n\n /**\n * Template de la requête.\n * substitution des valeurs suivantes :\n * __SRSNAME__\n */\n template : \"\",\n\n /**\n * Constructeur (alias)\n */\n constructor : RequestHeader,\n\n /**\n * toString\n * @returns {String} requête\n */\n toString : function () {\n var template = null;\n template = this.template;\n template = template.replace(/__SRSNAME__/g, this.options.srsName);\n this.requestString = template;\n return this.requestString;\n }\n};\n\nexport default RequestHeader;\n" - }, - { - "id": 66, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/Request.js", - "name": "./src/Formats/XLS/Request.js", - "index": 52, - "index2": 46, - "size": 3174, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS.js", - "issuerId": 11, - "issuerName": "./src/Formats/XLS.js", - "profile": { - "factory": 743, - "building": 111, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 11, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS.js", - "module": "./src/Formats/XLS.js", - "moduleName": "./src/Formats/XLS.js", - "type": "harmony import", - "userRequest": "./XLS/Request", - "loc": "3:0-36" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 6, - "source": "/* jshint bitwise: false */\nimport Logger from \"../../Utils/LoggerByDefault\";\n\n/**\n * @classdesc\n *\n * Requête XLS\n *\n * @example\n * // request XSL\n * request = new Request ();\n * request.maximumResponses = 26;\n * request.methodName = \"GeocodeRequest\";\n * request.version = \"1.2\";\n * request.toString();\n * // out ->\n * // \n * // \n * // \n *\n * @constructor\n * @alias Gp.Formats.XLS.Request\n * @param {Object} options - options\n * @param {Object} options.maximumResponses - 25\n * @param {String} options.methodName - nom de l'objet LUS, \"GeocodeRequest\" | \"ReverseGeocodeRequest\"\n * @param {String} options.version - '1.2'\n * @param {Function} options.onsuccess - function callback success (TODO)\n * @param {Function} options.onerror - function callback error (TODO)\n *\n * @private\n */\nfunction Request (options) {\n this.logger = Logger.getLogger();\n this.logger.trace(\"[Constructeur Request ()]\");\n\n if (!(this instanceof Request)) {\n throw new TypeError(\"Request constructor cannot be called as a function.\");\n }\n\n // options par defaut\n this.options = options || {\n maximumResponses : 25,\n methodName : null,\n version : \"1.2\"\n };\n\n // et on ajoute les options en paramètre aux options par défaut\n for (var opt in options) {\n if (options.hasOwnProperty(opt)) {\n this.options[opt] = options[opt];\n }\n }\n}\n\nRequest.prototype = {\n\n /**\n * @lends module:Request#\n */\n\n /**\n * request (out)\n * @type {String}\n */\n requestString : null,\n\n /**\n * Template de la requête.\n * substitution des valeurs suivantes :\n * __MAXRESPONSES__, __METHODNAME__, __UUID__, __VERSION__\n * __REQUESTSERVICE__\n */\n template : \"\" +\n \"\" +\n \"\",\n\n /**\n * Constructeur (alias)\n */\n constructor : Request,\n\n /**\n * an rfc4122 version 4 compliant guid\n * @returns {String} guid\n */\n guid : function () {\n // INFO\n // cf. http://byronsalau.com/blog/how-to-create-a-guid-uuid-in-javascript/\n return \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g, function (c) {\n var r = Math.random() * 16 | 0;\n var v = c === \"x\" ? r : (r & 0x3 | 0x8);\n return v.toString(16);\n });\n },\n\n /**\n * toString\n * @returns {String} requête\n */\n toString : function () {\n var template = null;\n template = this.template;\n template = template.replace(/__MAXRESPONSES__/g, this.options.maximumResponses);\n template = template.replace(/__METHODNAME__/g, this.options.methodName);\n template = template.replace(/__UUID__/g, this.guid());\n template = template.replace(/__VERSION__/g, this.options.version);\n\n this.requestString = template;\n return this.requestString;\n }\n};\n\nexport default Request;\n" - }, - { - "id": 67, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService/GeocodeRequest.js", - "name": "./src/Formats/XLS/LocationUtilityService/GeocodeRequest.js", - "index": 55, - "index2": 51, - "size": 7049, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService.js", - "issuerId": 38, - "issuerName": "./src/Formats/XLS/LocationUtilityService.js", - "profile": { - "factory": 713, - "building": 151, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 38, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService.js", - "module": "./src/Formats/XLS/LocationUtilityService.js", - "moduleName": "./src/Formats/XLS/LocationUtilityService.js", - "type": "harmony import", - "userRequest": "./LocationUtilityService/GeocodeRequest", - "loc": "3:0-69" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 6, - "source": "import Logger from \"../../../Utils/LoggerByDefault\";\nimport Address from \"./model/Address\";\nimport GeocodeFilterExtension from \"./GeocodeFilterExtension\";\n\n/**\n * @classdesc\n * Requête de geocodage direct\n *\n * ```\n * XSD\n * Geocodage direct (balise xsd) :\n * element ref=\"RequestHeader\" [ (attribute name=\"clientName\" attribute name=\"clientPassword\" attribute name=\"sessionID\" attribute name=\"srsName\" attribute name=\"MSID\") ]\n * element name=\"Request\" attribute name=\"methodName\" attribute name=\"version\" attribute name=\"requestID\" [ attribute name=\"maximumResponses\" ]\n * element name=\"GeocodeRequest\" attribute name=\"returnFreeForm\"\n * element ref=\"xls:Address\"\n * ```\n *\n * @example\n * // creation de l'objet Geocode an ajoutant un objet Address\n * req = new GeocodeRequest ();\n * req.returnFreeForm = true; // TODO !\n * req.addAddress (new Address ({\n * location : \"saint mandé\",\n * type : ['PositionOfInterest'],\n * filter : {\n * (...)\n * }\n * }));\n * req.toString();\n * // out ->\n * // \n * //
\n * // saint mandé\n * //
\n * //
\n *\n * // creation de l'objet Geocode avec les options uniquement\n * req = new GeocodeRequest ({\n * location : \"saint mandé\",\n * returnFreeForm : true,\n * filterOptions : {\n * type : ['PositionOfInterest'],\n * (...)\n * }\n * });\n * req.toString();\n * // out ->\n * // \n * //
\n * // saint mandé\n * //
\n * //
\n * @constructor\n *\n * @alias Gp.Formats.XLS.LocationUtilityService.GeocodeRequest\n * @param {Object} options - options\n * @param {Object} options.location - location\n * @param {String} options.returnFreeForm - returnFreeForm\n * @param {String} options.filterOptions - filtres\n * @param {Function} options.onsuccess - function callback success (TODO)\n * @param {Function} options.onerror - function callback error (TODO)\n *\n * @private\n */\nfunction GeocodeRequest (options) {\n this.logger = Logger.getLogger();\n this.logger.trace(\"[Constructeur GeocodeRequest ()]\");\n\n if (!(this instanceof GeocodeRequest)) {\n throw new TypeError(\"GeocodeRequest constructor cannot be called as a function.\");\n }\n\n // options par defaut\n this.options = options || {};\n\n // et on ajoute les options en paramètre aux options par défaut\n for (var opt in options) {\n if (options.hasOwnProperty(opt)) {\n this.options[opt] = options[opt];\n }\n }\n\n // TODO\n // gestion de l'option 'returnFreeForm' si elle n'est pas renseignée dans les options !\n\n /**\n * Nom de la classe (heritage)\n */\n this.CLASSNAME = \"GeocodeRequest\";\n}\n\nGeocodeRequest.prototype = {\n\n /**\n * @lends module:GeocodeRequest#\n */\n\n /**\n * request (out)\n * @type {String}\n */\n strRequest : null,\n\n /**\n * Addresse\n * @type {Address}\n */\n oAddress : null,\n\n /**\n * Filter\n * @type {GeocodeFilterExtension}\n */\n oFilter : null,\n\n /**\n * Template de la requête.\n * substitution des valeurs suivantes :\n * __ADDRESS__, __RETURNFREEFORM__\n */\n template : \"\" +\n \"__ADDRESS__\" +\n \"\",\n\n /**\n * Ajout d'un objet de type Adresse\n *\n * @param {Object} oAddress - Adresse\n */\n addAddress : function (oAddress) {\n if (oAddress instanceof Address) {\n this.oAddress = oAddress;\n }\n },\n\n /**\n * Ajout d'un objet de type GeocodeFilterExtension\n *\n * @param {Object} oFilter - GeocodeFilterExtension\n */\n addFilter : function (oFilter) {\n // FIXME gestion des filtres à partir des tables de geocodages\n if (oFilter instanceof GeocodeFilterExtension) {\n this.oFilter = oFilter;\n }\n },\n\n /**\n * Constructeur (alias)\n */\n constructor : GeocodeRequest,\n\n /**\n * toString\n *\n * @returns {String} requête\n */\n toString : function () {\n var template = \"\";\n template = this.template;\n\n // soit on a déjà un objet Address instancié,\n // sinon, on le fabrique via les options\n if (!this.oAddress) {\n var settings = {};\n settings.location = this.options.location;\n settings.type = this.options.filterOptions.type || [\"StreetAddress\"];\n settings.filter = this.options.filterOptions;\n delete settings.filter.type; // on ne met pas le 'type' dans les filtres...\n\n // gestion des filtres\n if (this.oFilter) {\n // on reconstruit les filtres\n settings.filter = {};\n\n // on determine la liste des filtres possibles\n // pour chaque table de geocodage en param\n for (var idx in settings.type) {\n var filter = settings.type[idx];\n var oFilter = this.oFilter.getFilter(filter);\n\n if (!oFilter) {\n this.logger.warn(\"Le filtre '\" + filter + \"' n'existe pas !?\");\n continue;\n }\n\n var mFilter = this.options.filterOptions;\n\n // correspondances des attributs de filtres possibles avec ceux qui sont en options\n var attributs = oFilter.attributesList;\n for (var idxe = 0; idxe < attributs.length; idxe++) {\n var key = attributs[idxe];\n if (mFilter[key]) {\n var matchingKey = oFilter.serviceAttributes[idxe];\n oFilter.placeAttributes[matchingKey] = mFilter[key];\n this.logger.trace(\"Selection du filtre '\" + key + \"' sur le type '\" + filter + \"'.\");\n }\n }\n\n // ajout des valeurs des filtres\n var places = oFilter.placeAttributes;\n for (var kplace in places) {\n if (places.hasOwnProperty(kplace)) {\n settings.filter[kplace] = places[kplace];\n }\n }\n }\n }\n\n this.oAddress = new Address(settings);\n if (!this.oAddress) {\n throw new Error(\"La construction de l'adresse n'est pas correctement definie !?\");\n }\n }\n\n // FIXME gestion des filtres pour un objet Address déjà instancié ?\n\n template = template.replace(/__ADDRESS__/g, this.oAddress.toString());\n template = template.replace(/__RETURNFREEFORM__/g, (this.options.returnFreeForm) ? \"true\" : \"false\");\n\n this.strRequest = template;\n return this.strRequest;\n }\n};\n\nexport default GeocodeRequest;\n" - }, - { - "id": 68, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService/model/Address.js", - "name": "./src/Formats/XLS/LocationUtilityService/model/Address.js", - "index": 56, - "index2": 49, - "size": 9314, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService/GeocodeRequest.js", - "issuerId": 67, - "issuerName": "./src/Formats/XLS/LocationUtilityService/GeocodeRequest.js", - "profile": { - "factory": 122, - "building": 73, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 67, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService/GeocodeRequest.js", - "module": "./src/Formats/XLS/LocationUtilityService/GeocodeRequest.js", - "moduleName": "./src/Formats/XLS/LocationUtilityService/GeocodeRequest.js", - "type": "harmony import", - "userRequest": "./model/Address", - "loc": "2:0-38" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 7, - "source": "\nimport Logger from \"../../../../Utils/LoggerByDefault\";\n\n/**\n * @classdesc\n *\n * Location type \"Address\".\n *\n * Modèles de classes :\n * ------------------\n * ```\n *\n * Address\n * (est composé de)\n * ______ | _________ _________________\n * / | \\ \\\n * Place (StreetAddress ou FreeFormAddress) PostalCode\n * (*) _|_\n * / \\\n * Street Building\n * ```\n * ```\n * XSD\n * Address (balise xsd) :\n * ex.
1 r de paris saint denis
\n * attribute name=\"countryCode\"\n * element name=\"freeFormAddress\"\n * element ref=\"xls:Place\"\n * element ref=\"gml:Envelope\"\n * ou\n * ex.
1 rue MarconiMetz57000
\n * attribute name=\"countryCode\"\n * element ref=\"xls:StreetAddress\"\n * element ref=\"xls:PostalCode\"\n * element ref=\"xls:Place\"\n * element ref=\"gml:Envelope\"\n * ```\n *\n * @example\n * // simple\n * adr = new Address ({\n * location : \"2 av pasteur, Saint-Mandée\",\n * type : [\"StreetAddress\"],\n * filter : {}\n * });\n * adr.toString();\n * // -> out\n * //
\n * // 2 av pasteur, Saint-Mandée\n * //
\n *\n * // avec filtre\n * adr = new Address ({\n * location : {\n * number : 2,\n * street : \"av pasteur\",\n * city : \"Saint-Mandée\", // FIXME filter Place \"commune\" ou \"municipality\" ?\n * postalCode : \"94166\" // FIXME filter Place ou balise PostalCode ?\n * },\n * type : [\"StreetAddress\"],\n * filter : {\n * territory : \"FR\",\n * department : \"94\"\n * }\n * });\n * adr.toString();\n * // -> out\n * //
\n * // \n * // \n * // 2 av pasteur\n * // \n * // Saint-Mandée\n * // 94\n * // FR\n * // 94166\n * //
\n *\n * // avec bbox\n * adr = new Address ({\n * location : \"2 av pasteur, Saint-Mandée\",\n * type : [\"StreetAddress\"],\n * filter : {\n * bbox : {left:1, right:2, top:2, bottom:0}\n * }\n * });\n * adr.toString();\n * // -> out\n * //
\n * // 2 av pasteur, Saint-Mandée\n * // \n * // 1 0\n * // 2 2\n * // \n * //
\n *\n * @constructor\n * @alias Gp.Formats.XLS.LocationUtilityService.Address\n * @param {Object} options - options\n * @param {Object} options.location - location\n * @param {String} options.type - type\n * @param {String} options.filter - filtres\n * @param {String} options.filter.* - Filtré en fonction des tables de geocodage interrogées\n *\n * @private\n */\nfunction Address (options) {\n this.logger = Logger.getLogger(\"Address\");\n this.logger.trace(\"[Constructeur Address ()]\");\n\n if (!(this instanceof Address)) {\n throw new TypeError(\"Address constructor cannot be called as a function.\");\n }\n\n // param par defaut\n this.options = options || {\n location : {},\n type : [\"StreetAddress\"],\n filter : {}\n };\n\n // param obligatoire\n if (!options.location) {\n throw new Error(\"l'option 'location' n'est pas renseignée !\");\n }\n\n // et on ajoute les options en paramètre aux options par défaut\n for (var opt in options) {\n if (options.hasOwnProperty(opt)) {\n this.options[opt] = options[opt];\n }\n }\n}\n\n/**\n * @lends module:Address#\n */\nAddress.prototype = {\n\n /**\n * Constructeur (alias)\n */\n constructor : Address,\n\n /**\n * request (out)\n * @type {String}\n */\n requestString : null,\n\n /**\n * Template de la requête.\n *\n * substitution des valeurs suivantes :\n * - address : __COUNTRYCODE__, __LOCATION__, __PLACE__, __POSTALCODE__, __ENVELOPE__\n * - freeFormAddress : __FREEFORMADDRESSVALUE__\n * - streetAddress : __STREET__, __BUILDING__\n * - street : __STREETVALUE__\n * - building : __BUILDINGVALUE__\n * - place : __PLACEATYPE__, __PLACEVALUE__\n * - postalCode : __POSTALCODEVALUE__\n * - gml:envelope : __LEFT__ __BOTTOM__ __RIGHT__ __TOP__\n *\n * @todo gestion de l\"indentation\n */\n template : {\n address : \"
\" +\n \"__LOCATION__\" +\n \"__PLACE__\" +\n \"__POSTALCODE__\" +\n \"__ENVELOPE__\" +\n \"
\",\n location : {\n freeFormAddress : \"__FREEFORMADDRESSVALUE__\",\n streetAddress : {\n container : \"\" +\n \"__STREET__\" +\n \"__BUILDING__\" +\n \"\",\n building : \"\",\n street : \"__STREETVALUE__\"\n }\n },\n place : \"__PLACEVALUE__\",\n postalCode : \"__POSTALCODEVALUE__\",\n envelope : \"\" +\n \"__LEFT__ __BOTTOM__\" +\n \"__RIGHT__ __TOP__\" +\n \"\"\n }\n\n};\n\n/**\n * toString\n *\n * @returns {String} requête\n */\nAddress.prototype.toString = function () {\n var template = null;\n template = this.template.address;\n template = template.replace(/__COUNTRYCODE__/g, this.options.type);\n\n // on a une adresse structurée ou libre ?\n if (typeof this.options.location === \"string\") {\n // balise freeFormeAddress\n var tmplFreeFormAddress = this.template.location.freeFormAddress;\n tmplFreeFormAddress = tmplFreeFormAddress.replace(/__FREEFORMADDRESSVALUE__/g, this.options.location);\n template = template.replace(/__LOCATION__/g, tmplFreeFormAddress);\n } else {\n // balises Street et Building\n var tmplBuilding = \"\";\n var tmplStreet = \"\";\n\n if (this.options.location.number) {\n tmplBuilding = this.template.location.streetAddress.building;\n tmplBuilding = tmplBuilding.replace(/__BUILDINGVALUE__/g, this.options.location.number);\n }\n\n if (this.options.location.street) {\n tmplStreet = this.template.location.streetAddress.street;\n tmplStreet = tmplStreet.replace(/__STREETVALUE__/g, this.options.location.street);\n }\n\n // balise streetAddress\n var tmplStreetAddress = this.template.location.streetAddress.container;\n tmplStreetAddress = tmplStreetAddress.replace(/__STREET__/g, tmplStreet);\n tmplStreetAddress = tmplStreetAddress.replace(/__BUILDING__/g, tmplBuilding);\n template = template.replace(/__LOCATION__/g, tmplStreetAddress);\n }\n\n // a t on un filtre de type PostalCode ?\n var tmplPostalCode = \"\";\n if (this.options.location.postalCode) {\n tmplPostalCode = this.template.postalCode;\n tmplPostalCode = tmplPostalCode.replace(/__POSTALCODEVALUE__/g, this.options.location.postalCode);\n }\n\n // a t on un filtre de type GML::Envelope ?\n var tmplEnvelope = \"\";\n if (this.options.filter) {\n var bbox = this.options.filter.bbox;\n if (bbox) {\n tmplEnvelope = this.template.envelope;\n tmplEnvelope = tmplEnvelope.replace(/__LEFT__/g, bbox.left);\n tmplEnvelope = tmplEnvelope.replace(/__BOTTOM__/g, bbox.bottom);\n tmplEnvelope = tmplEnvelope.replace(/__RIGHT__/g, bbox.right);\n tmplEnvelope = tmplEnvelope.replace(/__TOP__/g, bbox.top);\n }\n }\n\n // liste des filtres Place\n var Places = [];\n\n // a t on des filtres de type Place ?\n var tmplPlace = \"\";\n if (this.options.filter) {\n var filters = this.options.filter;\n for (var filter in filters) {\n if (filter === \"bbox\") {\n continue;\n }\n // FIXME gestion des filtres spécifiques IGN ?\n tmplPlace = this.template.place;\n tmplPlace = tmplPlace.replace(/__PLACETYPE__/g, filter);\n tmplPlace = tmplPlace.replace(/__PLACEVALUE__/g, filters[filter]);\n Places.push(tmplPlace);\n }\n }\n\n // a t on un filtre de type Place dans location ?\n var tmplPlaceCity = \"\";\n if (this.options.location.city) {\n tmplPlaceCity = this.template.place;\n tmplPlaceCity = tmplPlaceCity.replace(/__PLACETYPE__/g, \"Municipality\");\n tmplPlaceCity = tmplPlaceCity.replace(/__PLACEVALUE__/g, this.options.location.city);\n Places.push(tmplPlaceCity);\n }\n\n template = template.replace(/__POSTALCODE__/g, tmplPostalCode);\n template = template.replace(/__PLACE__/g, Places.join(\"\\n\"));\n template = template.replace(/__ENVELOPE__/g, tmplEnvelope);\n\n this.requestString = template;\n return this.requestString;\n};\n\nexport default Address;\n" - }, - { - "id": 69, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService/ReverseGeocodeRequest.js", - "name": "./src/Formats/XLS/LocationUtilityService/ReverseGeocodeRequest.js", - "index": 58, - "index2": 54, - "size": 5333, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService.js", - "issuerId": 38, - "issuerName": "./src/Formats/XLS/LocationUtilityService.js", - "profile": { - "factory": 713, - "building": 174, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 38, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService.js", - "module": "./src/Formats/XLS/LocationUtilityService.js", - "moduleName": "./src/Formats/XLS/LocationUtilityService.js", - "type": "harmony import", - "userRequest": "./LocationUtilityService/ReverseGeocodeRequest", - "loc": "4:0-83" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 6, - "source": "\nimport Logger from \"../../../Utils/LoggerByDefault\";\nimport Position from \"./model/Position\";\nimport Preference from \"./model/Preference\";\n\n/**\n * @classdesc\n *\n * Requête de geocodage inverse\n *\n * XSD\n * ```\n * Geocodage inverse (balise xsd) :\n * element ref=\"RequestHeader\" [ (attribute name=\"clientName\" attribute name=\"clientPassword\" attribute name=\"sessionID\" attribute name=\"srsName\" attribute name=\"MSID\") ]\n * element name=\"Request\" attribute name=\"methodName\" attribute name=\"version\" attribute name=\"requestID\" [ attribute name=\"maximumResponses\" ]\n * element name=\"ReverseGeocodeRequest\"\n * element ref=\"xls:Position\"\n * element name=\"ReverseGeocodePreference\" (enumeration)\n * ```\n *\n * @example\n * // creation de l\"objet ReverseGeocode\n * req = new ReverseGeocodeRequest ();\n * req.addPosition (new Position (position:{x: , y: }));\n * req.addPreference ([\"StreetAddress\"]);\n * req.toString();\n * // out ->\n * // \n * // \n * // \n * // 50.347775 3.205098\n * // \n * // \n * // StreetAddress\n * // \n * @constructor\n * @alias Gp.Formats.XLS.ReverseGeocodeRequest\n * @param {Object} options - options\n * @param {Object} options.position - position\n * @param {String} options.returnFreeForm - returnFreeForm\n * @param {String} options.filterOptions - filtres\n * @param {Function} options.onsuccess - function callback success (TODO)\n * @param {Function} options.onerror - function callback error (TODO)\n *\n * @private\n */\nfunction ReverseGeocodeRequest (options) {\n this.logger = Logger.getLogger();\n this.logger.trace(\"[Constructeur ReverseGeocodeRequest ()]\");\n\n if (!(this instanceof ReverseGeocodeRequest)) {\n throw new TypeError(\"ReverseGeocodeRequest constructor cannot be called as a function.\");\n }\n\n // options par defaut\n this.options = options || {};\n\n // et on ajoute les options en paramètre aux options par défaut\n for (var opt in options) {\n if (options.hasOwnProperty(opt)) {\n this.options[opt] = options[opt];\n }\n }\n\n /**\n * Nom de la classe (heritage)\n */\n this.CLASSNAME = \"ReverseGeocodeRequest\";\n}\n\nReverseGeocodeRequest.prototype = {\n\n /**\n * @lends module:ReverseGeocodeRequest#\n */\n\n /**\n * request (out)\n * @type {String}\n */\n strRequest : null,\n\n /**\n * Position\n * @type {Position}\n */\n oPosition : null,\n\n /**\n * Preference\n * @type {Preference}\n */\n oPreference : null,\n\n /**\n * Constructeur (alias)\n */\n constructor : ReverseGeocodeRequest,\n\n /**\n * Template de la requête.\n * substitution des valeurs suivantes :\n * __POSITION__, __PREFERENCE__, __RETURNFREEFORM__\n */\n template : \"\" +\n \"__POSITION__\" +\n \"__PREFERENCE__\" +\n \"\",\n\n /**\n * Ajout d\"un objet de type Position\n *\n * @param {Object} oPosition - Position\n */\n addPosition : function (oPosition) {\n if (oPosition instanceof Position) {\n this.oPosition = oPosition;\n }\n },\n\n /**\n * Ajout d\"une liste de table de référence LUS :\n * [StreetAddress, PointOfInterest, CadastralParcel, Administrativ]\n *\n * @param {Object} oPreference - Preference\n */\n addPreferences : function (oPreference) {\n if (oPreference instanceof Preference) {\n this.oPreference = oPreference;\n }\n },\n\n /**\n * toString\n * @returns {String} requête\n */\n toString : function () {\n var template = \"\";\n template = this.template;\n\n // si on a déjà un objet Preference instancié,\n // sinon, on le fabrique via les options\n if (!this.oPreference) {\n this.oPreference = new Preference(this.options.filterOptions.type || [\"StreetAddress\"]);\n if (!this.oPreference) {\n throw new Error(\"Les preferences ne sont pas definies !?\");\n }\n }\n template = template.replace(/__PREFERENCE__/g, this.oPreference.toString());\n\n // si on a déjà un objet Position instancié,\n // sinon, on le fabrique via les options\n if (!this.oPosition) {\n var settings = {\n position : this.options.position,\n filter : {}\n };\n\n // FIXME gestion des filtres ?\n if (this.options.filterOptions) {\n settings.filter = this.options.filterOptions;\n delete settings.filter.type; // pas besoin ?\n }\n this.oPosition = new Position(settings);\n if (!this.oPosition) {\n throw new Error(\"La position et ses filtres ne sont pas definis !?\");\n }\n }\n template = template.replace(/__POSITION__/g, this.oPosition.toString());\n template = template.replace(/__RETURNFREEFORM__/g, (this.options.returnFreeForm) ? \"true\" : \"false\");\n\n this.strRequest = template;\n return this.strRequest;\n }\n};\n\nexport default ReverseGeocodeRequest;\n" - }, - { - "id": 70, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService/model/Position.js", - "name": "./src/Formats/XLS/LocationUtilityService/model/Position.js", - "index": 59, - "index2": 52, - "size": 6776, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService/ReverseGeocodeRequest.js", - "issuerId": 69, - "issuerName": "./src/Formats/XLS/LocationUtilityService/ReverseGeocodeRequest.js", - "profile": { - "factory": 99, - "building": 126, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 69, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService/ReverseGeocodeRequest.js", - "module": "./src/Formats/XLS/LocationUtilityService/ReverseGeocodeRequest.js", - "moduleName": "./src/Formats/XLS/LocationUtilityService/ReverseGeocodeRequest.js", - "type": "harmony import", - "userRequest": "./model/Position", - "loc": "3:0-40" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 7, - "source": "import Logger from \"../../../../Utils/LoggerByDefault\";\n\n/**\n * @classdesc\n * Location de type Position\n *\n * ```\n * XSD\n * Position (balise xsd) :\n * ex. 50.347775 3.205098\n * ex. 48.85978570614691 2.29135727611288781000\n * (au choix)\n * element ref=\"gml:Point\"\n * element ref=\"gml:CircleByCenterPoint\"\n * element ref=\"gml:Polygon\"\n * element ref=\"gml:MultiPolygon\"\n * ```\n *\n * FIXME les autres elements ne sont pas implémentés (QoP, Speed, Direction, Time, ...) ?\n *\n * ```\n * template : \"\n * __GMLPOINT__\n * __GMLFILTER__\n * \"\n * ```\n * ```\n * GML : {\n * pos : \"__X__ __Y__\",\n * point : \"__POS__\",\n * circle : \"__POS____RADIUS__\",\n * // not yet implemented !\n * polygon : \"\",\n * multipolygon : \"\"\n * }\n * ```\n *\n * @constructor\n * @alias Gp.Formats.XLS.LocationUtilityService.Position\n * @param {Object} options - options données en entrée\n * @param {Object} options.position - x/y\n * @param {Object} options.filter - filtre\n * @param {Object} options.filter.circle - un cercle\n * @param {Object} options.filter.polygon - un polygone\n *\n * @private\n */\nfunction Position (options) {\n this.logger = Logger.getLogger(\"Position\");\n this.logger.trace(\"[Constructeur Position ()]\");\n\n if (!(this instanceof Position)) {\n throw new TypeError(\"Position constructor cannot be called as a function.\");\n }\n\n // param par defaut\n this.options = options || {};\n\n // param obligatoire\n if (!options.position) {\n throw new Error(\"l'option 'position' n'est pas renseignée !\");\n }\n\n // et on ajoute les options en paramètre aux options par défaut\n for (var opt in options) {\n if (options.hasOwnProperty(opt)) {\n this.options[opt] = options[opt];\n }\n }\n}\n\n/**\n * @lends module:Position#\n */\nPosition.prototype = {\n\n /**\n * Constructeur (alias)\n */\n constructor : Position,\n\n /**\n * request (out)\n * @type {String}\n */\n requestString : null,\n\n /**\n * Template de la requête.\n *\n * substitution des valeurs suivantes :\n * __GMLPOINT__ __GMLFILTER__\n * __X__ __Y__ __RADIUS__\n * __XY__\n * @todo indentation XML\n * @todo implementation classe GML\n */\n template : {\n position : \"\" +\n \"__GMLPOINT__\" +\n \"__GMLFILTER__\" +\n \"\",\n gml : {\n point : \"__X__ __Y__\",\n pos : null,\n filter : {\n bbox : \"\" +\n \"__LEFT__ __BOTTOM__\" +\n \"__RIGHT__ __TOP__\" +\n \"\",\n circle : \"__X__ __Y____RADIUS__\",\n polygon : \"__XY__\",\n multipolygon : null\n }\n }\n }\n};\n\n/**\n * toString\n *\n * @returns {String} requête\n */\nPosition.prototype.toString = function () {\n var template = this.template.position;\n\n var tmplGmlPoint = this.template.gml.point;\n tmplGmlPoint = tmplGmlPoint.replace(/__X__/g, this.options.position.x);\n tmplGmlPoint = tmplGmlPoint.replace(/__Y__/g, this.options.position.y);\n\n var tmplGmlFilter = \"\";\n if (this.options.filter) {\n var filter = this.options.filter;\n\n for (var name in filter) {\n switch (name) {\n case \"circle\":\n tmplGmlFilter = this.template.gml.filter[name];\n tmplGmlFilter = tmplGmlFilter.replace(/__X__/g, filter[name].x);\n tmplGmlFilter = tmplGmlFilter.replace(/__Y__/g, filter[name].y);\n tmplGmlFilter = tmplGmlFilter.replace(/__RADIUS__/g, filter[name].radius);\n break;\n case \"bbox\":\n tmplGmlFilter = this.template.gml.filter[name];\n tmplGmlFilter = tmplGmlFilter.replace(/__LEFT__/g, filter[name].left);\n tmplGmlFilter = tmplGmlFilter.replace(/__BOTTOM__/g, filter[name].bottom);\n tmplGmlFilter = tmplGmlFilter.replace(/__RIGHT__/g, filter[name].right);\n tmplGmlFilter = tmplGmlFilter.replace(/__TOP__/g, filter[name].top);\n break;\n case \"polygon\":\n // FIXME implementation simple du polygone !\n // aucun test de fermeture du polygone, ni de gestion des trous !\n tmplGmlFilter = this.template.gml.filter[name];\n var strPoints = \"\";\n var lstPoints = filter[name];\n for (var i = 0; i < lstPoints.length; i++) {\n var coord = lstPoints[i];\n if (Array.isArray(coord)) {\n this.logger.error(\"Holes are not implemented !\");\n break;\n }\n if ((coord.x && coord.y) || (coord.x === 0 || coord.y === 0)) {\n strPoints += coord.x + \" \" + coord.y;\n }\n if (lstPoints.length !== i + 1) {\n strPoints += \" \";\n }\n }\n tmplGmlFilter = tmplGmlFilter.replace(/__XY__/g, strPoints);\n break;\n case \"multipolygon\":\n this.logger.warn(\"Filter '\" + name + \"' is not yet implemented !\");\n break;\n default:\n this.logger.error(\"This filter '\" + name + \"' is not useful !\");\n }\n }\n }\n\n template = template.replace(/__GMLPOINT__/g, tmplGmlPoint);\n template = template.replace(/__GMLFILTER__/g, tmplGmlFilter);\n\n this.requestString = template;\n return this.requestString;\n};\n\nexport default Position;\n" - }, - { - "id": 71, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService/model/Preference.js", - "name": "./src/Formats/XLS/LocationUtilityService/model/Preference.js", - "index": 60, - "index2": 53, - "size": 1686, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService/ReverseGeocodeRequest.js", - "issuerId": 69, - "issuerName": "./src/Formats/XLS/LocationUtilityService/ReverseGeocodeRequest.js", - "profile": { - "factory": 99, - "building": 139, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 69, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/LocationUtilityService/ReverseGeocodeRequest.js", - "module": "./src/Formats/XLS/LocationUtilityService/ReverseGeocodeRequest.js", - "moduleName": "./src/Formats/XLS/LocationUtilityService/ReverseGeocodeRequest.js", - "type": "harmony import", - "userRequest": "./model/Preference", - "loc": "4:0-44" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 7, - "source": "import Logger from \"../../../../Utils/LoggerByDefault\";\n\n/**\n * @classdesc\n *\n * Preference (Reverse)\n *\n * FIXME liste des types de tables de geocodage\n *\n * ```\n * template : \"__TYPE__\"\n * ```\n *\n * @constructor\n * @alias Gp.Formats.XLS.LocationUtilityService.Preference\n * @param {String} type - type de table de geocodage\n *\n * @private\n *\n */\n\nfunction Preference (type) {\n this.logger = Logger.getLogger(\"Preference\");\n this.logger.trace(\"[Constructeur Preference ()]\");\n\n if (!(this instanceof Preference)) {\n throw new TypeError(\"Preference constructor cannot be called as a function.\");\n }\n\n /**\n * type de table de geocodage\n * @type {Array.}\n */\n this.type = type;\n}\n\n/**\n * @lends module:Preference#\n */\nPreference.prototype = {\n\n /**\n * Constructeur (alias)\n */\n constructor : Preference,\n\n /**\n * request (out)\n * @type {String}\n */\n requestString : null,\n\n /**\n * Template de la requête.\n *\n * substitution des valeurs suivantes :\n * __TYPE__\n *\n */\n template : \"__TYPE__\"\n};\n\n/**\n * toString\n *\n * @returns {String} requête\n */\nPreference.prototype.toString = function () {\n var Preferences = [];\n var tmplPreference = \"\";\n for (var idx = 0; idx < this.type.length; idx++) {\n tmplPreference = this.template;\n tmplPreference = tmplPreference.replace(/__TYPE__/g, this.type[idx]);\n Preferences.push(tmplPreference);\n }\n\n this.strRequest = Preferences.join(\"\\n\");\n return this.strRequest;\n};\n\nexport default Preference;\n" - }, - { - "id": 72, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/model/StreetAddress.js", - "name": "./src/Services/Geocode/Request/model/StreetAddress.js", - "index": 61, - "index2": 57, - "size": 2024, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "issuerId": 64, - "issuerName": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "profile": { - "factory": 60, - "building": 926 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 64, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "module": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "moduleName": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "type": "harmony import", - "userRequest": "../Request/model/StreetAddress", - "loc": "13:0-59" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "\nimport GeocodeLocation from \"../GeocodeLocation\";\n\n/**\n * @classdesc\n * Format des attributs d'un résultat de géocodage de type StreetAddress.\n *\n * @constructor\n * @alias Gp.Services.Geocode.Request.StreetAddress\n * @private\n */\nfunction StreetAddress () {\n if (!(this instanceof StreetAddress)) {\n throw new TypeError(\"StreetAddress constructor cannot be called as a function.\");\n }\n\n // INFO\n // appel du constructeur de la classe mère\n // avec passage de param.\n GeocodeLocation.apply(this, arguments);\n\n /**\n * Nom de la classe (heritage)\n * @type {String}\n */\n this.CLASSNAME = \"StreetAddress\";\n\n /**\n * Liste des attributs possibles pour une GeocodeLocation de type StreetAddress\n * - **bbox** : Emprise de l'adresse dans le système de coordonnées demandé {left, right, top, bottom}. *{Object}*\n * - **ID** : Identifiant BD ADRESSE dans le cas où le résultat est une adresse. *{String}*\n * - **IDTR** : Identifiant \"Route Adresse\" de la voie portant l'adresse dans la base BD ADRESSE. *{String}*\n * - **quality** : Indicateur de qualité du géocodage (pour plus d'infos : http://api.ign.fr/tech-docs-js/fr/developpeur/search.html *{String}*\n * - **territory** : Code du territoire français où se situe l'adresse *{String}*\n * - **commune** : Ville l'adresse. *{String}*\n * - **department** : Département l'adresse. *{String}*\n * - **insee** : Code INSEE de l'adresse. *{Number}*\n * - **municipality** : Municipalité de l'adresse. *{String}*\n */\n\n this.attributesList = [\"bbox\", \"ID\", \"IDTR\", \"quality\", \"territory\", \"commune\", \"department\", \"insee\", \"municipality\"];\n\n this.serviceAttributes = [\"bbox\", \"ID\", \"IDTR\", \"Qualite\", \"Territoire\", \"Commune\", \"Departement\", \"INSEE\", \"Municipality\"];\n}\n\n/**\n * @lends module:StreetAdress#\n */\nStreetAddress.prototype = Object.create(GeocodeLocation.prototype);\n\n/**\n * Constructeur (alias)\n */\nStreetAddress.prototype.constructor = StreetAddress;\n\nexport default StreetAddress;\n" - }, - { - "id": 73, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/model/PositionOfInterest.js", - "name": "./src/Services/Geocode/Request/model/PositionOfInterest.js", - "index": 63, - "index2": 58, - "size": 1866, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "issuerId": 64, - "issuerName": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "profile": { - "factory": 60, - "building": 937, - "dependencies": 58 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 64, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "module": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "moduleName": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "type": "harmony import", - "userRequest": "../Request/model/PositionOfInterest", - "loc": "14:0-69" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "\nimport GeocodeLocation from \"../GeocodeLocation\";\n\n/**\n * @classdesc\n * Format des attributs d'un résultat de géocodage de type PositionOfInterest\n *\n * @constructor\n * @alias Gp.Services.Geocode.Request.PositionOfInterest\n * @private\n */\nfunction PositionOfInterest () {\n if (!(this instanceof PositionOfInterest)) {\n throw new TypeError(\"PositionOfInterest constructor cannot be called as a function.\");\n }\n\n // INFO\n // appel du constructeur de la classe mère\n // avec passage de param.\n GeocodeLocation.apply(this, arguments);\n\n /**\n * Nom de la classe (heritage)\n * @type {String}\n */\n this.CLASSNAME = \"PositionOfInterest\";\n\n /**\n * Liste des attributs possibles pour une GeocodeLocation de type PositionOfInterest\n * - **bbox** : Emprise du toponyme dans le système de coordonnées demandé {left, right, top, bottom} *{Object}*\n * - **importance** : Importance du toponyme *{number}*\n * - **nature** : Nature du toponyme. *{String}*\n * - **territory** : Code du territoire français où se situe le toponyme *{String}*\n * - **commune** : Ville du toponyme. *{String}*\n * - **department** : Département du toponyme. *{String}*\n * - **insee** : Code INSEE de la commune où se situe le toponyme. *{Number}*\n * - **municipality** : Municipalité du toponyme. *{String}*\n */\n\n this.attributesList = [\"bbox\", \"importance\", \"nature\", \"territory\", \"commune\", \"department\", \"insee\", \"municipality\"];\n\n this.serviceAttributes = [\"bbox\", \"Importance\", \"Nature\", \"Territoire\", \"Commune\", \"Departement\", \"INSEE\", \"Municipality\"];\n}\n\n/**\n * @lends module:PositionOfInterest#\n */\nPositionOfInterest.prototype = Object.create(GeocodeLocation.prototype);\n\n/**\n * Constructeur (alias)\n */\nPositionOfInterest.prototype.constructor = PositionOfInterest;\n\nexport default PositionOfInterest;\n" - }, - { - "id": 74, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/model/CadastralParcel.js", - "name": "./src/Services/Geocode/Request/model/CadastralParcel.js", - "index": 64, - "index2": 59, - "size": 2168, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "issuerId": 64, - "issuerName": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "profile": { - "factory": 60, - "building": 945, - "dependencies": 50 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 64, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "module": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "moduleName": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "type": "harmony import", - "userRequest": "../Request/model/CadastralParcel", - "loc": "15:0-63" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "\nimport GeocodeLocation from \"../GeocodeLocation\";\n\n/**\n * @classdesc\n * Format des attributs d'un filtre de géocodage de type CadastralParcel.\n *\n * @constructor\n * @alias Gp.Services.Geocode.Request.CadastralParcel\n * @private\n */\nfunction CadastralParcel () {\n if (!(this instanceof CadastralParcel)) {\n throw new TypeError(\"CadastralParcel constructor cannot be called as a function.\");\n }\n\n // INFO\n // appel du constructeur de la classe mère\n // avec passage de param.\n GeocodeLocation.apply(this, arguments);\n\n /**\n * Nom de la classe (heritage)\n */\n this.CLASSNAME = \"CadastralParcel\";\n\n /**\n * Liste des attributs possibles pour une GeocodeLocation de type CadastralParcel\n * - **absorbedCity** : Code commune absorbée de la parcelle :\n * lorsqu'une parcelle est issue p d'une ancienne commune qui a fusionné avec une autre.\n * Sinon, le code vaut '000'. *{String}*\n * - **sheet** : Feuille de la parcelle (ex 1). *{String}*\n * - **number** : Numéro de la parcelle (ex. 0041) *{String}*\n * - **section** : Section de la parcelle (ex 0D). *{String}*\n * - **commune** : Ville du filtre. *{String}*\n * - **department** : Département du filtre. *{String}*\n * - **insee** : Code INSEE du filtre. *{Number}*\n * - **municipality** : Municipalité du filtre. *{String}*\n * - **origin** : L'origine de l'objet parcellaire renvoyé\n * (correspond à l'attribut \"type\" dans la réponse XML)\n * Pour plus d'informations : http://api.ign.fr/tech-docs-js/fr/developpeur/search.html#Recherche_par_parcelles_cadastrales *{Number}*\n *\n */\n\n this.attributesList = [\"absorbedCity\", \"sheet\", \"number\", \"section\", \"commune\", \"department\", \"insee\", \"municipality\", \"origin\"];\n\n this.serviceAttributes = [\"CommuneAbsorbee\", \"Feuille\", \"Numero\", \"Section\", \"Commune\", \"Departement\", \"INSEE\", \"Municipality\", \"Type\"];\n}\n\n/**\n * @lends module:CadastralParcel#\n */\nCadastralParcel.prototype = Object.create(GeocodeLocation.prototype);\n\n/**\n * Constructeur (alias)\n */\nCadastralParcel.prototype.constructor = CadastralParcel;\n\nexport default CadastralParcel;\n" - }, - { - "id": 75, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/model/Administratif.js", - "name": "./src/Services/Geocode/Request/model/Administratif.js", - "index": 65, - "index2": 60, - "size": 1597, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "issuerId": 64, - "issuerName": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "profile": { - "factory": 61, - "building": 981, - "dependencies": 13 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 64, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "module": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "moduleName": "./src/Services/Geocode/Request/DirectGeocodeRequestFactory.js", - "type": "harmony import", - "userRequest": "../Request/model/Administratif", - "loc": "16:0-59" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "\nimport GeocodeLocation from \"../GeocodeLocation\";\n\n/**\n * @classdesc\n * Format des attributs d'un filtre de géocodage de type Administratif.\n * @constructor\n * @alias Gp.Services.Geocode.Request.Administratif\n * @private\n */\nfunction Administratif () {\n if (!(this instanceof Administratif)) {\n throw new TypeError(\"Administratif constructor cannot be called as a function.\");\n }\n\n // INFO\n // appel du constructeur de la classe mère\n // avec passage de param.\n GeocodeLocation.apply(this, arguments);\n\n /**\n * Nom de la classe (heritage)\n * @type {String}\n */\n this.CLASSNAME = \"Administratif\";\n\n /**\n * Liste des attributs possibles pour une GeocodedLocation de type Administratif\n * - **bbox** : Emprise de l'unité administrative dans le système de coordonnées demandé *{left, right, top, bottom}*\n * - **prefecture** - Nom de la préfécture de la région ou du département *{String}*\n * - **inseeRegion** - Numéro INSEE de la région *{String}*\n * - **inseeDepartment** - Numéro INSEE du département *{String}*\n * - **municipality** - Nom de l'unité administrative *{String}*\n *\n */\n\n this.attributesList = [\"bbox\", \"prefecture\", \"inseeRegion\", \"inseeDepartment\", \"municipality\"];\n\n this.serviceAttributes = [\"bbox\", \"Prefecture\", \"InseeRegion\", \"InseeDepartement\", \"Municipality\"];\n}\n\n/**\n * @lends module:Administratif#\n */\nAdministratif.prototype = Object.create(GeocodeLocation.prototype);\n\n/**\n * Constructeur (alias)\n */\nAdministratif.prototype.constructor = Administratif;\n\nexport default Administratif;\n" - }, - { - "id": 76, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Response/DirectGeocodeResponseFactory.js", - "name": "./src/Services/Geocode/Response/DirectGeocodeResponseFactory.js", - "index": 66, - "index2": 66, - "size": 3319, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Geocode.js", - "issuerId": 63, - "issuerName": "./src/Services/Geocode/Geocode.js", - "profile": { - "factory": 218, - "building": 227, - "dependencies": 318 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 63, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Geocode.js", - "module": "./src/Services/Geocode/Geocode.js", - "moduleName": "./src/Services/Geocode/Geocode.js", - "type": "harmony import", - "userRequest": "./Response/DirectGeocodeResponseFactory", - "loc": "7:0-83" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 4, - "source": "/**\n * Factory pour générer une reponse JSON à partir d'un XML\n * ou d'un JSON encapsulant du XML\n * (Factory)\n *\n * @module GeocodeResponseFactory\n * @alias Gp.Services.Geocode.Response.GeocodeResponseFactory\n * @todo La reponse JSON peut encapsuler un XML !\n * @private\n */\n// import Logger from \"../../../Utils/LoggerByDefault\";\nimport ErrorService from \"../../../Exceptions/ErrorService\";\nimport MRes from \"../../../Utils/MessagesResources\";\nimport XML from \"../../../Formats/XML\";\nimport DirectGeocodeResponseReader from \"../Formats/DirectGeocodeResponseReader\";\n\nvar DirectGeocodeReponseFactory = {\n\n /**\n * interface unique\n *\n * @method build\n * @static\n * @param {Object} options - options definies dans le composant Geocode\n *\n * @example\n * var options = {\n * response :\n * rawResponse :\n * scope :\n * onSuccess :\n * onError :\n * };\n *\n */\n build : function (options) {\n // data de type GeocodeResponse\n var data = null;\n\n if (options.response) {\n if (options.rawResponse) {\n data = options.response;\n } else {\n try {\n var p = new XML({\n reader : DirectGeocodeResponseReader\n });\n\n if (typeof options.response === \"string\") {\n p.setXMLString(options.response);\n } else {\n p.setXMLDoc(options.response);\n }\n\n data = p.parse();\n\n if (!data) {\n throw new Error(\"L'analyse de la réponse du service !?\");\n }\n } catch (e) {\n var message = e.message;\n if (typeof options.response === \"string\") {\n message += \"('\" + options.response + \"')\";\n } else {\n message += \"('\" + options.response.documentElement.innerHTML + \"')\";\n }\n options.onError.call(options.scope, new ErrorService({\n message : MRes.getMessage(\"SERVICE_RESPONSE_ANALYSE\", message),\n type : ErrorService.TYPE_UNKERR,\n status : -1\n }));\n return;\n }\n\n // Si la réponse contenait une exception renvoyée par le service\n if (data.exceptionReport) {\n options.onError.call(options.scope, new ErrorService({\n message : MRes.getMessage(\"SERVICE_RESPONSE_EXCEPTION\", data.exceptionReport),\n type : ErrorService.TYPE_SRVERR,\n status : 200 // FIXME : 200 ?\n }));\n return;\n }\n }\n } else {\n options.onError.call(options.scope, new ErrorService({\n message : MRes.getMessage(\"SERVICE_RESPONSE_EMPTY\"),\n type : ErrorService.TYPE_SRVERR,\n status : -1 // FIXME : status response\n }));\n return;\n }\n\n options.onSuccess.call(options.scope, data);\n }\n};\n\nexport default DirectGeocodeReponseFactory;\n" - }, - { - "id": 77, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Formats/DirectGeocodeResponseReader.js", - "name": "./src/Services/Geocode/Formats/DirectGeocodeResponseReader.js", - "index": 67, - "index2": 65, - "size": 17612, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Response/DirectGeocodeResponseFactory.js", - "issuerId": 76, - "issuerName": "./src/Services/Geocode/Response/DirectGeocodeResponseFactory.js", - "profile": { - "factory": 320, - "building": 686, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 1, - "reasons": [ - { - "moduleId": 76, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Response/DirectGeocodeResponseFactory.js", - "module": "./src/Services/Geocode/Response/DirectGeocodeResponseFactory.js", - "moduleName": "./src/Services/Geocode/Response/DirectGeocodeResponseFactory.js", - "type": "harmony import", - "userRequest": "../Formats/DirectGeocodeResponseReader", - "loc": "15:0-81" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "\n/**\n * Fonction retournant un objet contenant des clés de lecture (readers)\n * qui permettent de parser des réponses XML du service de géocodage direct du Géoportail\n * afin de récupérer les résultats retournés.\n * @module DirectGeocodeResponseReader\n * @alias Gp.Services.Geocode.Formats.DirectGeocodeResponseReader\n * @private\n */\n\n// import Logger from \"../../../Utils/LoggerByDefault\";\nimport MR from \"../../../Utils/MessagesResources\";\nimport ErrSrv from \"../../../Exceptions/ErrorService\";\nimport GeocodeResponse from \"../Response/model/GeocodeResponse\";\nimport DirectGeocodedLocation from \"../Response/model/DirectGeocodedLocation\";\n\n/**\n * @member DirectGeocodeResponseReader\n */\nvar DirectGeocodeResponseReader = {};\n\n/**\n * @property {String} DirectGeocodeResponseReader.VERSION - version du service de géocodage\n */\nDirectGeocodeResponseReader.VERSION = \"1.2\";\n\n/**\n * Objet stockant les différents namespaces et les URI associées\n */\nDirectGeocodeResponseReader.NAMESPACES = {\n xmlns : \"http://www.opengis.net/xls\",\n gml : \"http://www.opengis.net/gml\",\n xls : \"http://www.opengis.net/xls\",\n xlsext : \"http://www.opengis.net/xlsext\",\n xsi : \"http://www.w3.org/2001/XMLSchema-instance\"\n};\n\n/**\n * Localisation (URL) du schema de définition du XML (XSD)\n */\nDirectGeocodeResponseReader.SCHEMALOCATION = \"http://wxs.ign.fr/schemas/olsAll.xsd\";\n\n/**\n * Namespace par défaut du format\n */\nDirectGeocodeResponseReader.DEFAULTPREFIX = \"xls\";\n\n/**\n * Objet contenant des fonctions de lecture, appelées \"READERS\"\n * dont chaque clé correspond au nom d'un tag du XML que l'on souhaite lire\n * et la valeur associée est une fonction (node, data)\n * où node est un noeud du document DOM\n * et data est un objet où l'on stocke les informations lues dans le XML.\n */\nDirectGeocodeResponseReader.READERS = {\n\n xls : {\n\n /** TODO : jsdoc block */\n XLS : function (root) {\n var geocodeResponse = new GeocodeResponse();\n\n // vérification de la version du service, et des namespaces de l'en-tête\n __checkServiceAttributes(root);\n\n // puis lancement de la lecture de l'ensemble des noeuds, en bouclant sur les childNodes\n __getChildNodes(root, geocodeResponse);\n\n return geocodeResponse;\n },\n\n /** TODO : jsdoc block */\n GeocodedAddress : function (node, geocodeResponse) {\n var geocodedLocation = new DirectGeocodedLocation();\n\n __getChildNodes(node, geocodedLocation);\n\n // Ajout du résultat au tableau geocodedLocations de geocodeReponse\n if (geocodeResponse && Array.isArray(geocodeResponse.locations)) {\n geocodeResponse.locations.push(geocodedLocation);\n }\n },\n\n /** TODO : jsdoc block */\n GeocodeMatchCode : function (node, geocodedLocation) {\n var acc = node.getAttribute(\"accuracy\");\n if (acc && geocodedLocation) {\n geocodedLocation.accuracy = parseFloat(acc);\n }\n var matchType = node.getAttribute(\"matchType\");\n if (matchType && geocodedLocation) {\n geocodedLocation.matchType = matchType;\n }\n },\n\n /** TODO : jsdoc block */\n Address : function (node, geocodedLocation) {\n var countrycode = node.getAttribute(\"countryCode\");\n if (geocodedLocation && countrycode) {\n geocodedLocation.type = countrycode;\n }\n // on va récupérer les autres informations (StreetAddress, place, postalCode...)\n __getChildNodes(node, geocodedLocation);\n },\n\n /** TODO : jsdoc block */\n freeFormAddress : function (node, geocodedLocation) {\n if (geocodedLocation && geocodedLocation.hasOwnProperty(\"placeAttributes\")) {\n geocodedLocation.placeAttributes.freeform = __getChildValue(node);\n }\n },\n\n /** TODO : jsdoc block */\n Building : function (node, geocodedLocation) {\n var num = node.getAttribute(\"number\");\n if (geocodedLocation && geocodedLocation.hasOwnProperty(\"placeAttributes\")) {\n if (num) {\n geocodedLocation.placeAttributes.number = num;\n } else if (node.getAttribute(\"buildingName\")) {\n geocodedLocation.placeAttributes.number = node.getAttribute(\"buildingName\");\n } else if (node.getAttribute(\"subdivision\")) {\n geocodedLocation.placeAttributes.number = node.getAttribute(\"subdivision\");\n }\n }\n },\n\n /** TODO : jsdoc block */\n Street : function (node, geocodedLocation) {\n if (geocodedLocation && geocodedLocation.hasOwnProperty(\"placeAttributes\")) {\n // in case of a streetAddress result : street represents the street name\n if (geocodedLocation.type === \"StreetAddress\") {\n geocodedLocation.placeAttributes.street = __getChildValue(node);\n\n // in case of a cadastral parcel result : street represents the cadastral parcel identifier\n } else if (geocodedLocation.type === \"CadastralParcel\") {\n geocodedLocation.placeAttributes.cadastralParcel = __getChildValue(node);\n }\n }\n },\n\n /** TODO : jsdoc block */\n Place : function (node, geocodedLocation) {\n var placeType = node.getAttribute(\"type\");\n var placeName = __getChildValue(node);\n\n if (geocodedLocation && geocodedLocation.hasOwnProperty(\"placeAttributes\")) {\n if (placeType === \"Municipality\") {\n geocodedLocation.placeAttributes.municipality = placeName;\n } else if (placeType === \"Bbox\") {\n var values = placeName.split(\";\");\n if (values.length === 4) {\n geocodedLocation.placeAttributes.bbox = {\n left : parseFloat(values[0]),\n right : parseFloat(values[2]),\n top : parseFloat(values[1]),\n bottom : parseFloat(values[3])\n };\n }\n } else if (placeType === \"Commune\") {\n geocodedLocation.placeAttributes.commune = placeName;\n } else if (placeType === \"Departement\") {\n geocodedLocation.placeAttributes.department = placeName;\n } else if (placeType === \"INSEE\") {\n geocodedLocation.placeAttributes.insee = placeName;\n } else if (placeType === \"Qualite\") {\n geocodedLocation.placeAttributes.quality = placeName;\n } else if (placeType === \"Territoire\") {\n geocodedLocation.placeAttributes.territory = placeName;\n } else if (placeType === \"ID\") {\n geocodedLocation.placeAttributes.ID = placeName;\n } else if (placeType === \"ID_TR\") {\n geocodedLocation.placeAttributes.IDTR = placeName;\n } else if (placeType === \"Importance\") {\n geocodedLocation.placeAttributes.importance = parseInt(placeName, 10);\n } else if (placeType === \"Nature\") {\n geocodedLocation.placeAttributes.nature = placeName;\n } else if (placeType === \"Numero\") {\n geocodedLocation.placeAttributes.number = placeName;\n } else if (placeType === \"Feuille\") {\n geocodedLocation.placeAttributes.sheet = placeName;\n } else if (placeType === \"Section\") {\n geocodedLocation.placeAttributes.section = placeName;\n } else if (placeType === \"CommuneAbsorbee\") {\n geocodedLocation.placeAttributes.absorbedCity = placeName;\n } else if (placeType === \"Arrondissement\") {\n if (placeName) {\n geocodedLocation.placeAttributes.arrondissement = placeName;\n }\n } else if (placeType === \"Type\") {\n geocodedLocation.placeAttributes.origin = placeName;\n } else if (placeType === \"Prefecture\") {\n geocodedLocation.placeAttributes.prefecture = placeName;\n } else if (placeType === \"InseeRegion\") {\n geocodedLocation.placeAttributes.inseeRegion = placeName;\n } else if (placeType === \"InseeDepartment\") {\n geocodedLocation.placeAttributes.inseeDepartment = placeName;\n }\n }\n },\n\n /** TODO : jsdoc block */\n PostalCode : function (node, geocodedLocation) {\n if (geocodedLocation && geocodedLocation.hasOwnProperty(\"placeAttributes\")) {\n geocodedLocation.placeAttributes.postalCode = __getChildValue(node);\n }\n },\n\n /** TODO : jsdoc block */\n Error : function (node) {\n // on imagine qu'on a une balise ainsi :\n // \n var srvMess = node.getAttribute(\"message\");\n var errorCode = node.getAttribute(\"errorCode\");\n var message = MR.getMessage(\"SERVICE_RESPONSE_EXCEPTION\",\n \"(\" + errorCode + \") : \" + srvMess);\n throw new ErrSrv({\n message : message,\n type : ErrSrv.TYPE_SRVERR\n });\n }\n },\n\n gml : {\n\n /** TODO : jsdoc block */\n pos : function (node, geocodedLocation) {\n var pos = __getChildValue(node);\n if (geocodedLocation && pos) {\n geocodedLocation.position = {\n x : parseFloat(pos.split(\" \")[0]),\n y : parseFloat(pos.split(\" \")[1])\n };\n }\n }\n },\n\n /** TODO : jsdoc block */\n ExceptionReport : function (node) {\n var response = {};\n if (node.hasChildNodes()) {\n var children = node.childNodes;\n var child;\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n if (child.nodeName === \"Exception\") {\n response.exceptionReport = DirectGeocodeResponseReader.READERS[\"Exception\"](child);\n }\n }\n }\n return response;\n },\n\n /** TODO : jsdoc block */\n Exception : function (node) {\n var exceptionReport = {};\n\n // get exception code\n var exceptionCode = node.getAttribute(\"exceptionCode\");\n if (exceptionCode) {\n exceptionReport.exceptionCode = exceptionCode;\n }\n\n // get exception message\n var textNode = node.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n exceptionReport.exception = textNode.nodeValue;\n }\n\n return exceptionReport;\n }\n\n};\n\n/**\n * Méthode permettant de lancer la lecture d'une réponse XML du service de géocodage,\n * à l'aide des READERS de la classe.\n *\n * @method DirectGeocodeResponseReader.read\n * @param {DOMElement} root - racine de la réponse XML à lire\n * @return {Object} geocodeResponse|exceptionReport : l'objet contenant les informations de la réponse XML,\n * sous la forme d'un objet GeocodeResponse, ou un objet littéral exceptionReport si le service a renvoyé une exception.\n * @static\n * @memberof DirectGeocodeResponseReader\n */\nDirectGeocodeResponseReader.read = function (root) {\n if (root.nodeName === \"XLS\") {\n var nsPrefix = root.prefix;\n if (!nsPrefix) {\n nsPrefix = DirectGeocodeResponseReader.DEFAULTPREFIX;\n }\n var geocodeResponse = DirectGeocodeResponseReader.READERS[nsPrefix][root.nodeName](root);\n return geocodeResponse;\n } else if (root.nodeName === \"ExceptionReport\") {\n var exceptionReport = DirectGeocodeResponseReader.READERS[root.nodeName](root);\n return exceptionReport;\n } else {\n var mess = MR.getMessage(\"SERVICE_RESPONSE_ANALYSE\", root.nodeName);\n throw new ErrSrv({\n message : mess,\n type : ErrSrv.TYPE_UNKERR,\n status : 200\n });\n }\n};\n\n/**\n * Récupération des attributs d'un noeud élément\n *\n * @private\n * @memberof DirectGeocodeResponseReader\n * @method __getAttributes\n * @param {DOMElement} node - noeud contenant l'attribut recherché\n * @return {Object} nodeAttributes - objet contenant les noms et valeurs des différents attributs\n */\nfunction __getAttributes (node) {\n if (node.attributes.length > 0) {\n var nodeAttributes = {};\n var attributes = node.attributes;\n for (var i = 0; i < attributes.length; i++) {\n var attribute = attributes[i];\n nodeAttributes[attribute.nodeName] = attribute.nodeValue;\n }\n return nodeAttributes;\n }\n}\n\n/**\n * Récupération des noeuds enfants à partir d'un noeud donné, pour lecture (readNode).\n *\n * @private\n * @memberof DirectGeocodeResponseReader\n * @method __getChildNodes\n * @param {DOMElement} node - a DOM node\n * @param {Array|Object} [data] - an object to be filled with node data\n */\nfunction __getChildNodes (node, data) {\n if (node.hasChildNodes()) {\n var children = node.childNodes;\n var child;\n var childName;\n var childPrefix;\n\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n\n if (child.nodeType === 1) { // 1 === node.ELEMENT_NODE\n childName = child.localName || child.baseName || child.nodeName;\n childPrefix = child.prefix || DirectGeocodeResponseReader.DEFAULTPREFIX;\n\n if (DirectGeocodeResponseReader.READERS[childPrefix][childName]) {\n var reader = DirectGeocodeResponseReader.READERS[childPrefix][childName];\n reader(child, data);\n } else {\n __getChildNodes(child, data);\n }\n }\n }\n }\n}\n\n/**\n * Lecture de la valeur du premier child d'un noeud, si elle existe.\n *\n * @private\n * @memberof DirectGeocodeResponseReader\n * @method __getChildValue\n * @param {DOMElement} node - a DOM node\n * @return {String} value - valeur du firstChild du noeud en entrée, ou chaîne vide.\n */\nfunction __getChildValue (node) {\n var textNode;\n var value = \"\";\n\n if (node.hasChildNodes()) {\n textNode = node.firstChild;\n if (textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n value = textNode.nodeValue;\n }\n }\n return value;\n}\n\n/**\n * Vérification des attributs du service, dans la balise XLS de la réponse :\n * version, namespaces, et namespace par défaut doivent correspondre à ceux attendus.\n *\n * @private\n * @memberof DirectGeocodeResponseReader\n * @method __checkServiceAttributes\n * @param {DOMElement} XLSNode - a DOM node, corresponding to XLS first tag.\n */\nfunction __checkServiceAttributes (XLSNode) {\n if (XLSNode.attributes.length > 0) {\n // on récupère et parcourt les attributs de la balise XLS de la réponse\n var xlsAttributes = __getAttributes(XLSNode);\n for (var att in xlsAttributes) {\n if (xlsAttributes.hasOwnProperty(att)) {\n // vérification de la version\n if (att === \"version\") {\n if (xlsAttributes[\"version\"] !== DirectGeocodeResponseReader.VERSION) {\n console.log(\"[DirectGeocodeResponseReader] geocode version is not the expected one : there may be errors in parsing\");\n return;\n }\n }\n\n // on vérifie que l'uri du namespace par défaut est bien celle que l'on attend\n if (att === \"xmlns\") {\n if (xlsAttributes[att] !== DirectGeocodeResponseReader.NAMESPACES[DirectGeocodeResponseReader.DEFAULTPREFIX]) {\n console.log(\"[DirectGeocodeResponseReader] geocode response default namespace is not the expected one\");\n return;\n }\n continue;\n }\n\n var prefix = att.split(\":\")[0];\n var ns = att.split(\":\")[1];\n\n // si on a un autre xmlns, on vérifie aussi les URI\n if (prefix === \"xmlns\" && ns) {\n // si l'attribut correspond à un namespace défini dans le reader\n if (DirectGeocodeResponseReader.NAMESPACES[ns]) {\n // il faut que les URI correspondent aussi.\n if (DirectGeocodeResponseReader.NAMESPACES[ns] !== xlsAttributes[att]) {\n console.log(\"[DirectGeocodeResponseReader] geocode response \" + att + \" namespace is not the expected one\");\n return;\n }\n }\n }\n\n // pour finir on vérifie la localisation du schema XSD du service\n if (ns === \"schemaLocation\") {\n if (DirectGeocodeResponseReader.SCHEMALOCATION !== xlsAttributes[att]) {\n console.log(\"[DirectGeocodeResponseReader] geocode response schema location is not the expected one\");\n return;\n }\n }\n }\n }\n }\n}\n\nexport default DirectGeocodeResponseReader;\n" - }, - { - "id": 78, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/ReverseGeocode.js", - "name": "./src/Services/Geocode/ReverseGeocode.js", - "index": 71, - "index2": 72, - "size": 10870, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Services.js", - "issuerId": 45, - "issuerName": "./src/Services/Services.js", - "profile": { - "factory": 513, - "building": 154, - "dependencies": 262 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 45, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Services.js", - "module": "./src/Services/Services.js", - "moduleName": "./src/Services/Services.js", - "type": "harmony import", - "userRequest": "./Geocode/ReverseGeocode", - "loc": "12:0-54" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 3, - "source": "\nimport Logger from \"../../Utils/LoggerByDefault\";\nimport _ from \"../../Utils/MessagesResources\";\nimport ErrorService from \"../../Exceptions/ErrorService\";\nimport CommonService from \"../CommonService\";\nimport ReverseGeocodeRequestFactory from \"./Request/ReverseGeocodeRequestFactory\";\nimport ReverseGeocodeResponseFactory from \"./Response/ReverseGeocodeResponseFactory\";\n\n/**\n * @classdesc\n * Appel du service de géocodage inverse du Géoportail :\n * envoi de la requête construite selon les paramètres en options,\n * éventuellement parsing et analyse de la réponse,\n * retour d'une réponse en paramètre de la fonction onSuccess.\n * @constructor\n * @extends {Gp.Services.CommonService}\n * @alias Gp.Services.ReverseGeocode\n *\n * @param {Object} options - options spécifiques au service (+ les options heritées)\n *\n * @param {Object} options.position - Position du point de référence pour le calcul de proximité exprimée dans le système de référence spécifié par le srs.\n * @param {Float} options.position.x - Abcisse du point de référence pour le calcul de proximité exprimée dans le système de référence spécifié par le srs. (= longitude si srs = \"CRS:84\", latitude si srs = \"EPSG:4326\")\n * @param {Float} options.position.y - Ordonnée du point de référence pour le calcul de proximité exprimée dans le système de référence spécifié par le srs. (= latitude si srs = \"CRS:84\", longitude si srs = \"EPSG:4326\")\n *\n * @param {Object} [options.filterOptions] - Les propriétés possibles de cet objet sont décrites ci-après.\n * @param {Object} [options.filterOptions.bbox] - Emprise dans laquelle on souhaite effectuer la recherche.\n * Les propriétés possibles de cet objet sont décrites ci-après.\n * @param {Float} options.filterOptions.bbox.left - Abscisse du côté gauche de la BBOX\n * @param {Float} options.filterOptions.bbox.right - Abscisse du côté droit de la BBOX\n * @param {Float} options.filterOptions.bbox.top - Ordonnée supérieure de la BBOX\n * @param {Float} options.filterOptions.bbox.bottom - Ordonnée inférieure de la BBOX\n *\n * @param {Object} [options.filterOptions.circle] - Cercle dans lequel on souhaite effectuer la recherche.\n * Les propriétés possibles de cet objet sont décrites ci-après.\n * @param {Float} options.filterOptions.circle.x - Abscisse du centre du cercle de recherche.\n * @param {Float} options.filterOptions.circle.y - Ordonnée du centre du cercle de recherche.\n * @param {Float} options.filterOptions.circle.radius - Rayon du cercle de recherche.\n *\n * @param {Array.} [options.filterOptions.polygon] - Polygone dans lequel on souhaite effectuer la recherche.\n * Liste des couples x et y pour chaque point constituant le polygone.\n *\n * @param {Array.} [options.filterOptions.type = \"StreetAddress\"] - Type de l'objet recherché.\n * Le service de géocodage du Géoportail permet de rechercher des 'PostionOfInterest' pour des toponymes, des 'StreetAddress'\n * pour des adresses postales et/ou des 'CadastralParcel' pour des parcelles cadastrales.\n * D'autres types pourront être rajoutés selon l'évolution du service.\n * Par défaut, type = ['StreetAddress'].\n *\n * @param {Number} [options.maximumResponses] - Nombre de réponses maximal que l'on souhaite recevoir.\n * Pas de valeur par défaut. Si le serveur consulté est celui du Géoportail, la valeur par défaut sera donc celle du service : 25.\n *\n * @param {String} [options.srs = CRS:84] - Système de coordonnées dans lequel les paramètres géographiques en entrée et la réponse du service sont exprimés.\n * Pas de valeur par défaut.\n * Si le serveur consulté est celui du Géoportail, la valeur par défaut est : \"CRS:84\".\n *\n * @example\n * var options = {\n * apiKey : null,\n * serverUrl : 'http://localhost/service/',\n * protocol : 'JSONP', // JSONP|XHR\n * proxyURL : null,\n * httpMethod : 'GET', // GET|POST\n * timeOut : 10000, // ms\n * rawResponse : false, // true|false\n * scope : null, // this\n * onSuccess : function (response) {},\n * onFailure : function (error) {},\n * // spécifique au service\n * position : {x:0 , y:0},\n * filterOptions :{\n * bbox : {left : 0, right : 1, top : 1, bottom : 0},\n * [circle : {\n * x : 0,\n * y : 0,\n * radius : 100\n * }]\n * [polygon : [{x:0,y:0}, {x:1,y:1}, {x:2,y:2}, {x:3,y:2}, {x:4,y:1}, {x:0,y:0}]]\n * type : ['StreetAddress']\n * },\n * maximumResponses : 25,\n * srs : 'EPSG:4326'\n * };\n *\n * @private\n */\nfunction ReverseGeocode (options) {\n if (!(this instanceof ReverseGeocode)) {\n throw new TypeError(_.getMessage(\"CLASS_CONSTRUCTOR\", \"ReverseGeocode\"));\n }\n\n /**\n * Nom de la classe (heritage)\n * FIXME instance ou classe ?\n */\n this.CLASSNAME = \"ReverseGeocode\";\n\n // appel du constructeur par heritage\n CommonService.apply(this, arguments);\n\n this.logger = Logger.getLogger(\"Gp.Services.ReverseGeocode\");\n this.logger.trace(\"[Constructeur ReverseGeocode (options)]\");\n\n if (!options.position) {\n throw new Error(_.getMessage(\"PARAM_MISSING\", \"position\"));\n }\n\n // on lance une exception afin d'eviter au service de le faire...\n if (options.position.x === null) {\n throw new Error(_.getMessage(\"PARAM_MISSING\", \"position.x\"));\n }\n\n if (options.position.y === null) {\n throw new Error(_.getMessage(\"PARAM_MISSING\", \"position.y\"));\n }\n\n // ajout des options spécifiques au service\n this.options.position = options.position;\n\n // on definit des filtres par defaut\n if (!options.filterOptions || typeof options.filterOptions !== \"object\") {\n this.options.filterOptions = options.filterOptions = {\n type : [\"StreetAddress\"]\n };\n }\n\n // FIXME ECMAScript 5 support (valable pour un objet uniquement !)\n // ceci permet de tester le cas où : object = {}\n if (Object.keys(options.filterOptions).length === 0) {\n this.options.filterOptions = {\n type : [\"StreetAddress\"]\n };\n }\n\n // on teste pour chaque filtre, les conditions suivantes : null ou vide !\n var filter = Object.keys(options.filterOptions);\n for (var i = 0; i < filter.length; i++) {\n var key = filter[i];\n if (!options.filterOptions[key] || Object.keys(options.filterOptions[key]).length === 0) {\n delete this.options.filterOptions[key];\n }\n }\n\n this.options.filterOptions.type = options.filterOptions.type || [\"StreetAddress\"];\n // on vérifie que le type est bien dans un tableau\n if (!Array.isArray(this.options.filterOptions.type)) {\n throw new Error(_.getMessage(\"PARAM_TYPE\", \"filterOptions.type\"));\n }\n\n this.options.maximumResponses = options.maximumResponses || 25;\n\n // FIXME : cet attribut (returnFreeForm) n'est pas spécifié dans la doc du constructeur ?\n // Il est inutile en effet, mais présent dans les specs...\n this.options.returnFreeForm = options.returnFreeForm || false;\n // info : en réalité le service ne reconnait que EPSG:4326. this.options.srs permet essentiellement de différencier EPSG:4326 (lat,lon) et CRS:84 (lon,lat)\n this.options.srs = options.srs || \"CRS:84\";\n\n // si on n'a pas un systeme de coordonnées EPSG géographique, il faut inverser les coordonnées\n // (car elles sont en lon, lat alors que le service attend une position en lat, lon).\n // dans le cas d'EPSG:4326 par exemple, les coordonnées sont bien en lat, lon donc on ne fait rien.\n if (ReverseGeocode.geoEPSG.indexOf(this.options.srs) === -1) {\n // pour la position\n this.options.position = {\n x : this.options.position.y,\n y : this.options.position.x\n };\n // pour les filtres spatiaux s'ils sont spécifiés\n if (this.options.filterOptions && this.options.filterOptions.circle) {\n var circle = this.options.filterOptions.circle;\n this.options.filterOptions.circle = {\n x : circle.y,\n y : circle.x,\n radius : circle.radius\n };\n }\n if (this.options.filterOptions && this.options.filterOptions.polygon) {\n var polygon = this.options.filterOptions.polygon;\n for (i = 0; i < polygon.length; i++) {\n var coords = polygon[i];\n this.options.filterOptions.polygon[i] = {\n x : coords.y,\n y : coords.x\n };\n }\n }\n }\n\n // attributs d'instances\n\n /**\n * Format forcé de la réponse du service : \"xml\"\n * sauf si l'on souhaite une reponse brute (options.rawResponse)\n */\n this.options.outputFormat = (this.options.rawResponse) ? \"\" : \"xml\";\n}\n\n/**\n * @lends module:ReverseGeocode#\n */\nReverseGeocode.prototype = Object.create(CommonService.prototype, {\n // todo\n // getter/setter\n});\n\n/*\n * Constructeur (alias)\n */\nReverseGeocode.prototype.constructor = ReverseGeocode;\n\n/**\n * (overwrite)\n * Création de la requête\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nReverseGeocode.prototype.buildRequest = function (error, success) {\n var options = {\n httpMethod : this.options.httpMethod,\n // options specifiques du service\n position : this.options.position,\n returnFreeForm : this.options.returnFreeForm,\n filterOptions : this.options.filterOptions,\n srs : \"EPSG:4326\", // info : en réalité le service ne reconnait que EPSG:4326. this.options.srs permet essentiellement de différencier EPSG:4326 (lat,lon) et CRS:84 (lon,lat)\n maximumResponses : this.options.maximumResponses\n };\n\n this.request = ReverseGeocodeRequestFactory.build(options);\n\n // on teste si la requete a bien été construite !\n (!this.request)\n ? error.call(this, new ErrorService(_.getMessage(\"SERVICE_REQUEST_BUILD\")))\n : success.call(this, this.request);\n};\n\n/**\n * (overwrite)\n * Analyse de la reponse\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nReverseGeocode.prototype.analyzeResponse = function (error, success) {\n if (this.response) {\n var options = {\n response : this.response,\n rawResponse : this.options.rawResponse,\n onError : error,\n onSuccess : success,\n scope : this\n };\n\n ReverseGeocodeResponseFactory.build(options);\n } else {\n error.call(this, new ErrorService(_.getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n }\n};\n\n/**\n * Codes EPSG géographiques (lat/lon). Utiles car les coordonnées doivent être inversées.\n */\nReverseGeocode.geoEPSG = [\"EPSG:4326\"];\n\nexport default ReverseGeocode;\n" - }, - { - "id": 79, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Request/ReverseGeocodeRequestFactory.js", - "name": "./src/Services/Geocode/Request/ReverseGeocodeRequestFactory.js", - "index": 72, - "index2": 68, - "size": 2539, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/ReverseGeocode.js", - "issuerId": 78, - "issuerName": "./src/Services/Geocode/ReverseGeocode.js", - "profile": { - "factory": 266, - "building": 448, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 78, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/ReverseGeocode.js", - "module": "./src/Services/Geocode/ReverseGeocode.js", - "moduleName": "./src/Services/Geocode/ReverseGeocode.js", - "type": "harmony import", - "userRequest": "./Request/ReverseGeocodeRequestFactory", - "loc": "6:0-82" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 4, - "source": "/**\n * Creation d'une requête OpenLS en mode POST ou GET\n * (Factory)\n *\n * @module ReverseGeocodeRequestFactory\n * @alias Gp.Services.Geocode.Request.ReverseGeocodeRequestFactory\n * @private\n */\nimport Logger from \"../../../Utils/LoggerByDefault\";\nimport XLS from \"../../../Formats/XLS\";\nimport LocationUtilityService from \"../../../Formats/XLS/LocationUtilityService\";\n\nvar ReverseGeocodeRequestFactory = {\n\n /**\n * interface unique\n *\n * @method build\n * @static\n * @param {Object} options - options definies dans le composant Geocode\n *\n * @example\n * var options = {\n * httpMethod :\n * // options specifiques du service\n * position :\n * returnFreeForm :\n * filterOptions :\n * srs :\n * maximumResponses :\n * };\n * var result = ReverseGeocodeRequestFactory.build(options);\n * if (!result) {\n * // error...\n * }\n * @returns {String} request\n */\n build : function (options) {\n // logger\n var logger = Logger.getLogger(\"ReverseGeocodeRequestFactory\");\n logger.trace([\"ReverseGeocodeRequestFactory::build()\"]);\n\n // options non definies\n var settings = options || {};\n\n var request = null;\n\n // objet LUS\n var oLUS = new LocationUtilityService({\n position : settings.position,\n returnFreeForm : settings.returnFreeForm,\n filterOptions : settings.filterOptions\n });\n\n // Format XLS\n var oXLS = new XLS({\n srsName : settings.srs,\n maximumResponses : settings.maximumResponses\n });\n oXLS.namespace = true;\n oXLS.setService(oLUS);\n\n // request brute !\n request = oXLS.build();\n\n // en mode GET, la requête est encodée\n // et le param. 'qxml' est ajouté\n if (settings.httpMethod === \"GET\") {\n var myRequest = \"qxml=\" +\n encodeURIComponent(request)\n .replace(/-/g, \"%2D\")\n .replace(/_/g, \"%5F\")\n .replace(/\\./g, \"%2E\")\n .replace(/!/g, \"%21\")\n .replace(/~/g, \"%7E\")\n .replace(/\\*/g, \"%2A\")\n .replace(/'/g, \"%27\")\n .replace(/\\(/g, \"%28\")\n .replace(/\\)/g, \"%29\");\n request = myRequest;\n }\n\n logger.trace(request);\n\n return request;\n }\n};\n\nexport default ReverseGeocodeRequestFactory;\n" - }, - { - "id": 80, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Response/ReverseGeocodeResponseFactory.js", - "name": "./src/Services/Geocode/Response/ReverseGeocodeResponseFactory.js", - "index": 73, - "index2": 71, - "size": 3947, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/ReverseGeocode.js", - "issuerId": 78, - "issuerName": "./src/Services/Geocode/ReverseGeocode.js", - "profile": { - "factory": 264, - "building": 206, - "dependencies": 339 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 78, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/ReverseGeocode.js", - "module": "./src/Services/Geocode/ReverseGeocode.js", - "moduleName": "./src/Services/Geocode/ReverseGeocode.js", - "type": "harmony import", - "userRequest": "./Response/ReverseGeocodeResponseFactory", - "loc": "7:0-85" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 4, - "source": "/**\n * Factory pour générer une reponse JSON à partir d'un XML\n * ou d'un JSON encapsulant du XML\n * (Factory)\n *\n * @module ReverseGeocodeResponseFactory\n * @alias Gp.Services.ReverseGeocode.Response.ReverseGeocodeResponseFactory\n * @todo La reponse JSON peut encapsuler un XML !\n * @private\n */\n\nimport MRes from \"../../../Utils/MessagesResources\";\nimport ErrorService from \"../../../Exceptions/ErrorService\";\nimport XML from \"../../../Formats/XML\";\nimport ReverseGeocodeResponseReader from \"../Formats/ReverseGeocodeResponseReader\";\n\nvar ReverseGeocodeReponseFactory = {\n\n /**\n * interface unique\n *\n * @method build\n * @static\n * @param {Object} options - options definies dans le composant ReverseGeocode\n *\n * @example\n * var options = {\n * response :\n * rawResponse :\n * scope :\n * onSuccess :\n * onError :\n * };\n *\n */\n build : function (options) {\n // data de type ReverseGeocodeResponse\n var data = null;\n\n if (options.response) {\n if (options.rawResponse) {\n data = options.response;\n } else {\n try {\n var p = new XML({\n reader : ReverseGeocodeResponseReader\n });\n\n if (typeof options.response === \"string\") {\n p.setXMLString(options.response);\n } else {\n p.setXMLDoc(options.response);\n }\n\n data = p.parse();\n\n if (!data) {\n throw new Error(\"L'analyse de la réponse du service !?\");\n }\n } catch (e) {\n // on relaye l'erreur reçue\n e.status = 200;\n options.onError.call(options.scope, e);\n return;\n }\n\n // Si la réponse contenait une exception renvoyée par le service\n // TODO : quand cela arrive-t-il ?\n if (data.exceptionReport) {\n options.onError.call(options.scope, new ErrorService({\n message : MRes.getMessage(\"SERVICE_RESPONSE_EXCEPTION\", data.exceptionReport),\n type : ErrorService.TYPE_SRVERR,\n status : 200\n }));\n return;\n }\n\n // dans le cas d'un srs non EPSG géographique, il faut réinverser les coordonnées (lat,lon => lon,lat)\n if (options.scope && options.scope.options && options.scope.options.srs && options.scope.options.srs !== \"EPSG:4326\") {\n var location;\n var pos;\n if (data || data.locations || data.locations.length) {\n for (var i = 0; i < data.locations.length; i++) {\n location = data.locations[i];\n if (location) {\n pos = location.position;\n if (pos) {\n // on inverse les 2 coordonnées\n location.position = {\n x : pos.y,\n y : pos.x\n };\n }\n }\n }\n }\n }\n }\n } else {\n options.onError.call(options.scope, new ErrorService({\n message : MRes.getMessage(\"SERVICE_RESPONSE_EMPTY\"),\n type : ErrorService.TYPE_SRVERR,\n status : -1 // FIXME : status response\n }));\n return;\n }\n\n options.onSuccess.call(options.scope, data);\n }\n};\n\nexport default ReverseGeocodeReponseFactory;\n" - }, - { - "id": 81, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Formats/ReverseGeocodeResponseReader.js", - "name": "./src/Services/Geocode/Formats/ReverseGeocodeResponseReader.js", - "index": 74, - "index2": 70, - "size": 18620, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Response/ReverseGeocodeResponseFactory.js", - "issuerId": 80, - "issuerName": "./src/Services/Geocode/Response/ReverseGeocodeResponseFactory.js", - "profile": { - "factory": 341, - "building": 607, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 1, - "reasons": [ - { - "moduleId": 80, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Geocode/Response/ReverseGeocodeResponseFactory.js", - "module": "./src/Services/Geocode/Response/ReverseGeocodeResponseFactory.js", - "moduleName": "./src/Services/Geocode/Response/ReverseGeocodeResponseFactory.js", - "type": "harmony import", - "userRequest": "../Formats/ReverseGeocodeResponseReader", - "loc": "15:0-83" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "\n/**\n * Fonction retournant un objet contenant des clés de lecture (readers)\n * qui permettent de parser des réponses XML du service de géocodage inverse du Géoportail\n * afin de récupérer les résultats retournés.\n * @module ReverseGeocodeResponseReader\n * @alias Gp.Services.Geocode.Formats.ReverseGeocodeResponseReader\n * @private\n */\n\n// import Logger from \"../../../Utils/LoggerByDefault\";\nimport MR from \"../../../Utils/MessagesResources\";\nimport ErrSrv from \"../../../Exceptions/ErrorService\";\nimport ReverseGeocodeResponse from \"../Response/model/GeocodeResponse\";\nimport ReverseGeocodedLocation from \"../Response/model/ReverseGeocodedLocation\";\n\n/**\n * Objet ReverseGeocodeResponseReader\n * @member {Object} ReverseGeocodeResponseReader\n *\n * @property {String} ReverseGeocodeResponseReader.VERSION - Version du service de géocodage\n *\n * @property {Object} ReverseGeocodeResponseReader.NAMESPACES - Objet stockant les différents namespaces et les URI associées\n *\n * @property {String} ReverseGeocodeResponseReader.SCHEMALOCATION - Localisation (URL) du schema de définition du XML (XSD)\n *\n * @property {String} ReverseGeocodeResponseReader.DEFAULTPREFIX - Namespace par défaut du format\n *\n * @property {Object} ReverseGeocodeResponseReader.READERS - Objet contenant des fonctions de lecture, appelées \"READERS\"\n * dont chaque clé correspond au nom d'un tag du XML que l'on souhaite lire\n * et la valeur associée est une fonction (node, data)\n * où node est un noeud du document DOM\n * et data est un objet où l'on stocke les informations lues dans le XML.\n *\n * @property {Method} ReverseGeocodeResponseReader.read - Méthode permettant de lancer la lecture d'une réponse XML du service de géocodage,\n * à l'aide des READERS de la classe.\n *\n */\n\nvar ReverseGeocodeResponseReader = {};\n\n/**\n * version du service de géocodage\n */\nReverseGeocodeResponseReader.VERSION = \"1.2\";\n\n/**\n * Objet stockant les différents namespaces et les URI associées\n */\nReverseGeocodeResponseReader.NAMESPACES = {\n xmlns : \"http://www.opengis.net/xls\",\n gml : \"http://www.opengis.net/gml\",\n xls : \"http://www.opengis.net/xls\",\n xlsext : \"http://www.opengis.net/xlsext\",\n xsi : \"http://www.w3.org/2001/XMLSchema-instance\"\n};\n\n/**\n * Localisation (URL) du schema de définition du XML (XSD)\n */\nReverseGeocodeResponseReader.SCHEMALOCATION = \"http://wxs.ign.fr/schemas/olsAll.xsd\";\n\n/**\n * Namespace par défaut du format\n */\nReverseGeocodeResponseReader.DEFAULTPREFIX = \"xls\";\n\n/**\n * Objet contenant des fonctions de lecture, appelées \"READERS\"\n * dont chaque clé correspond au nom d'un tag du XML que l'on souhaite lire\n * et la valeur associée est une fonction (node, data)\n * où node est un noeud du document DOM\n * et data est un objet où l'on stocke les informations lues dans le XML.\n */\nReverseGeocodeResponseReader.READERS = {\n\n xls : {\n\n /** TODO : jsdoc block */\n XLS : function (root) {\n var reverseGeocodeResponse = new ReverseGeocodeResponse();\n\n // vérification de la version du service, et des namespaces de l'en-tête\n __checkServiceAttributes(root);\n\n // puis lancement de la lecture de l'ensemble des noeuds, en bouclant sur les childNodes\n __getChildNodes(root, reverseGeocodeResponse);\n\n return reverseGeocodeResponse;\n },\n\n /** TODO : jsdoc block */\n ReverseGeocodedLocation : function (node, reverseGeocodeResponse) {\n var reverseGeocodedLocation = new ReverseGeocodedLocation();\n\n __getChildNodes(node, reverseGeocodedLocation);\n\n // Ajout du résultat au tableau locations de reverseGeocodeResponse\n if (reverseGeocodeResponse && Array.isArray(reverseGeocodeResponse.locations)) {\n reverseGeocodeResponse.locations.push(reverseGeocodedLocation);\n }\n },\n\n /** TODO : jsdoc block */\n Address : function (node, reverseGeocodedLocation) {\n var countrycode = node.getAttribute(\"countryCode\");\n if (reverseGeocodedLocation && countrycode) {\n reverseGeocodedLocation.type = countrycode;\n }\n // on va récupérer les autres informations (StreetAddress, place, postalCode...)\n __getChildNodes(node, reverseGeocodedLocation);\n },\n\n /** TODO : jsdoc block */\n Building : function (node, reverseGeocodedLocation) {\n var num = node.getAttribute(\"number\");\n if (reverseGeocodedLocation && reverseGeocodedLocation.hasOwnProperty(\"placeAttributes\")) {\n if (num) {\n reverseGeocodedLocation.placeAttributes.number = num;\n } else if (node.getAttribute(\"buildingName\")) {\n reverseGeocodedLocation.placeAttributes.number = node.getAttribute(\"buildingName\");\n } else if (node.getAttribute(\"subdivision\")) {\n reverseGeocodedLocation.placeAttributes.number = node.getAttribute(\"subdivision\");\n }\n }\n },\n\n /** TODO : jsdoc block */\n Street : function (node, reverseGeocodedLocation) {\n // in case of a streetAddress result : street represents the street name\n if (reverseGeocodedLocation.type === \"StreetAddress\") {\n reverseGeocodedLocation.placeAttributes.street = __getChildValue(node);\n\n // in case of a cadastral parcel result : street represents the cadastral parcel identifier\n } else if (reverseGeocodedLocation.type === \"CadastralParcel\") {\n reverseGeocodedLocation.placeAttributes.cadastralParcel = __getChildValue(node);\n }\n },\n\n /** TODO : jsdoc block */\n Place : function (node, reverseGeocodedLocation) {\n var placeType = node.getAttribute(\"type\");\n var placeName = __getChildValue(node);\n\n if (reverseGeocodedLocation && reverseGeocodedLocation.hasOwnProperty(\"placeAttributes\")) {\n if (placeType === \"Municipality\") {\n reverseGeocodedLocation.placeAttributes.municipality = placeName;\n } else if (placeType === \"Bbox\") {\n var values = placeName.split(\";\");\n if (values.length === 4) {\n reverseGeocodedLocation.placeAttributes.bbox = {\n left : parseFloat(values[0]),\n right : parseFloat(values[2]),\n top : parseFloat(values[1]),\n bottom : parseFloat(values[3])\n };\n }\n } else if (placeType === \"Commune\") {\n reverseGeocodedLocation.placeAttributes.commune = placeName;\n } else if (placeType === \"Departement\") {\n reverseGeocodedLocation.placeAttributes.department = placeName;\n } else if (placeType === \"INSEE\") {\n reverseGeocodedLocation.placeAttributes.insee = placeName;\n } else if (placeType === \"Qualite\") {\n reverseGeocodedLocation.placeAttributes.quality = placeName;\n } else if (placeType === \"Territoire\") {\n reverseGeocodedLocation.placeAttributes.territory = placeName;\n } else if (placeType === \"ID\") {\n reverseGeocodedLocation.placeAttributes.ID = placeName;\n } else if (placeType === \"ID_TR\") {\n reverseGeocodedLocation.placeAttributes.IDTR = placeName;\n } else if (placeType === \"Importance\") {\n reverseGeocodedLocation.placeAttributes.importance = parseInt(placeName, 10);\n } else if (placeType === \"Nature\") {\n reverseGeocodedLocation.placeAttributes.nature = placeName;\n } else if (placeType === \"Numero\") {\n reverseGeocodedLocation.placeAttributes.number = placeName;\n } else if (placeType === \"Feuille\") {\n reverseGeocodedLocation.placeAttributes.sheet = placeName;\n } else if (placeType === \"Section\") {\n reverseGeocodedLocation.placeAttributes.section = placeName;\n } else if (placeType === \"CommuneAbsorbee\") {\n reverseGeocodedLocation.placeAttributes.absorbedCity = placeName;\n } else if (placeType === \"Arrondissement\") {\n if (placeName) {\n reverseGeocodedLocation.placeAttributes.arrondissement = placeName;\n }\n } else if (placeType === \"Type\") {\n reverseGeocodedLocation.placeAttributes.origin = placeName;\n } else if (placeType === \"Prefecture\") {\n reverseGeocodedLocation.placeAttributes.prefecture = placeName;\n } else if (placeType === \"InseeRegion\") {\n reverseGeocodedLocation.placeAttributes.inseeRegion = placeName;\n } else if (placeType === \"InseeDepartment\") {\n reverseGeocodedLocation.placeAttributes.inseeDepartment = placeName;\n }\n }\n },\n\n /** TODO : jsdoc block */\n PostalCode : function (node, reverseGeocodedLocation) {\n if (reverseGeocodedLocation && reverseGeocodedLocation.hasOwnProperty(\"placeAttributes\")) {\n reverseGeocodedLocation.placeAttributes.postalCode = __getChildValue(node);\n }\n },\n\n /** TODO : jsdoc block */\n SearchCentreDistance : function (node, reverseGeocodedLocation) {\n if (reverseGeocodedLocation) {\n reverseGeocodedLocation.searchCenterDistance = parseFloat(node.getAttribute(\"value\"));\n }\n },\n\n /** TODO : jsdoc block */\n Error : function (node) {\n // \n var srvMess = node.getAttribute(\"message\");\n var errorCode = node.getAttribute(\"errorCode\");\n var message = MR.getMessage(\"SERVICE_RESPONSE_EXCEPTION\",\n \"(\" + errorCode + \") : \" + srvMess);\n throw new ErrSrv({\n message : message,\n type : ErrSrv.TYPE_SRVERR\n });\n }\n },\n\n gml : {\n\n /** TODO : jsdoc block */\n pos : function (node, reverseGeocodedLocation) {\n var pos = __getChildValue(node);\n if (reverseGeocodedLocation && pos) {\n reverseGeocodedLocation.position = {\n x : parseFloat(pos.split(\" \")[0]),\n y : parseFloat(pos.split(\" \")[1])\n };\n }\n }\n },\n\n xlsext : {\n /** TODO : jsdoc block */\n ExtendedGeocodeMatchCode : function (node, reverseGeocodedLocation) {\n if (reverseGeocodedLocation) {\n reverseGeocodedLocation.matchType = __getChildValue(node);\n }\n }\n },\n\n /** TODO : jsdoc block */\n ExceptionReport : function (node) {\n var response = {};\n if (node.hasChildNodes()) {\n var children = node.childNodes;\n var child;\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n if (child.nodeName === \"Exception\") {\n response.exceptionReport = ReverseGeocodeResponseReader.READERS[\"Exception\"](child);\n }\n }\n }\n return response;\n },\n\n /** TODO : jsdoc block */\n Exception : function (node) {\n var exceptionReport = {};\n\n // get exception code\n var exceptionCode = node.getAttribute(\"exceptionCode\");\n if (exceptionCode) {\n exceptionReport.exceptionCode = exceptionCode;\n }\n\n // get exception message\n var textNode = node.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n exceptionReport.exception = textNode.nodeValue;\n }\n\n return exceptionReport;\n }\n\n};\n\n/**\n * Méthode permettant de lancer la lecture d'une réponse XML du service de géocodage,\n * à l'aide des READERS de la classe.\n *\n * @method ReverseGeocodeResponseReader.read\n * @param {DOMElement} root - racine de la réponse XML à lire\n * @return {Object} geocodeResponse|exceptionReport : l'objet contenant les informations de la réponse XML,\n * sous la forme d'un objet GeocodeResponse, ou un objet littéral exceptionReport si le service a renvoyé une exception.\n * @static\n * @memberof ReverseGeocodeResponseReader\n */\nReverseGeocodeResponseReader.read = function (root) {\n if (root.nodeName === \"XLS\") {\n var nsPrefix = root.prefix;\n if (!nsPrefix) {\n nsPrefix = ReverseGeocodeResponseReader.DEFAULTPREFIX;\n }\n var geocodeResponse = ReverseGeocodeResponseReader.READERS[nsPrefix][root.nodeName](root);\n return geocodeResponse;\n } else if (root.nodeName === \"ExceptionReport\") {\n var exceptionReport = ReverseGeocodeResponseReader.READERS[root.nodeName](root);\n return exceptionReport;\n } else {\n throw new Error(\"Erreur lors de la lecture de la réponse : elle n'est pas au format attendu.\");\n }\n};\n\n/**\n * Récupération des attributs d'un noeud élément\n *\n * @private\n * @memberof ReverseGeocodeResponseReader\n * @method __getAttributes\n * @param {DOMElement} node - noeud contenant l'attribut recherché\n * @return {Object} nodeAttributes - objet contenant les noms et valeurs des différents attributs\n */\nfunction __getAttributes (node) {\n if (node.attributes.length > 0) {\n var nodeAttributes = {};\n var attributes = node.attributes;\n for (var i = 0; i < attributes.length; i++) {\n var attribute = attributes[i];\n nodeAttributes[attribute.nodeName] = attribute.nodeValue;\n }\n return nodeAttributes;\n }\n}\n\n/**\n * Récupération des noeuds enfants à partir d'un noeud donné, pour lecture (readNode).\n *\n * @private\n * @memberof ReverseGeocodeResponseReader\n * @method __getChildNodes\n * @param {DOMElement} node - a DOM node\n * @param {Array|Object} [data] - an object to be filled with node data\n */\nfunction __getChildNodes (node, data) {\n if (node.hasChildNodes()) {\n var children = node.childNodes;\n var child;\n var childName;\n var childPrefix;\n\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n\n if (child.nodeType === 1) { // 1 === node.ELEMENT_NODE\n childName = child.localName || child.baseName || child.nodeName;\n childPrefix = child.prefix || ReverseGeocodeResponseReader.DEFAULTPREFIX;\n\n if (ReverseGeocodeResponseReader.READERS[childPrefix][childName]) {\n var reader = ReverseGeocodeResponseReader.READERS[childPrefix][childName];\n reader(child, data);\n } else {\n __getChildNodes(child, data);\n }\n }\n }\n }\n}\n\n/**\n * Lecture de la valeur du premier child d'un noeud, si elle existe.\n *\n * @private\n * @memberof ReverseGeocodeResponseReader\n * @method __getChildValue\n * @param {DOMElement} node - a DOM node\n * @return {String} value - valeur du firstChild du noeud en entrée, ou chaîne vide.\n */\nfunction __getChildValue (node) {\n var textNode;\n var value = \"\";\n\n if (node.hasChildNodes()) {\n textNode = node.firstChild;\n if (textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n value = textNode.nodeValue;\n }\n }\n return value;\n}\n\n/**\n * Vérification des attributs du service, dans la balise XLS de la réponse :\n * version, namespaces, et namespace par défaut doivent correspondre à ceux attendus.\n *\n * @private\n * @memberof ReverseGeocodeResponseReader\n * @method __checkServiceAttributes\n * @param {DOMElement} XLSNode - a DOM node, corresponding to XLS first tag.\n */\nfunction __checkServiceAttributes (XLSNode) {\n if (XLSNode.attributes.length > 0) {\n // on récupère et parcourt les attributs de la balise XLS de la réponse\n var xlsAttributes = __getAttributes(XLSNode);\n for (var att in xlsAttributes) {\n if (xlsAttributes.hasOwnProperty(att)) {\n // vérification de la version\n if (att === \"version\") {\n if (xlsAttributes[\"version\"] !== ReverseGeocodeResponseReader.VERSION) {\n console.log(\"[ReverseGeocodeResponseReader] geocode version is not the expected one : there may be errors in parsing\");\n return;\n }\n }\n\n // on vérifie que l'uri du namespace par défaut est bien celle que l'on attend\n if (att === \"xmlns\") {\n if (xlsAttributes[att] !== ReverseGeocodeResponseReader.NAMESPACES[ReverseGeocodeResponseReader.DEFAULTPREFIX]) {\n console.log(\"[ReverseGeocodeResponseReader] geocode response default namespace is not the expected one\");\n return;\n }\n continue;\n }\n\n var prefix = att.split(\":\")[0];\n var ns = att.split(\":\")[1];\n\n // si on a un autre xmlns, on vérifie aussi les URI\n if (prefix === \"xmlns\" && ns) {\n // si l'attribut correspond à un namespace défini dans le reader\n if (ReverseGeocodeResponseReader.NAMESPACES[ns]) {\n // il faut que les URI correspondent aussi.\n if (ReverseGeocodeResponseReader.NAMESPACES[ns] !== xlsAttributes[att]) {\n console.log(\"[ReverseGeocodeResponseReader] geocode response \" + att + \" namespace is not the expected one\");\n return;\n }\n }\n }\n\n // pour finir on vérifie la localisation du schema XSD du service\n if (ns === \"schemaLocation\") {\n if (ReverseGeocodeResponseReader.SCHEMALOCATION !== xlsAttributes[att]) {\n console.log(\"[ReverseGeocodeResponseReader] geocode response schema location is not the expected one\");\n return;\n }\n }\n }\n }\n }\n}\n\nexport default ReverseGeocodeResponseReader;\n" - }, - { - "id": 82, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoComplete/AutoComplete.js", - "name": "./src/Services/AutoComplete/AutoComplete.js", - "index": 76, - "index2": 76, - "size": 6987, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Services.js", - "issuerId": 45, - "issuerName": "./src/Services/Services.js", - "profile": { - "factory": 513, - "building": 234, - "dependencies": 182 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 45, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Services.js", - "module": "./src/Services/Services.js", - "moduleName": "./src/Services/Services.js", - "type": "harmony import", - "userRequest": "./AutoComplete/AutoComplete", - "loc": "13:0-55" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 3, - "source": "import CommonService from \"../CommonService\";\nimport AutoCompleteResponseFactory from \"./Response/AutoCompleteResponseFactory\";\nimport Logger from \"../../Utils/LoggerByDefault\";\nimport MR from \"../../Utils/MessagesResources\";\nimport Helper from \"../../Utils/Helper\";\nimport ErrorService from \"../../Exceptions/ErrorService\";\n\n/**\n * @classdesc\n * Appel du service d'autocomplétion du Géoportail :\n * envoi de la requête construite selon les paramètres en options,\n * éventuellement parsing et analyse de la réponse,\n * retour d'une réponse en paramètre de la fonction onSuccess.\n * @constructor\n * @extends {Gp.Services.CommonService}\n * @alias Gp.Services.AutoComplete\n *\n * @param {Object} options - options spécifiques au service (+ les options heritées)\n *\n * @param {String} options.text - La chaîne de caractère à compléter.\n * Cette chaîne n'est pas \"URL encodée\".\n * C'est l'API qui s'occupe de l'encoder pour l'inclure dans la requête.\n *\n * @param {Array.} [options.filterOptions.type = \"StreetAddress\"] - Type de l'objet recherché.\n * Le service d'autocomplétion du Géoportail permet de rechercher des toponymes 'PostionOfInterest' et/ou des adresses postales 'StreetAddress'.\n * D'autres types pourront être rajoutés selon l'évolution du service.\n * Par défaut, type = ['StreetAddress'].\n *\n * @param {Array.} [options.filterOptions.territory] - Limitation de la zone de recherche de localisants.\n * Le service d'autocomplétion du Géoportail permet de limiter la recherche à la métropole et la Corse : options.filterOptions.territory = ['METROPOLE'],\n * DOMS TOMS : options.filterOptions.territory = ['DOMTOM'], ou à une liste de départements : options.filterOptions.territory = ['31', '34']\n * Pas de valeur par défaut.\n * La valeur par défaut est donc celle du service.\n * Le service d'autocomplétion du Géoportail renvoie toutes les informations quand aucun territoire n'est spécifié.\n *\n * @param {Number} [options.maximumResponses = 10] - Nombre de réponses maximal que l'on souhaite recevoir.\n * Pas de valeur par défaut.\n * La valeur par défaut sera donc celle du service : 10.\n *\n * @example\n * var options = {\n * // options communes aux services\n * apiKey : null,\n * serverUrl : 'http://localhost/service/',\n * protocol : 'JSONP', // JSONP|XHR\n * proxyURL : null,\n * httpMethod : 'GET', // GET|POST\n * timeOut : 10000, // ms\n * rawResponse : false, // true|false\n * scope : null, // this\n * onSuccess : function (response) {},\n * onFailure : function (error) {},\n * // spécifique au service\n * text : \"\",\n * filterOptions : {\n * type : [\"StreetAddress\"],\n * territory : ['METROPOLE', 'DOMTOM', '31']\n * },\n * maximumResponses : 10\n * };\n * @private\n */\nfunction AutoComplete (options) {\n if (!(this instanceof AutoComplete)) {\n throw new TypeError(MR.getMessage(\"CLASS_CONSTRUCTOR\", \"AutoComplete\"));\n }\n\n /**\n * Nom de la classe (heritage)\n * FIXME instance ou classe ?\n */\n this.CLASSNAME = \"AutoComplete\";\n\n // appel du constructeur par heritage\n CommonService.apply(this, arguments);\n\n this.logger = Logger.getLogger(\"Gp.Services.AutoComplete\");\n this.logger.trace(\"[Constructeur AutoComplete (options)]\");\n\n if (!options.text) {\n throw new Error(MR.getMessage(\"PARAM_MISSING\", \"text\"));\n }\n\n // ajout des options spécifiques au service\n this.options.text = options.text;\n\n // on definit des filtres par defaut\n if (!options.filterOptions || typeof options.filterOptions !== \"object\") {\n this.options.filterOptions = options.filterOptions = {\n territory : [],\n type : [\"StreetAddress\"]\n };\n }\n\n // FIXME ECMAScript 5 support (valable pour un objet uniquement !)\n // ceci permet de tester le cas où : object = {}\n if (Object.keys(options.filterOptions).length === 0) {\n this.options.filterOptions = {\n territory : [],\n type : [\"StreetAddress\"]\n };\n }\n\n this.options.filterOptions.type = options.filterOptions.type || [\"StreetAddress\"];\n this.options.filterOptions.territory = options.filterOptions.territory || [];\n this.options.maximumResponses = options.maximumResponses || 10;\n\n // INFO\n // le service ne repond pas en mode POST (405 Method Not Allowed)\n if (this.options.protocol === \"XHR\" && this.options.httpMethod === \"POST\") {\n this.logger.warn(\"Le service ne gére pas le mode d'interrogation en POST, on bascule sur du GET !\");\n this.options.httpMethod = \"GET\"; // on surcharge !\n }\n\n // attributs d'instances\n\n /**\n * Format forcé de la réponse du service : \"json\"\n * sauf si l'on souhaite une reponse brute (options.rawResponse)\n */\n this.options.outputFormat = (this.options.rawResponse) ? \"\" : \"json\";\n}\n\n/**\n * @lends module:AutoComplete#\n */\n\nAutoComplete.prototype = Object.create(CommonService.prototype, {\n // todo\n // getter/setter\n});\n\n/*\n * Constructeur (alias)\n */\nAutoComplete.prototype.constructor = AutoComplete;\n\n/**\n * (overwrite)\n * Création de la requête\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nAutoComplete.prototype.buildRequest = function (error, success) {\n // ex.\n // http://wxs.ign.fr/CLEF/ols/apis/completion?\n // text=Brie-Comt&\n // type=StreetAddress,PositionOfInterest&\n // territory=METROPOLE&\n // maximumResponses=10\n\n // traitement des param KPV sous forme de tableau\n var territories = \"\";\n if (this.options.filterOptions.territory) {\n territories = this.options.filterOptions.territory.join(\";\");\n }\n\n var types = \"\";\n if (this.options.filterOptions.type) {\n types = this.options.filterOptions.type.join(\",\");\n }\n\n // normalisation de la requete avec param KPV\n this.request = Helper.normalyzeParameters({\n text : encodeURIComponent(this.options.text),\n type : types,\n terr : territories,\n maximumResponses : this.options.maximumResponses\n });\n\n (!this.request)\n ? error.call(this, new ErrorService(MR.getMessage(\"SERVICE_REQUEST_BUILD\")))\n : success.call(this, this.request);\n};\n\n/**\n * (overwrite)\n * Analyse de la reponse\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback de succès de l'analyse de la réponse\n */\nAutoComplete.prototype.analyzeResponse = function (error, success) {\n if (this.response) {\n var options = {\n response : this.response,\n rawResponse : this.options.rawResponse,\n onSuccess : success,\n onError : error,\n scope : this\n };\n\n AutoCompleteResponseFactory.build(options);\n } else {\n error.call(this, new ErrorService(MR.getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n }\n};\n\nexport default AutoComplete;\n" - }, - { - "id": 83, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoComplete/Response/AutoCompleteResponseFactory.js", - "name": "./src/Services/AutoComplete/Response/AutoCompleteResponseFactory.js", - "index": 77, - "index2": 75, - "size": 5903, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoComplete/AutoComplete.js", - "issuerId": 82, - "issuerName": "./src/Services/AutoComplete/AutoComplete.js", - "profile": { - "factory": 185, - "building": 257, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 82, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/AutoComplete/AutoComplete.js", - "module": "./src/Services/AutoComplete/AutoComplete.js", - "moduleName": "./src/Services/AutoComplete/AutoComplete.js", - "type": "harmony import", - "userRequest": "./Response/AutoCompleteResponseFactory", - "loc": "2:0-81" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 4, - "source": "/**\n * Factory pour générer une reponse JSON à partir d'un XML ou d'un JSON\n * (Factory)\n *\n * @module AutoCompleteResponseFactory\n * @private\n * @alias Gp.Services.AutoComplete.Response.AutoCompleteResponseFactory\n */\nimport Logger from \"../../../Utils/LoggerByDefault\";\nimport MRes from \"../../../Utils/MessagesResources\";\nimport ErrorService from \"../../../Exceptions/ErrorService\";\nimport AutoCompleteResponse from \"./model/AutoCompleteResponse\";\nimport SuggestedLocation from \"./model/SuggestedLocation\";\n\nvar AutoCompleteResponseFactory = {\n\n /**\n * interface unique\n *\n * @method build\n * @static\n * @param {Object} options - options definies dans le composant Alti\n *\n * @example\n * var options = {\n * response :\n * outputFormat :\n * rawResponse :\n * scope :\n * onSuccess :\n * onError :\n * };\n *\n */\n build : function (options) {\n // logger\n var logger = Logger.getLogger(\"AutoCompleteResponseFactory\");\n logger.trace([\"AutoCompleteResponseFactory::build()\"]);\n\n var data = null;\n\n if (options.response) {\n if (options.rawResponse) {\n logger.trace(\"analyze response : raw\");\n data = options.response;\n } else {\n var JSONResponse;\n if (typeof options.response === \"string\") {\n JSONResponse = JSON.parse(options.response);\n } else {\n JSONResponse = options.response;\n }\n\n // analyse de la réponse\n if (JSONResponse) {\n // le service renvoie t il une erreur ?\n if (JSONResponse.error) {\n // ex. ?\n options.onError.call(options.scope, new ErrorService({\n message : MRes.getMessage(\"SERVICE_RESPONSE_EXCEPTION\", JSONResponse.error.description),\n status : JSONResponse.error.code,\n type : ErrorService.TYPE_SRVERR\n }));\n return;\n }\n\n // création de l'objet réponse\n data = new AutoCompleteResponse();\n\n // boucle sur les résultats de l'autocomplétion\n if (JSONResponse.results && Array.isArray(JSONResponse.results)) {\n var suggestedLocation;\n\n for (var i = 0; i < JSONResponse.results.length; i++) {\n var result = JSONResponse.results[i];\n suggestedLocation = new SuggestedLocation();\n\n if (suggestedLocation) {\n if (result && result.country === \"StreetAddress\") {\n suggestedLocation.street = result.street;\n suggestedLocation.type = \"StreetAddress\";\n } else if (result && result.country === \"PositionOfInterest\") {\n suggestedLocation.poi = result.street;\n suggestedLocation.kind = result.kind;\n suggestedLocation.type = \"PositionOfInterest\";\n }\n\n if (suggestedLocation.position) {\n suggestedLocation.position.x = result.x;\n suggestedLocation.position.y = result.y;\n }\n\n suggestedLocation.commune = result.city;\n suggestedLocation.fullText = result.fulltext;\n suggestedLocation.postalCode = result.zipcode;\n suggestedLocation.classification = result.classification;\n }\n // Ajout du résultat au tableau reverseGeocodedLocations de geocodedLocation\n data.suggestedLocations.push(suggestedLocation);\n }\n } else {\n options.onError.call(options.scope, new ErrorService(MRes.getMessage(\"SERVICE_RESPONSE_FORMAT_3\")));\n return;\n }\n\n if (!data.suggestedLocations.length) {\n options.onError.call(options.scope, new ErrorService(MRes.getMessage(\"SERVICE_RESPONSE_FORMAT_3\")));\n return;\n }\n }\n\n if (!data) {\n options.onError.call(options.scope, new ErrorService({\n message : MRes.getMessage(\"SERVICE_RESPONSE_ANALYSE_2\"),\n type : ErrorService.TYPE_UNKERR,\n status : -1\n }));\n return;\n }\n\n // Si la réponse contenait une exception renvoyée par le service\n if (data.exceptionReport) {\n options.onError.call(options.scope, new ErrorService({\n message : MRes.getMessage(\"SERVICE_RESPONSE_EXCEPTION\", data.exceptionReport),\n type : ErrorService.TYPE_SRVERR,\n status : 200\n }));\n return;\n }\n }\n } else {\n // si la réponse (xmlString) est vide, on appelle le callback d'erreur\n options.onError.call(options.scope, new ErrorService(MRes.getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n return;\n }\n\n // si tout s'est bien passé, on appelle le callback de succès\n options.onSuccess.call(options.scope, data);\n }\n};\n\nexport default AutoCompleteResponseFactory;\n" - }, - { - "id": 84, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Route.js", - "name": "./src/Services/Route/Route.js", - "index": 80, - "index2": 91, - "size": 11949, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Services.js", - "issuerId": 45, - "issuerName": "./src/Services/Services.js", - "profile": { - "factory": 513, - "building": 291, - "dependencies": 125 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 45, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Services.js", - "module": "./src/Services/Services.js", - "moduleName": "./src/Services/Services.js", - "type": "harmony import", - "userRequest": "./Route/Route", - "loc": "14:0-34" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 3, - "source": "\nimport Logger from \"../../Utils/LoggerByDefault\";\nimport _ from \"../../Utils/MessagesResources\";\nimport ErrorService from \"../../Exceptions/ErrorService\";\nimport CommonService from \"../CommonService\";\nimport DefaultUrlService from \"../DefaultUrlService\";\nimport RouteRequestFactory from \"./Request/RouteRequestFactory\";\nimport RouteResponseFactory from \"./Response/RouteResponseFactory\";\n\n/**\n * @classdesc\n * Appel du service d'itinéraire du Géoportail :\n * envoi de la requête construite selon les paramètres en options,\n * éventuellement parsing et analyse de la réponse,\n * retour d'une réponse en paramètre de la fonction onSuccess.\n *\n * @alias Gp.Services.Route\n * @constructor\n * @extends {Gp.Services.CommonService}\n * @param {Object} options - options spécifiques au service (+ les options heritées)\n *\n * @param {String} [options.api] - Manière d'accéder au service : 'REST' (via l'API REST) ou 'OLS' (via la norme XLS).\n * Par défaut, on utilise l'API REST.\n *\n * @param {String} options.outputFormat - Le format de la réponse du service itineraire : 'xml' ou 'json'.\n * Ce paramètre déterminera l'extension '.xml' ou '.json' du service dans le cas de l'API REST.\n * Nécessaire si serverUrl est renseigné, et qu'on souhaite passer par l'API REST,\n * pour connaître le format dans lequel sera fournie la réponse (pour son traitement).\n * Non nécessaire pour la norme OLS. Par défaut, ce paramètre vaut 'json'.\n *\n * @param {String} [options.routePreference = \"fastest\"] - Mode de calcul à utiliser :\n * - le plus rapide « fastest »\n * - le plus court « shortest »\n * Par défaut : « fastest ».\n *\n * @param {Object} options.startPoint - Point de départ du calcul. Coordonnées exprimées en longitudes, latitudes (EPSG:4326)\n * @param {Float} options.startPoint.x - Abcisse du point de départ du calcul d'itinéraire.\n * @param {Float} options.startPoint.y - Ordonnée du point de départ du calcul d'itinéraire.\n *\n * @param {Object} options.endPoint - Point d'arrivée du calcul. Coordonnées exprimées en longitudes, latitudes (EPSG:4326)\n * @param {Float} options.endPoint.x - Abcisse du point d'arrivée du calcul d'itinéraire.\n * @param {Float} options.endPoint.y - Ordonnée du point d'arrivée du calcul d'itinéraire.\n *\n * @param {Object[]} [options.viaPoints] - Liste de point ({x:Float,y:Float}) intermédaires que l'itinéraire doit emprunter dans l'ordre du tableau.\n * Coordonnées exprimées en longitudes, latitudes (EPSG:4326) :{x:float, y:float}\n *\n * @param {String} [options.graph = \"voiture\"] - Type de graphe utilisé : \"Voiture\" ou \"Pieton\".\n * Détermine le profil de vitesses utilisé pour le calcul ainsi que les tronçons autorisés ou non.\n * Par défaut, c'est la valeur \"Voiture\" qui sera utilisée.\n *\n * @param {String[]} [options.exclusions] - Critères d'exclusions à appliquer pour le calcul. (correspond au paramètre \"avoidFeature\" d'OpenLS)\n * On précise ici le type de tronçons que l'on ne veut pas que l'itinéraire emprunte\n * (valeurs possibles : « toll » (éviter les péages), « bridge », « tunnel »).\n *\n * @param {Boolean} [options.geometryInInstructions = false] - Indique si la géométrie de l'itinéraire doit être reprise morceau par morceau dans les instructions.\n * (correspond au paramètre \"provideGeometry\" d'OpenLS) Par défaut : false.\n *\n * @param {Boolean} [options.provideBbox = true] - Indique si les instructions doivent être localisées par une bbox dans la réponse.\n * Par défaut : true.\n *\n * @param {String} [options.distanceUnit = \"km\"] - Indique si la distance doit être exprimée en km ou m dans la réponse.\n * Par défaut : km.\n *\n * @param {String} [options.srs] - Système de coordonnées dans lequel les paramètres géographiques en entrée et la réponse du service sont exprimés.\n * Pas de valeur par défaut. Si le serveur consulté est celui du Géoportail, la valeur par défaut sera donc celle du service : 'EPSG:4326'.\n *\n * @example\n * var options = {\n * // options communes aux services\n * apiKey : null,\n * serverUrl : 'http://localhost/service/',\n * protocol : 'JSONP', // JSONP|XHR\n * proxyURL : null,\n * httpMethod : 'GET', // GET|POST\n * timeOut : 10000, // ms\n * rawResponse : false, // true|false\n * scope : null, // this\n * onSuccess : function (response) {},\n * onFailure : function (error) {},\n * // spécifique au service\n * api : 'OLS',\n * outputFormat : 'xml',\n * startPoint : {\n * x : 42.1121,\n * y : 1.5557\n * },\n * endPoint : {\n * x : 42.1121,\n * y : 1.5557\n * },\n * provideBbox : false,\n * exclusions : [\"Bridge\", \"Tunnel\", \"Toll\"],\n * distanceUnit : \"km\",\n * graph : \"Voiture\",\n * geometryInInstructions : false,\n * routePreference : \"fastest\"\n * };\n *\n * @private\n */\nfunction Route (options) {\n if (!(this instanceof Route)) {\n throw new TypeError(_.getMessage(\"CLASS_CONSTRUCTOR\", \"Route\"));\n }\n\n /**\n * Nom de la classe (heritage)\n * FIXME instance ou classe ?\n */\n this.CLASSNAME = \"Route\";\n\n // appel du constructeur par heritage\n CommonService.apply(this, arguments);\n\n this.logger = Logger.getLogger(\"Gp.Services.Route\");\n this.logger.trace(\"[Constructeur Route (options)]\");\n\n if (!options.startPoint) {\n throw new Error(_.getMessage(\"PARAM_MISSING\", \"startPoint\"));\n }\n\n // on lance une exception afin d'eviter au service de le faire...\n if (options.startPoint.x === null) {\n throw new Error(_.getMessage(\"PARAM_MISSING\", \"startPoint.x\"));\n }\n\n if (options.startPoint.y === null) {\n throw new Error(_.getMessage(\"PARAM_MISSING\", \"startPoint.y\"));\n }\n\n if (!options.endPoint) {\n throw new Error(_.getMessage(\"PARAM_MISSING\", \"endPoint\"));\n }\n\n // on lance une exception afin d'eviter au service de le faire...\n if (options.endPoint.x === null) {\n throw new Error(_.getMessage(\"PARAM_MISSING\", \"endPoint.x\"));\n }\n\n if (options.endPoint.y === null) {\n throw new Error(_.getMessage(\"PARAM_MISSING\", \"endPoint.y\"));\n }\n\n // options par defaut\n // on passe l'option api en majuscules afin d'éviter des exceptions.\n this.options.api = (typeof options.api === \"string\") ? options.api.toUpperCase() : \"REST\";\n\n // on passe l'option outputFormat en minuscules afin d'éviter des exceptions.\n this.options.outputFormat = (typeof options.outputFormat === \"string\") ? options.outputFormat.toLowerCase() : \"json\";\n\n this.options.startPoint = options.startPoint;\n this.options.endPoint = options.endPoint;\n this.options.viaPoints = options.viaPoints || null; // INFO mapping viaPoints <=> xls:viaPoint\n this.options.exclusions = options.exclusions || null; // INFO mapping exclusions <=> xls:avoidFeature\n this.options.routePreference = options.routePreference || \"fastest\";\n this.options.graph = options.graph || \"Voiture\";\n this.options.geometryInInstructions = options.geometryInInstructions || false; // INFO mapping geometryInInstructions <=> xls:provideGeometry\n this.options.provideBbox = options.provideBbox || true; // INFO mapping provideBbox <=> xls:provideBoundingBox\n this.options.distanceUnit = options.distanceUnit || \"km\";\n this.options.expectedStartTime = null; // FIXME not yet implemented !\n this.options.srs = options.srs || \"EPSG:4326\";\n\n // FIXME : les readers OLS ne sont pas implémentés. on utilise donc l'API REST.\n this.options.api = \"REST\";\n this.logger.warn(\"FIXME : Surcharge option 'api' : REST\");\n if (this.options.protocol === \"XHR\") {\n this.options.httpMethod = \"GET\";\n this.logger.trace(\"Surcharge option 'HttpMethod' : \" + this.options.httpMethod);\n }\n\n // gestion de l'url du service par defaut\n // si l'url n'est pas renseignée, il faut utiliser les urls par defaut\n // en fonction du type d'api, REST ou OLS\n if (!this.options.serverUrl) {\n var lstUrlByDefault = DefaultUrlService.Route.url(this.options.apiKey);\n var urlFound = null;\n switch (this.options.api) {\n case \"OLS\":\n urlFound = lstUrlByDefault.ols;\n break;\n case \"REST\":\n var key = \"route\" + \"-\" + this.options.outputFormat;\n urlFound = lstUrlByDefault[key];\n break;\n default:\n throw new Error(_.getMessage(\"PARAM_UNKNOWN\", \"api\"));\n }\n\n if (!urlFound) {\n throw new Error(\"Url by default not found !\");\n }\n this.options.serverUrl = urlFound;\n this.logger.trace(\"Serveur URL par defaut : \" + this.options.serverUrl);\n }\n\n // gestion du type de service\n // si l'extension de l'url est .json ou .xml, on surcharge le format de sortie (outputFormat)\n var idx = this.options.serverUrl.lastIndexOf(\".\");\n if (idx !== -1) {\n var extension = this.options.serverUrl.substring(idx + 1);\n if (extension && extension.length < 5) { // FIXME extension de moins de 4 car. ...\n this.logger.trace(\"Serveur Extension URL : \" + extension);\n switch (extension.toLowerCase()) {\n case \"json\":\n case \"xml\":\n this.options.outputFormat = extension.toLowerCase();\n break;\n default:\n throw new Error(\"type of service : unknown or unsupported (json or xml) !\");\n }\n }\n }\n}\n\n/**\n * @lends module:Route#\n */\nRoute.prototype = Object.create(CommonService.prototype, {\n // todo\n // getter/setter\n});\n\n/*\n * Constructeur (alias)\n */\nRoute.prototype.constructor = Route;\n\n/**\n * (overwrite)\n * Création de la requête\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nRoute.prototype.buildRequest = function (error, success) {\n var options = {\n // spécifique au service\n api : this.options.api,\n startPoint : this.options.startPoint,\n endPoint : this.options.endPoint,\n viaPoints : this.options.viaPoints,\n provideBbox : this.options.provideBbox,\n exclusions : this.options.exclusions,\n distanceUnit : this.options.distanceUnit,\n graph : this.options.graph,\n geometryInInstructions : this.options.geometryInInstructions,\n routePreference : this.options.routePreference,\n srs : this.options.srs\n };\n\n this.request = RouteRequestFactory.build(options);\n\n // on teste si la requete a bien été construite !\n if (!this.request) {\n error.call(this, new ErrorService(_.getMessage(\"SERVICE_REQUEST_BUILD\")));\n } else {\n success.call(this, this.request);\n }\n};\n\n/**\n * (overwrite)\n * Analyse de la reponse\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nRoute.prototype.analyzeResponse = function (error, success) {\n // INFO\n // Factory pour masquer la complexité du retour du service qui renvoie soit\n // - une 'string' qui contient du XML ou JSON natif en mode XHR\n // - un objet JSON qui est natif ou encapsulé\n\n if (this.response) {\n var options = {\n distanceUnit : this.options.distanceUnit, // FIXME ce parametre nous permet de choisir le type d'unité dans la reponse !\n response : this.response,\n outputFormat : this.options.outputFormat, // utile pour parser la string en mode XHR : JSON ou XML !\n api : this.options.api, // utile de connaitre le type d'API car la reponse est differente !\n rawResponse : this.options.rawResponse,\n onError : error,\n onSuccess : success,\n scope : this\n };\n\n RouteResponseFactory.build(options);\n } else {\n error.call(this, new ErrorService(_.getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n }\n};\n\nexport default Route;\n" - }, - { - "id": 85, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Request/RouteRequestFactory.js", - "name": "./src/Services/Route/Request/RouteRequestFactory.js", - "index": 81, - "index2": 84, - "size": 3550, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Route.js", - "issuerId": 84, - "issuerName": "./src/Services/Route/Route.js", - "profile": { - "factory": 129, - "building": 469, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 84, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Route.js", - "module": "./src/Services/Route/Route.js", - "moduleName": "./src/Services/Route/Route.js", - "type": "harmony import", - "userRequest": "./Request/RouteRequestFactory", - "loc": "7:0-64" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 4, - "source": "/**\n * Creation d'une requête OpenLS ou REST en mode POST ou GET\n * (Factory)\n *\n * @module RouteRequestFactory\n * @alias Gp.Services.Route.Request.RouteRequestFactory\n * @private\n */\nimport Logger from \"../../../Utils/LoggerByDefault\";\nimport ErrorService from \"../../../Exceptions/ErrorService\";\nimport RouteRequestOLS from \"./RouteRequestOLS\";\nimport RouteRequestREST from \"./RouteRequestREST\";\n\nvar RouteRequestFactory = {\n\n /**\n * interface unique\n *\n * @method build\n * @static\n * @param {Object} options - options definies dans le composant Route\n *\n * @example\n * // utilisation avec les callback\n * var options = {\n * (...)\n * onSuccess : function (response) {},\n * onError : function (error) {},\n * // spécifique au service\n * api : 'OLS',\n * startPoint : {\n * x : 42.1121,\n * y : 1.5557\n * },\n * endPoint : {\n * x : 42.1121,\n * y : 1.5557\n * },\n * provideBbox : false,\n * exclusions : [\"Bridge\", \"Tunnel\", \"Toll\"],\n * distanceUnit : \"km\",\n * graph : \"Voiture\",\n * geometryInInstructions : false,\n * routePreference : \"fastest\"\n * };\n * RouteRequestFactory.build(options);\n *\n * // utilisation sans callback\n * var options = {...};\n * try {\n * var result = RouteRequestFactory.build(options);\n * if (! result) { throw new Error(\"...\"):}\n * } catch (e) {\n * // todo\n * }\n * @returns {String} request\n */\n build : function (options) {\n // logger\n var logger = Logger.getLogger(\"RouteRequestFactory\");\n logger.trace([\"RouteRequestFactory::build()\"]);\n\n var request = null;\n\n var settings = options || {};\n\n // gestion des callback\n var bOnError = !!((options.onError !== null && typeof options.onError === \"function\"));\n\n var message = null;\n // choix entre les 2 types d'API pour consulter le service\n switch (options.api) {\n case \"REST\":\n // FIXME les exceptions ne sont pas 'catchées' sur le constructeur !\n var myReq = new RouteRequestREST(settings);\n if (!myReq.processRequestString()) {\n message = \"Error process request (rest) !\";\n if (bOnError) {\n options.onError.call(options.scope, new ErrorService(message));\n return;\n }\n throw new Error(message);\n }\n request = myReq.requestString;\n break;\n case \"OLS\":\n request = RouteRequestOLS.build(settings);\n if (!request) {\n message = \"Error process request (ols) !\";\n if (bOnError) {\n options.onError.call(options.scope, new ErrorService(message));\n return;\n }\n throw new Error(message);\n }\n break;\n default:\n message = \"Type of API is not supported by service (REST or OLS) !\";\n if (bOnError) {\n options.onError.call(options.scope, new ErrorService(message));\n return;\n }\n throw new Error(message);\n }\n\n return request;\n }\n};\n\nexport default RouteRequestFactory;\n" - }, - { - "id": 86, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Request/RouteRequestOLS.js", - "name": "./src/Services/Route/Request/RouteRequestOLS.js", - "index": 82, - "index2": 81, - "size": 2555, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Request/RouteRequestFactory.js", - "issuerId": 85, - "issuerName": "./src/Services/Route/Request/RouteRequestFactory.js", - "profile": { - "factory": 76, - "building": 708, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 85, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Request/RouteRequestFactory.js", - "module": "./src/Services/Route/Request/RouteRequestFactory.js", - "moduleName": "./src/Services/Route/Request/RouteRequestFactory.js", - "type": "harmony import", - "userRequest": "./RouteRequestOLS", - "loc": "11:0-48" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "/**\n * Creation d'une requête OpenLS en mode POST ou GET\n * (Factory)\n *\n * @module RouteRequestOLS\n * @alias Gp.Services.Route.Request.RouteRequestOLS\n * @private\n */\nimport Logger from \"../../../Utils/LoggerByDefault\";\nimport XLS from \"../../../Formats/XLS\";\nimport RouteService from \"../../../Formats/XLS/RouteService\";\n\nvar RouteRequestOLS = {\n\n /**\n * interface unique\n *\n * @method build\n * @static\n * @param {Object} options - options definies dans le composant Route\n *\n * @example\n * var options = {\n * (...)\n * };\n *\n * @returns {String} request\n */\n build : function (options) {\n // logger\n var logger = Logger.getLogger(\"RouteRequestOLS\");\n logger.trace([\"RouteRequestOLS::build()\"]);\n\n var request = null;\n\n // spécifique au service\n var settings = {\n startPoint : options.startPoint,\n endPoint : options.endPoint,\n viaPoint : options.viaPoints, // mapping OLS et options\n provideBoundingBox : options.provideBbox, // mapping OLS et options\n avoidFeature : options.exclusions, // mapping OLS et options\n expectedStartTime : options.expectedStartTime, // TODO format ?\n distanceUnit : options.distanceUnit,\n graph : options.graph,\n provideGeometry : options.geometryInInstructions, // mapping OLS et options\n routePreference : options.routePreference\n };\n\n // objet RouteService\n var oRS = new RouteService(settings);\n\n // Format XLS\n var oXLS = new XLS({\n srsName : options.srs,\n maximumResponses : options.maximumResponses\n });\n oXLS.namespace = true;\n oXLS.setService(oRS);\n\n // request brute !\n request = oXLS.build();\n\n // en mode GET, la requête est encodée\n // et le param. 'qxml' est ajouté\n if (options.httpMethod === \"GET\") {\n var myRequest = \"qxml=\" +\n encodeURIComponent(request)\n .replace(/-/g, \"%2D\")\n .replace(/_/g, \"%5F\")\n .replace(/\\./g, \"%2E\")\n .replace(/!/g, \"%21\")\n .replace(/~/g, \"%7E\")\n .replace(/\\*/g, \"%2A\")\n .replace(/'/g, \"%27\")\n .replace(/\\(/g, \"%28\")\n .replace(/\\)/g, \"%29\");\n request = myRequest;\n }\n\n return request;\n }\n};\n\nexport default RouteRequestOLS;\n" - }, - { - "id": 87, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/RouteService.js", - "name": "./src/Formats/XLS/RouteService.js", - "index": 83, - "index2": 80, - "size": 10347, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Request/RouteRequestOLS.js", - "issuerId": 86, - "issuerName": "./src/Services/Route/Request/RouteRequestOLS.js", - "profile": { - "factory": 289, - "building": 200, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 86, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Request/RouteRequestOLS.js", - "module": "./src/Services/Route/Request/RouteRequestOLS.js", - "moduleName": "./src/Services/Route/Request/RouteRequestOLS.js", - "type": "harmony import", - "userRequest": "../../../Formats/XLS/RouteService", - "loc": "11:0-61" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 6, - "source": "import Logger from \"../../Utils/LoggerByDefault\";\nimport AbstractService from \"./AbstractService\";\nimport DetermineRouteRequest from \"./RouteService/DetermineRouteRequest\";\nimport RouteRequestExtension from \"./RouteService/RouteRequestExtension\";\n\n/**\n * @classdesc\n *\n * Requête de type RouteService\n * (Factory)\n *\n * XSD :\n * ----\n * [] => non implementé !\n *\n * ```\n * element name=\"DetermineRouteRequest\"\n * [attribute name=\"provideRouteHandle\" default=\"false\"]\n * attribute name=\"distanceUnit\" default=\"M\"\n * [element ref=\"xls:RouteHandle\" || element ref=\"xls:RoutePlan\"]\n * element ref=\"xls:RoutePlan\"\n * element ref=\"xls:RouteInstructionsRequest\"\n * [element ref=\"xls:RouteGeometryRequest\"]\n * [element ref=\"xls:RouteMapRequest\"]\n * ```\n * ```\n * element name=\"RoutePlan\"\n * [attribute name=\"useRealTimeTraffic\" default=\"false\"]\n * [attribute name=\"expectedStartTime\" type=\"dateTime\"]\n * [attribute name=\"expectedEndTime\" type=\"dateTime\"]\n * element ref=\"xls:RoutePreference\"\n * element ref=\"xls:WayPointList\"\n * element ref=\"xls:AvoidList\"\n * ```\n * ```\n * element name=\"RoutePreference\" => value = Fastest | Shortest | Pedestrian\n * ```\n * ```\n * element name=\"WayPointList\"\n * element ref=\"xls:StartPoint\"\n * element ref=\"xls:ViaPoint\" minOccurs=\"0\"\n * element ref=\"xls:EndPoint\"\n * ```\n * ```\n * element name=\"StartPoint\"\n * [element name=\"GeocodeMatchCode\"]\n * [attribute name=\"accuracy\"]\n * [attribute name=\"matchType\"] => value = City, Street, Street number, Street enhanced, ...\n * element name=\"Position\"\n * element ref=\"gml:Point\"\n * ```\n * ```\n * element name=\"ViaPoint\"\n * [element name=\"GeocodeMatchCode\"]\n * [attribute name=\"accuracy\"]\n * [attribute name=\"matchType\"] => value = City, Street, Street number, Street enhanced, ...\n * element name=\"Position\"\n * element ref=\"gml:Point\"\n * ```\n * ```\n * element name=\"EndPoint\"\n * [element name=\"GeocodeMatchCode\"]\n * [attribute name=\"accuracy\"]\n * [attribute name=\"matchType\"] => value = City, Street, Street number, Street enhanced, ...\n * element name=\"Position\"\n * element ref=\"gml:Point\"\n * ```\n * ```\n * element name=\"AvoidList\"\n * [element ref=\"xls:AOI\"]\n * [element ref=\"xls:_Location\"] (cf. element name=\"Position\")\n * element ref=\"xls:AvoidFeature\"\n * ```\n * ```\n * [element name=\"AOI\"]\n * [element ref=\"gml:CircleByCenterPoint\" || element ref=\"gml:Polygon\" || element ref=\"gml:Envelope\"]\n * ```\n * ```\n * element name=\"AvoidFeature\" => value = highway | tollway | tunnel | bridge\n * ```\n * ```\n * [element name=\"RouteMapRequest\"]\n * [element name=\"Output\"]\n * attribute name=\"width\"\n * attribute name=\"height\"\n * attribute name=\"format\"\n * attribute name=\"BGcolor\"\n * attribute name=\"transparent\"\n * attribute name=\"style\" => value = Overview | Maneuver\n * element name=\"BBoxContext\" type=\"gml:EnvelopeType\"\n * ```\n * ```\n * element name=\"RouteInstructionsRequest\"\n * [attribute name=\"format\"] default=\"text/plain\"\n * attribute name=\"provideGeometry\" default=\"false\"\n * attribute name=\"provideBoundingBox\" default=\"false\"\n * ```\n * ```\n * [element name=\"RouteGeometryRequest\"]\n * [attribute name=\"scale\"] default=\"1\"\n * [attribute name=\"provideStartingPortion\"] default=\"false\"\n * [attribute name=\"maxPoints\"] default=\"100\"\n * [element name=\"BoundingBox\" type=\"gml:EnvelopeType\" ]\n * ```\n *\n * --------\n * Requête :\n * --------\n * ```\n * \n * \n * \n * \n * \n * \n * Fastest\n * \n * \n * \n * 2.29993 48.87228\n * \n * \n * -1.53604 47.21548\n * \n * \n * \n * \n * \n * \n * \n * non implementé !\n *\n * ```\n * element name=\"DetermineRouteRequest\"\n * [attribute name=\"provideRouteHandle\" default=\"false\"]\n * attribute name=\"distanceUnit\" default=\"M\"\n * [element ref=\"xls:RouteHandle\" || element ref=\"xls:RoutePlan\"]\n * element ref=\"xls:RoutePlan\"\n * element ref=\"xls:RouteInstructionsRequest\"\n * [element ref=\"xls:RouteGeometryRequest\"]\n * [element ref=\"xls:RouteMapRequest\"]\n * ```\n * ```\n * element name=\"RouteInstructionsRequest\"\n * [attribute name=\"format\"] default=\"text/plain\"\n * attribute name=\"provideGeometry\" default=\"false\"\n * attribute name=\"provideBoundingBox\" default=\"false\"\n * ```\n * ```\n * element name=\"RouteGeometryRequest\"\n * [attribute name=\"scale\"] default=\"1\"\n * [attribute name=\"provideStartingPortion\"] default=\"false\"\n * [attribute name=\"maxPoints\"] default=\"100\"\n * [element name=\"BoundingBox\" type=\"gml:EnvelopeType\" ]\n * ```\n * ```\n * [element name=\"RouteMapRequest\"]\n * [element name=\"Output\"]\n * [attribute name=\"width\"]\n * [attribute name=\"height\"]\n * [attribute name=\"format\"]\n * [attribute name=\"BGcolor\"]\n * [attribute name=\"transparent\"]\n * [attribute name=\"style\"] => value = Overview | Maneuver\n * [element name=\"BBoxContext\" type=\"gml:EnvelopeType\"]\n * ```\n *\n * --------\n * Requête :\n * --------\n * ```\n * \n * \n * Fastest\n * \n * \n * \n * 2.29993 48.87228\n * \n * \n * -1.53604 47.21548\n * \n * \n * \n * \n * \n * \n * ```\n *\n * @constructor\n * @alias Gp.Formats.XLS.RouteService.DetermineRouteRequest\n * @param {Object} options - options\n * @param {Object} options.route.routePreference - « fastest », « shortest » ou « pedestrian »\n * @param {String} options.route.startPoint - Point de départ (coordonnées exprimées en WGS84G)\n * @param {String} options.route.viaPoint - Liste de points intermédiaires\n * @param {String} options.route.endPoint - Point d'arrivée (coordonnées)\n * @param {Object} options.route.avoidFeature - « highway », « tollway », « tunnel » ou « bridge »\n * @param {Object} options.route.vehicle - « car »\n * @param {Object} options.route.expectedStartTime - Date et heure de départ\n * @param {Object} options.provideGeometry - true | false\n * @param {Object} options.provideBoundingBox - true | false\n * @param {Object} options.distanceUnit - Unité dans lesquelles la distance est exprimée (« m » ou « km »)\n * @param {Function} options.onsuccess - function callback success (TODO)\n * @param {Function} options.onerror - function callback error (TODO)\n *\n * @private\n */\nfunction DetermineRouteRequest (options) {\n this.logger = Logger.getLogger();\n this.logger.trace(\"[Constructeur DetermineRouteRequest ()]\");\n\n if (!(this instanceof DetermineRouteRequest)) {\n throw new TypeError(\"DetermineRouteRequest constructor cannot be called as a function.\");\n }\n\n // options par defaut\n this.options = options || {};\n\n // et on ajoute les options en paramètre aux options par défaut\n for (var opt in options) {\n if (options.hasOwnProperty(opt)) {\n this.options[opt] = options[opt];\n }\n }\n\n /**\n * Nom de la classe (heritage)\n */\n this.CLASSNAME = \"DetermineRouteRequest\";\n}\n\nDetermineRouteRequest.prototype = {\n\n /**\n * @lends module:DetermineRouteRequest#\n */\n\n /**\n * request (out)\n * @type {String}\n */\n strRequest : null,\n\n /**\n * RoutePlan\n * @type {Address}\n */\n oRoutePlan : null,\n\n /**\n * Template de la requête.\n * substitution des valeurs suivantes :\n * __DISTANCEUNIT__,\n * __ROUTEPLAN__, __ROUTEINSTRUCTIONREQUEST__, __ROUTEGEOMETRYREQUEST__, __ROUTEMAPREQUEST__\n * __PROVIDEGEOMETRY__, __PROVIDEBBOX__\n */\n template : {\n determineRouteRequest : \"\" +\n \"__ROUTEPLAN__\" +\n \"__ROUTEINSTRUCTIONREQUEST__\" +\n \"__ROUTEGEOMETRYREQUEST__\" +\n \"__ROUTEMAPREQUEST__\" +\n \"\",\n routeInstructionRequest : \"\",\n routeGeometryRequest : \"\",\n routeMapRequest : \"\" // FIXME not yet implemented !\n },\n\n /**\n * Ajout d'un objet de type RoutePlan\n *\n * @param {Object} oRoutePlan - RoutePlan\n */\n addRoute : function (oRoutePlan) {\n if (oRoutePlan instanceof RoutePlan) {\n this.oRoutePlan = oRoutePlan;\n }\n },\n\n /**\n * Constructeur (alias)\n */\n constructor : DetermineRouteRequest,\n\n /**\n * toString\n *\n * @returns {String} requête\n */\n toString : function () {\n var template = \"\";\n template = this.template.determineRouteRequest;\n template = template.replace(/__DISTANCEUNIT__/g, this.options.distanceUnit || \"KM\");\n\n // soit on a déjà un objet RoutePlan instancié,\n // sinon, on le fabrique via les options\n if (!this.oRoutePlan) {\n var settings = this.options.route;\n\n this.oRoutePlan = new RoutePlan(settings);\n if (!this.oRoutePlan) {\n throw new Error(\"La construction du calcul d'initineraire n'est pas correctement definie !?\");\n }\n }\n\n // routeplan\n template = template.replace(/__ROUTEPLAN__/g, this.oRoutePlan.toString());\n\n // instruction\n var tmplInstruction = this.template.routeInstructionRequest;\n tmplInstruction = tmplInstruction.replace(/__PROVIDEGEOMETRY__/g, this.options.provideGeometry || false);\n tmplInstruction = tmplInstruction.replace(/__PROVIDEBBOX__/g, this.options.provideBoundingBox || false);\n template = template.replace(/__ROUTEINSTRUCTIONREQUEST__/g, tmplInstruction);\n\n // geometry\n var tmplGeometry = this.template.routeGeometryRequest;\n template = template.replace(/__ROUTEGEOMETRYREQUEST__/g, tmplGeometry);\n\n // map\n var tmplMap = this.template.routeMapRequest;\n template = template.replace(/__ROUTEMAPREQUEST__/g, tmplMap);\n\n this.strRequest = template;\n return this.strRequest;\n }\n};\n\nexport default DetermineRouteRequest;\n" - }, - { - "id": 89, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/RouteService/model/RoutePlan.js", - "name": "./src/Formats/XLS/RouteService/model/RoutePlan.js", - "index": 85, - "index2": 77, - "size": 9112, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/RouteService/DetermineRouteRequest.js", - "issuerId": 88, - "issuerName": "./src/Formats/XLS/RouteService/DetermineRouteRequest.js", - "profile": { - "factory": 110, - "building": 38, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 88, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/RouteService/DetermineRouteRequest.js", - "module": "./src/Formats/XLS/RouteService/DetermineRouteRequest.js", - "moduleName": "./src/Formats/XLS/RouteService/DetermineRouteRequest.js", - "type": "harmony import", - "userRequest": "./model/RoutePlan", - "loc": "2:0-42" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 8, - "source": "import Logger from \"../../../../Utils/LoggerByDefault\";\n\n/**\n * @classdesc\n * * Élément regroupant l'ensemble des données et paramètres pour le calcul d'itinéraire : points de navigation, configuration.\n *\n * ----\n * XSD :\n * ----\n * [] => non implementé !\n *\n * ```\n * element name=\"RoutePlan\"\n * [attribute name=\"useRealTimeTraffic\" default=\"false\"]\n * [attribute name=\"expectedStartTime\" type=\"dateTime\"]\n * [attribute name=\"expectedEndTime\" type=\"dateTime\"]\n * element ref=\"xls:RoutePreference\"\n * element ref=\"xls:WayPointList\"\n * element ref=\"xls:AvoidList\"\n * ```\n * ```\n * element name=\"RoutePreference\"\n * => value = fastest | shortest | pedestrian\n * ```\n * ```\n * element name=\"WayPointList\"\n * element ref=\"xls:StartPoint\"\n * element ref=\"xls:ViaPoint\" minOccurs=\"0\"\n * element ref=\"xls:EndPoint\"\n * ```\n * ```\n * element name=\"StartPoint\"\n * [element name=\"GeocodeMatchCode\"]\n * [attribute name=\"accuracy\"]\n * [attribute name=\"matchType\"] => value = City, Street, Street number, Street enhanced, ...\n * element name=\"Position\"\n * element ref=\"gml:Point\"\n * ```\n * ```\n * element name=\"ViaPoint\"\n * [element name=\"GeocodeMatchCode\"]\n * [attribute name=\"accuracy\"]\n * [attribute name=\"matchType\"] => value = City, Street, Street number, Street enhanced, ...\n * element name=\"Position\"\n * element ref=\"gml:Point\"\n * ```\n * ```\n * element name=\"EndPoint\"\n * [element name=\"GeocodeMatchCode\"]\n * [attribute name=\"accuracy\"]\n * [attribute name=\"matchType\"] => value = City, Street, Street number, Street enhanced, ...\n * element name=\"Position\"\n * element ref=\"gml:Point\"\n * ```\n * ```\n * element name=\"AvoidList\"\n * [element ref=\"xls:AOI\"]\n * [element ref=\"xls:_Location\"] (cf. element name=\"Position\")\n * element ref=\"xls:AvoidFeature\"\n * ```\n * ```\n * [element name=\"AOI\"]\n * [element ref=\"gml:CircleByCenterPoint\" || element ref=\"gml:Polygon\" || element ref=\"gml:Envelope\"]\n * ```\n * ```\n * element name=\"AvoidFeature\" => value = highway | tollway | tunnel | bridge\n * ```\n *\n * --------\n * Requête :\n * --------\n * ```\n * \n * Fastest\n * \n * \n * \n * 2.29993 48.87228\n * \n * \n * -1.53604 47.21548\n * \n * \n * \n * highway\n * tollway\n * tunnel\n * \n * \n * ```\n * @constructor\n * @alias Gp.Formats.XLS.RouteService.RoutePlan\n * @param {Object} options - options\n *\n * @private\n */\nfunction RoutePlan (options) {\n this.logger = Logger.getLogger(\"RoutePlan\");\n this.logger.trace(\"[Constructeur RoutePlan ()]\");\n\n if (!(this instanceof RoutePlan)) {\n throw new TypeError(\"RoutePlan constructor cannot be called as a function.\");\n }\n\n // param par defaut\n this.options = options || {};\n\n // param obligatoire\n if (!options.startPoint) {\n throw new Error(\"l'option 'startPoint' n'est pas renseignée !\");\n }\n\n if (!options.endPoint) {\n throw new Error(\"l'option 'endPoint' n'est pas renseignée !\");\n }\n\n // et on ajoute les options en paramètre aux options par défaut\n for (var opt in options) {\n if (options.hasOwnProperty(opt)) {\n this.options[opt] = options[opt];\n }\n }\n}\n\nRoutePlan.prototype = {\n\n /**\n * Constructeur (alias)\n */\n constructor : RoutePlan,\n\n /**\n * request (out)\n * @type {String}\n */\n requestString : null,\n\n /**\n * Template de la requête.\n * substitution des valeurs suivantes :\n * - __ROUTEPREFERENCE__, __VALUEROUTEPREFERENCE__\n * - __GRAPH__, __VALUEGRAPH__\n * - __WAYPOINTLIST__ (lst?), __STARTPOINT__, __VIAPOINT__, __ENDPOINT__, __POINT__, __X__, __Y__\n * - __AVOIDLIST__ (lst!), __AVOIDFEATURE__, __VALUEAVOIDFEATURE__\n */\n template : {\n routePlan : \"\" +\n \"__ROUTEPREFERENCE__\" +\n \"__GRAPH__\" +\n \"__WAYPOINTLIST__\" +\n \"__AVOIDLIST__\" +\n \"\",\n routePreference : \"__VALUEROUTEPREFERENCE__\",\n graph : \"\",\n wayPointList : {\n container : \"\" +\n \"__STARTPOINT__\" +\n \"__VIAPOINT__\" +\n \"__ENDPOINT__\" +\n \"\",\n point : \"__X__ __Y__\",\n startPoint : \"\" +\n \"__POINT__\" +\n \"\",\n endPoint : \"\" +\n \"__POINT__\" +\n \"\",\n viaPoint : \"\" +\n \"__POINT__\" +\n \"\" // implémentation de plusieurs étapes...\n },\n avoidList : {\n container : \"\" +\n \"__AVOIDFEATURE__\" +\n \"\",\n avoidFeature : \"__VALUEAVOIDFEATURE__\"\n }\n },\n\n /**\n * toString\n *\n * @returns {String} requête\n */\n toString : function () {\n var template = \"\";\n template = this.template.routePlan;\n\n // preference\n if (this.options.routePreference) {\n var tmplPreference = this.template.routePreference;\n tmplPreference = tmplPreference.replace(/__VALUEROUTEPREFERENCE__/, this.options.routePreference);\n template = template.replace(/__ROUTEPREFERENCE__/g, tmplPreference);\n }\n // clean preference\n template = template.replace(/__ROUTEPREFERENCE__/g, \"\");\n\n // exclusions\n if (this.options.avoidFeature) {\n var tmplAvoidList = this.template.avoidList.container;\n var avoidFeatures = [];\n for (var i = 0; i < this.options.avoidFeature.length; i++) {\n var tmplAvoidFeature = this.template.avoidList.avoidFeature;\n tmplAvoidFeature = tmplAvoidFeature.replace(/__VALUEAVOIDFEATURE__/, this.options.avoidFeature[i]);\n avoidFeatures.push(tmplAvoidFeature);\n }\n tmplAvoidList = tmplAvoidList.replace(/__AVOIDFEATURE__/, avoidFeatures.join(\"\\n\"));\n template = template.replace(/__AVOIDLIST__/g, tmplAvoidList);\n }\n // clean exclusions\n template = template.replace(/__AVOIDLIST__/g, \"\");\n\n // graph\n if (this.options.graph) {\n var tmplVehicle = this.template.graph;\n tmplVehicle = tmplVehicle.replace(/__VALUEGRAPH__/, this.options.graph);\n template = template.replace(/__GRAPH__/g, tmplVehicle);\n }\n // clean vehicle\n template = template.replace(/__GRAPH__/g, \"\");\n\n // points\n var tmplWayPointList = this.template.wayPointList.container;\n var tmplPoint = \"\";\n // start\n tmplPoint = this.template.wayPointList.point;\n tmplPoint = tmplPoint.replace(/__X__/, this.options.startPoint.x);\n tmplPoint = tmplPoint.replace(/__Y__/, this.options.startPoint.y);\n tmplWayPointList = tmplWayPointList.replace(/__STARTPOINT__/,\n this.template.wayPointList.startPoint.replace(/__POINT__/, tmplPoint));\n // end\n tmplPoint = this.template.wayPointList.point;\n tmplPoint = tmplPoint.replace(/__X__/, this.options.endPoint.x);\n tmplPoint = tmplPoint.replace(/__Y__/, this.options.endPoint.y);\n tmplWayPointList = tmplWayPointList.replace(/__ENDPOINT__/,\n this.template.wayPointList.endPoint.replace(/__POINT__/, tmplPoint));\n // via\n if (this.options.viaPoint) {\n var points = [];\n for (var j = 0; j < this.options.viaPoint.length; j++) {\n var p = this.options.viaPoint[j];\n tmplPoint = this.template.wayPointList.point;\n tmplPoint = tmplPoint.replace(/__X__/, p.x);\n tmplPoint = tmplPoint.replace(/__Y__/, p.y);\n points.push(tmplPoint);\n }\n\n tmplWayPointList = tmplWayPointList.replace(/__VIAPOINT__/,\n this.template.wayPointList.viaPoint.replace(/__POINT__/, points.join(\"\\n\")));\n } else {\n // clean viaPoint\n tmplWayPointList = tmplWayPointList.replace(/__VIAPOINT__/, \"\");\n }\n\n template = template.replace(/__WAYPOINTLIST__/g, tmplWayPointList);\n\n this.requestString = template;\n return this.requestString;\n }\n};\n\nexport default RoutePlan;\n" - }, - { - "id": 90, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/RouteService/RouteRequestExtension.js", - "name": "./src/Formats/XLS/RouteService/RouteRequestExtension.js", - "index": 86, - "index2": 79, - "size": 307, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/RouteService.js", - "issuerId": 87, - "issuerName": "./src/Formats/XLS/RouteService.js", - "profile": { - "factory": 71, - "building": 6 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 87, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Formats/XLS/RouteService.js", - "module": "./src/Formats/XLS/RouteService.js", - "moduleName": "./src/Formats/XLS/RouteService.js", - "type": "harmony import", - "userRequest": "./RouteService/RouteRequestExtension", - "loc": "4:0-73" - } - ], - "usedExports": [ - "default" - ], - "providedExports": null, - "optimizationBailout": [], - "depth": 7, - "source": "/**\n * not implemented !\n *\n * Extension de type 'graphName' de l'objet RoutePlan'\n *\n * FIXME L'extension 'graphName' est intégré comme étant du standard OLS.\n * La balise viendrait surcharger le comportement de RoutePreference...\n *\n * ex. \n */\n" - }, - { - "id": 91, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Request/RouteRequestREST.js", - "name": "./src/Services/Route/Request/RouteRequestREST.js", - "index": 87, - "index2": 83, - "size": 2617, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Request/RouteRequestFactory.js", - "issuerId": 85, - "issuerName": "./src/Services/Route/Request/RouteRequestFactory.js", - "profile": { - "factory": 77, - "building": 768, - "dependencies": 0 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 85, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Request/RouteRequestFactory.js", - "module": "./src/Services/Route/Request/RouteRequestFactory.js", - "moduleName": "./src/Services/Route/Request/RouteRequestFactory.js", - "type": "harmony import", - "userRequest": "./RouteRequestREST", - "loc": "12:0-50" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "\nimport Logger from \"../../../Utils/LoggerByDefault\";\nimport _ from \"../../../Utils/MessagesResources\";\nimport RouteParamREST from \"./model/RouteParamREST\";\n\n/**\n * @classdesc\n * Classe de gestion des requêtes de type REST sur le service de calcul d'itineraire\n * (uniquement en GET)\n *\n * @constructor\n * @alias Gp.Services.Route.Request.RouteRequestREST\n * @param {Object} options - options definies dans le composant Route\n *\n * @example\n * var options = {\n * (...)\n * };\n *\n * @private\n */\nfunction RouteRequestREST (options) {\n this.logger = Logger.getLogger(\"RouteRequestREST\");\n this.logger.trace(\"[Constructeur RouteRequestREST ()]\");\n\n if (!(this instanceof RouteRequestREST)) {\n throw new TypeError(\"RouteRequestREST constructor cannot be called as a function.\");\n }\n\n // existance des options\n if (!options) {\n throw new Error(_.getMessage(\"PARAM_EMPTY\", \"options\"));\n }\n\n /** liste des options */\n this.settings = options;\n}\n\nRouteRequestREST.prototype = {\n\n /**\n * @lends module:RouteRequestREST#\n */\n\n /**\n * request\n * @type {String}\n */\n requestString : null,\n\n /**\n * Constructeur (alias)\n */\n constructor : RouteRequestREST,\n\n /**\n * Construction de la requête.\n *\n * @example\n * // GET out : origin=2.416907353809513,48.8465772142297&destination=2.4248037771493673,48.84591353161838\n * // POST out : Not yet supported method POST !\n * @returns {String} request\n */\n processRequestString : function () {\n // INFO\n // construction simple sans template...,\n // mais en attendant que les services soient fixés, on taggue ce composant en mode PROTOTYPE !\n this.logger.warn(\"FIXME : PROTOTYPE !\");\n\n // Mapping des options avec le service de l'API REST\n var oParams = new RouteParamREST(this.settings);\n var params = oParams.getParams();\n\n var request = \"\";\n for (var i = 0; i < params.length; i++) {\n var o = params[i];\n if (request) {\n request += \"&\";\n }\n request += o.k + \"=\" + o.v;\n }\n\n // Exemple :\n // http://wxs.ign.fr/KEY/itineraire/rest/route.json?\n // origin=&\n // destination=&\n // waypoints=&\n // method=DISTANCE&\n // graph=Pieton&\n // graphName=Pieton&\n // exclusions=&\n // tolerance=10&\n // srs=\n\n this.logger.trace(request);\n this.requestString = request;\n\n return this.requestString;\n }\n};\n\nexport default RouteRequestREST;\n" - }, - { - "id": 92, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Request/model/RouteParamREST.js", - "name": "./src/Services/Route/Request/model/RouteParamREST.js", - "index": 88, - "index2": 82, - "size": 4922, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Request/RouteRequestREST.js", - "issuerId": 91, - "issuerName": "./src/Services/Route/Request/RouteRequestREST.js", - "profile": { - "factory": 228, - "building": 267, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 91, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Request/RouteRequestREST.js", - "module": "./src/Services/Route/Request/RouteRequestREST.js", - "moduleName": "./src/Services/Route/Request/RouteRequestREST.js", - "type": "harmony import", - "userRequest": "./model/RouteParamREST", - "loc": "4:0-52" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 6, - "source": "\nimport Logger from \"../../../../Utils/LoggerByDefault\";\n\n/**\n * @classdesc\n * Classe de gestion des param. des requêtes du service de calcul d'itineraire (REST).\n * Permet le mapping avec les options du service.\n * @constructor\n * @alias Gp.Services.Route.Request.RouteParamREST\n * @param {Object} options - options\n *\n * @private\n */\nfunction RouteParamREST (options) {\n if (!(this instanceof RouteParamREST)) {\n throw new TypeError(\"RouteParamREST constructor cannot be called as a function.\");\n }\n\n this.logger = Logger.getLogger();\n this.logger.trace(\"[Constructeur RouteParamREST ()]\");\n\n /**\n * Options en paramêtres du constructeur.\n */\n this.options = options || {};\n\n // mapping des options avec l'API REST\n\n /** Coordonnées du point de départ. */\n this.origin = this.options.startPoint.x + \",\" + this.options.startPoint.y;\n\n /** Coordonnées du point d’arrivée. */\n this.destination = this.options.endPoint.x + \",\" + this.options.endPoint.y;\n\n /** Coordonnées des étapes point de départ. */\n this.waypoints = this.options.viaPoints || null;\n\n /** Date et heure de départ */\n this.startDateTime = this.options.expectedStartTime || null; // TODO format !?\n\n /** Nom du graphe à utiliser */\n this.graphName = this.options.graph;\n\n /** projection (code EPSG comme epsg:4326 ou wgs84) */\n this.srs = this.options.srs;\n\n /** Liste des règles de restrictions à utiliser, séparés pas le caractère , ou ; (Exemple : Toll, Tunnel, Bridge) */\n this.exclusions = this.options.exclusions;\n\n /**\n * itinéraire le plus court (DISTANCE) ou le plus rapide (TIME)\n * Par defaut, DISTANCE...\n * cf. mapping ci dessous\n */\n this.method = \"TIME\";\n\n // mapping particulier sur l'option 'routePreference'\n if (this.options.routePreference) {\n var value = this.options.routePreference;\n switch (value) {\n case \"fastest\":\n this.method = \"TIME\";\n break;\n case \"shortest\":\n this.method = \"DISTANCE\";\n break;\n default:\n this.logger.warn(\"Par defaut, on prend l'itinéraire le plus rapide !\");\n this.method = \"TIME\";\n }\n }\n\n /** Format de sortie (résumé de l’itinéraire) */\n this.format = (this.options.geometryInInstructions) ? \"STANDARDEXT\" : \"STANDARD\";\n\n // y'a t-il d'autres options à ajouter (par defaut) ?\n\n /** Distance de tolérance (en mètre) de simplification de la géométrie. */\n this.tolerance = 10;\n\n /** identifiant du véhicule (enregistré dans les profils de véhicule) à utiliser */\n this.profileId = null;\n\n /** Profil du véhicule (enregistré dans les profils de véhicule) à utiliser */\n this.profileName = null;\n\n // options dont le mapping n'est pas possible :\n // - distanceUnit\n // - provideBoundingBox\n}\n\n/**\n * CLASSNAME\n */\nRouteParamREST.CLASSNAME = \"RouteParamREST\";\n\nRouteParamREST.prototype = {\n\n /**\n * @lends module:RouteParamREST#\n */\n\n /**\n * Constructeur (alias)\n */\n constructor : RouteParamREST,\n\n /**\n * Retourne une liste de points\n * @returns {Array} une liste de points (sep ';')\n */\n getWaypoints : function () {\n if (!this.waypoints) {\n return;\n }\n var array = [];\n for (var i = 0; i < this.waypoints.length; i++) {\n var obj = this.waypoints[i];\n array.push(obj.x + \",\" + obj.y);\n }\n\n return array.join(\";\");\n },\n\n /**\n * Retourne la liste des exclusions\n * @returns {Array} une liste d'exclusions (sep ';')\n */\n getExclusions : function () {\n return this.exclusions.join(\";\");\n }\n};\n\n/**\n * Tableau de clefs/valeurs pour param.\n *\n * @returns {Array} liste de paramêtres\n */\nRouteParamREST.prototype.getParams = function () {\n var map = [];\n\n map.push({\n k : \"origin\",\n v : this.origin\n });\n\n map.push({\n k : \"destination\",\n v : this.destination\n });\n\n map.push({\n k : \"method\",\n v : this.method\n });\n\n if (this.waypoints) {\n map.push({\n k : \"waypoints\",\n v : this.getWaypoints()\n });\n }\n\n if (this.startDateTime) {\n map.push({\n k : \"startDateTime\",\n v : this.startDateTime\n });\n }\n\n if (this.graphName) {\n map.push({\n k : \"graphName\",\n v : this.graphName\n });\n }\n\n if (this.exclusions) {\n map.push({\n k : \"exclusions\",\n v : this.getExclusions()\n });\n }\n\n if (this.srs) {\n map.push({\n k : \"srs\",\n v : this.srs\n });\n }\n\n if (this.format) {\n map.push({\n k : \"format\",\n v : this.format\n });\n }\n\n return map;\n};\n\nexport default RouteParamREST;\n" - }, - { - "id": 93, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Response/RouteResponseFactory.js", - "name": "./src/Services/Route/Response/RouteResponseFactory.js", - "index": 89, - "index2": 90, - "size": 14710, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Route.js", - "issuerId": 84, - "issuerName": "./src/Services/Route/Route.js", - "profile": { - "factory": 128, - "building": 329, - "dependencies": 215 - }, - "failed": false, - "errors": 0, - "warnings": 1, - "reasons": [ - { - "moduleId": 84, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Route.js", - "module": "./src/Services/Route/Route.js", - "moduleName": "./src/Services/Route/Route.js", - "type": "harmony import", - "userRequest": "./Response/RouteResponseFactory", - "loc": "8:0-67" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 4, - "source": "/**\n * Factory pour générer une reponse JSON à partir d'un XML ou d'un JSON\n * (Factory)\n *\n * @module RouteResponseFactory\n * @alias Gp.Services.Route.Response.RouteResponseFactory\n * @private\n */\nimport Logger from \"../../../Utils/LoggerByDefault\";\nimport MRes from \"../../../Utils/MessagesResources\";\nimport ErrorService from \"../../../Exceptions/ErrorService\";\nimport XML from \"../../../Formats/XML\";\nimport WKT from \"../../../Formats/WKT\";\nimport RouteResponseRESTReader from \"../Formats/RouteResponseRESTReader\";\nimport RouteResponseOLSReader from \"../Formats/RouteResponseOLSReader\";\nimport RouteResponse from \"./model/RouteResponse\";\nimport RouteInstruction from \"./model/RouteInstruction\";\n\nvar RouteResponseFactory = {\n\n /**\n * interface unique\n *\n * @method build\n * @static\n * @param {Object} options - options definies dans le composant Alti\n *\n * @example\n * var options = {\n * response :\n * outputFormat :\n * rawResponse :\n * scope :\n * onSuccess :\n * onError :\n * };\n *\n */\n build : function (options) {\n // logger\n var logger = Logger.getLogger(\"RouteResponseFactory\");\n logger.trace(\"RouteResponseFactory::build()\");\n\n var data = null;\n\n if (options.response) {\n if (options.rawResponse) {\n logger.trace(\"analyze response : raw\");\n data = options.response;\n } else {\n switch (options.outputFormat) {\n case \"xml\":\n logger.trace(\"analyze response : xml\");\n\n // type de reader en fonction de l'API\n var routeReader = options.api === \"REST\" ? RouteResponseRESTReader : RouteResponseOLSReader;\n\n try {\n var p = new XML({\n reader : routeReader\n });\n\n // FIXME : mode XHR ne retourne que des string ? JSONP aussi à ce niveau ?\n if (typeof options.response === \"string\") {\n p.setXMLString(options.response);\n } else {\n p.setXMLDoc(options.response);\n }\n\n data = p.parse();\n\n if (!data) {\n throw new ErrorService(MRes.getMessage(\"SERVICE_RESPONSE_FORMAT\", \"xml\"));\n }\n } catch (e) {\n options.onError.call(options.scope, new ErrorService(MRes.getMessage(\"SERVICE_RESPONSE_ANALYSE\", options.response)));\n return;\n }\n\n break;\n\n case \"json\":\n logger.trace(\"analyze response : json\");\n\n var JSONResponse;\n if (typeof options.response === \"string\") {\n JSONResponse = JSON.parse(options.response);\n } else {\n JSONResponse = options.response;\n }\n\n // le service renvoie t il une erreur ?\n if (JSONResponse.message) {\n // ex. {\"message\":\"message not null\", \"status\":\"ERROR\"}\n options.onError.call(options.scope, new ErrorService(MRes.getMessage(\"SERVICE_RESPONSE_EXCEPTION\", JSONResponse.message)));\n return;\n }\n\n // construction de l'objet réponse JSON\n if (JSONResponse) {\n var legs = [];\n var legSteps = [];\n var steps = [];\n\n data = new RouteResponse();\n\n if (data.hasOwnProperty(\"totalTime\")) {\n // info : il y a aussi JSONResponse.duration, qui donne la durée en hh:mm:ss.\n data.totalTime = parseFloat(JSONResponse.durationSeconds);\n }\n if (data.hasOwnProperty(\"totalDistance\")) {\n data.totalDistance = (options.distanceUnit === \"m\") ? JSONResponse.distanceMeters : JSONResponse.distance;\n }\n\n if (data.hasOwnProperty(\"bbox\")) {\n var coords = JSONResponse.bounds.split(/[,;]/);\n data.bbox.left = parseFloat(coords[0]);\n data.bbox.bottom = parseFloat(coords[1]);\n data.bbox.right = parseFloat(coords[2]);\n data.bbox.top = parseFloat(coords[3]);\n }\n /**\n * callback success\n * @param {Object} json - json\n * @private\n */\n var onWKTSuccess = function (json) {\n data.routeGeometry = json;\n };\n /**\n * callback failed\n * @param {Object} e - event\n * @private\n */\n var onWKTError = function (e) {\n console.log(e);\n options.onError.call(options.scope, new ErrorService(MRes.getMessage(\"PARAM_FORMAT\", [\"geometryWkt\"])));\n };\n\n if (data.hasOwnProperty(\"routeGeometry\")) {\n var geometry = JSONResponse.geometryWkt || JSONResponse.simplifiedWkt;\n if (geometry) {\n WKT.toJson(geometry, onWKTSuccess, onWKTError);\n if (!data.routeGeometry) {\n return;\n }\n }\n }\n\n if (data.hasOwnProperty(\"routeInstructions\")) {\n var legList = JSONResponse.legs;\n var i;\n if (Array.isArray(legList) && legList.length) {\n for (i = 0; i < legList.length; i++) {\n legs.push(legList[i]);\n }\n }\n if (Array.isArray(legs) && legs.length) {\n for (i = 0; i < legs.length; i++) {\n legSteps.push(legs[i].steps);\n }\n }\n if (Array.isArray(legSteps) && legSteps.length) {\n for (i = 0; i < legSteps.length; i++) {\n steps = steps.concat(legSteps[i]);\n }\n }\n\n steps.forEach(function (step) {\n data.routeInstructions.push(new RouteInstruction());\n data.routeInstructions[data.routeInstructions.length - 1].duration = step.durationSeconds;\n data.routeInstructions[data.routeInstructions.length - 1].distance = (options.distanceUnit === \"m\") ? step.distanceMeters : step.distance;\n data.routeInstructions[data.routeInstructions.length - 1].code = step.navInstruction;\n // geometrie en geojson\n var points = [];\n for (var i = 0; i < step.points.length; i++) {\n var point = step.points[i].split(\",\");\n if (point) {\n points.push(point);\n }\n }\n if (points && points.length !== 0) {\n data.routeInstructions[data.routeInstructions.length - 1].geometry = {\n coordinates : points,\n type : \"LineString\"\n };\n } else {\n data.routeInstructions[data.routeInstructions.length - 1].geometry = null;\n }\n\n /*\n Traduction du code en instruction\n * - F : tout droit\n * - B : demi-tour\n * - L : tourner à gauche\n * - R : tourner à droite\n * - BL : tourner très à gauche\n * - BR : tourner très à droite\n * - FL : tourner légèrement à gauche\n * - FR : tourner légèrement à droite\n * - round_about_entry : entrée rond-point\n * - round_about_exit : sortie rond-point\n */\n\n // on ne souhaite pas de ce type de valeur...\n if (step.name === \"Valeur non renseignée\") {\n step.name = \"\";\n }\n\n switch (step.navInstruction) {\n case \"F\":\n if (step.name) {\n data.routeInstructions[data.routeInstructions.length - 1].instruction = \"Tout droit \" + step.name;\n } else {\n data.routeInstructions[data.routeInstructions.length - 1].instruction = \"Continuer tout droit \";\n }\n break;\n case \"B\":\n data.routeInstructions[data.routeInstructions.length - 1].instruction = \"Demi-tour \" + step.name;\n break;\n case \"L\":\n data.routeInstructions[data.routeInstructions.length - 1].instruction = \"Tourner à gauche \" + step.name;\n break;\n case \"R\":\n data.routeInstructions[data.routeInstructions.length - 1].instruction = \"Tourner à droite \" + step.name;\n break;\n case \"BL\":\n data.routeInstructions[data.routeInstructions.length - 1].instruction = \"Tourner très à gauche \" + step.name;\n break;\n case \"BR\":\n data.routeInstructions[data.routeInstructions.length - 1].instruction = \"Tourner très à droite \" + step.name;\n break;\n case \"FL\":\n data.routeInstructions[data.routeInstructions.length - 1].instruction = \"Tourner légèrement à gauche \" + step.name;\n break;\n case \"FR\":\n data.routeInstructions[data.routeInstructions.length - 1].instruction = \"Tourner légèrement à droite \" + step.name;\n break;\n case \"round_about_entry\":\n data.routeInstructions[data.routeInstructions.length - 1].instruction = \"Entrée rond-point \" + step.name;\n break;\n case \"round_about_exit\":\n data.routeInstructions[data.routeInstructions.length - 1].instruction = \"Sortie rond-point \" + step.name;\n break;\n case null:\n data.routeInstructions[data.routeInstructions.length - 1].instruction = \"Prendre tout droit \" + step.name;\n break;\n default:\n data.routeInstructions[data.routeInstructions.length - 1].instruction = \"?\" + step.navInstruction + \"? \" + step.name;\n break;\n }\n });\n }\n }\n\n if (!data) {\n options.onError.call(options.scope, new ErrorService(MRes.getMessage(\"SERVICE_RESPONSE_ANALYSE\", \"json\")));\n return;\n }\n break;\n\n default:\n options.onError.call(options.scope, new ErrorService(MRes.getMessage(\"SERVICE_RESPONSE_FORMAT\", \"json\", \"xml\")));\n return;\n }\n\n // Si la réponse contenait une exception renvoyée par le service\n if (data && data.exceptionReport) {\n options.onError.call(options.scope, new ErrorService(MRes.getMessage(\"SERVICE_RESPONSE_EXCEPTION_2\")));\n return;\n }\n }\n } else {\n options.onError.call(options.scope, new ErrorService(MRes.getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n return;\n }\n\n options.onSuccess.call(options.scope, data);\n }\n};\n\nexport default RouteResponseFactory;\n" - }, - { - "id": 94, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Formats/RouteResponseRESTReader.js", - "name": "./src/Services/Route/Formats/RouteResponseRESTReader.js", - "index": 91, - "index2": 88, - "size": 10082, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Response/RouteResponseFactory.js", - "issuerId": 93, - "issuerName": "./src/Services/Route/Response/RouteResponseFactory.js", - "profile": { - "factory": 218, - "building": 848, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 93, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Response/RouteResponseFactory.js", - "module": "./src/Services/Route/Response/RouteResponseFactory.js", - "moduleName": "./src/Services/Route/Response/RouteResponseFactory.js", - "type": "harmony import", - "userRequest": "../Formats/RouteResponseRESTReader", - "loc": "14:0-73" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "/**\n * Analyse de la reponse REST\n *\n * @module RouteResponseRESTReader\n * @alias Gp.Services.Route.Formats.RouteResponseRESTReader\n * @todo not yet implemented !\n * @private\n */\n\n// import Logger from \"../../../Utils/LoggerByDefault\";\nimport MessagesResources from \"../../../Utils/MessagesResources\";\nimport WKT from \"../../../Formats/WKT\";\nimport ErrSrv from \"../../../Exceptions/ErrorService\";\nimport RouteResponse from \"../Response/model/RouteResponse\";\nimport RouteInstruction from \"../Response/model/RouteInstruction\";\n\n/**\n * Objet RouteResponseRestReader\n * @member {Object} RouteResponseRestReader\n *\n * @property {Object} RouteResponseRestReader.READERS - Objet contenant des fonctions de lecture, appelées \"readers\"\n * dont chaque clé correspond au nom d'un tag du XML que l'on souhaite lire\n * et la valeur associée est une fonction (node, data)\n * où node est un noeud du document DOM\n * et data est un objet où l'on stocke les informations lues dans le XML.\n *\n * @property {Method} RouteResponseRestReader.read - Méthode permettant de lancer la lecture d'une réponse XML du\n * service de calcul d'itineraire, à l'aide des readers de la classe.\n *\n */\n\nvar RouteResponseRESTReader = {};\n\nRouteResponseRESTReader.READERS = {\n\n /**\n * Route response\n * @param {Object} node - node\n * @returns {Object} response\n */\n routeResult : function (node) {\n var response = new RouteResponse();\n\n // on boucle sur les balises \"enfant\" de la réponse :\n // status, distance, duration, distanceMeters, durationSeconds, bounds, geometryWkt, simplifiedWkt, leg\n __getChildNodes(node, response);\n\n if (response.status === \"error\") {\n var message = MessagesResources.getMessage(\"SERVICE_RESPONSE_EXCEPTION\",\n response.message);\n throw new ErrSrv({\n message : message,\n type : ErrSrv.TYPE_SRVERR\n });\n }\n\n return response;\n },\n\n /**\n * Route status\n * @param {Object} node - node\n * @param {Object} response - response\n */\n status : function (node, response) {\n var status = __getChildValue(node);\n if (status === \"ERROR\" || status === \"error\") {\n if (response) {\n response.status = \"error\";\n }\n }\n },\n\n /**\n * Route message\n * @param {Object} node - node\n * @param {Object} response - response\n */\n message : function (node, response) {\n if (response) {\n response.message = __getChildValue(node);\n }\n },\n\n /**\n * Route distance\n * @param {Object} node - node\n * @param {Object} response - response\n */\n distance : function (node, response) {\n if (response) {\n response.totalDistance = __getChildValue(node);\n }\n },\n\n /**\n * Route duration\n * @param {Object} node - node\n * @param {Object} response - response\n */\n durationSeconds : function (node, response) {\n if (response) {\n response.totalTime = parseFloat(__getChildValue(node));\n }\n },\n\n /**\n * Route bounds\n * @param {Object} node - node\n * @param {Object} response - response\n */\n bounds : function (node, response) {\n // get value et split et parseFloat\n if (response && response.bbox) {\n var coords = __getChildValue(node).split(/[,;]/);\n response.bbox.left = parseFloat(coords[0]);\n response.bbox.bottom = parseFloat(coords[1]);\n response.bbox.right = parseFloat(coords[2]);\n response.bbox.top = parseFloat(coords[3]);\n }\n },\n\n /**\n * Route geometry\n * @param {Object} node - node\n * @param {Object} response - response\n */\n geometryWkt : function (node, response) {\n if (response) {\n var geomWkt = node.innerHTML;\n\n var onWKTSuccess = function (json) {\n response.routeGeometry = json;\n };\n\n var onWKTError = function () {\n var msg = MessagesResources.getMessage(\"PARAM_FORMAT\", [\"geometryWkt\"]);\n throw new Error(msg);\n };\n // get WKT Geometry from string\n WKT.toJson(geomWkt, onWKTSuccess, onWKTError);\n }\n },\n\n /**\n * Route step\n * @param {Object} node - node\n * @param {Object} response - response\n */\n step : function (node, response) {\n // création d'une nouvelle instruction\n var routeInstruction = new RouteInstruction();\n var name;\n\n // lecture des informations de l'instruction (balises enfants)\n if (node.hasChildNodes) {\n var children = node.childNodes;\n var child;\n var childName;\n\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n\n if (child.nodeType === 1) { // 1 === node.ELEMENT_NODE\n childName = child.localName || child.baseName || child.nodeName;\n\n if (childName === \"durationSeconds\") {\n routeInstruction.duration = __getChildValue(child);\n } else if (childName === \"distance\") {\n routeInstruction.distance = __getChildValue(child);\n } else if (childName === \"navInstruction\") {\n routeInstruction.code = __getChildValue(child);\n } else if (childName === \"name\") {\n name = __getChildValue(child);\n }\n }\n }\n }\n\n // on teste le code de l'instruction pour y ajouter la bonne description\n if (routeInstruction.code) {\n switch (routeInstruction.code) {\n case \"F\":\n if (name !== \"Valeur non renseignée\") {\n routeInstruction.instruction = \"Tout droit \" + name;\n } else {\n routeInstruction.instruction = \"Continuer tout droit \";\n }\n break;\n case \"B\":\n routeInstruction.instruction = \"Demi-tour \" + name;\n break;\n case \"L\":\n routeInstruction.instruction = \"Tourner à gauche \" + name;\n break;\n case \"R\":\n routeInstruction.instruction = \"Tourner à droite \" + name;\n break;\n case \"BL\":\n routeInstruction.instruction = \"Tourner très à gauche \" + name;\n break;\n case \"BR\":\n routeInstruction.instruction = \"Tourner très à droite \" + name;\n break;\n case \"FL\":\n routeInstruction.instruction = \"Tourner légèrement à gauche \" + name;\n break;\n case \"FR\":\n routeInstruction.instruction = \"Tourner légèrement à droite \" + name;\n break;\n case \"round_about_entry\":\n routeInstruction.instruction = \"Entrée rond-point \" + name;\n break;\n case \"round_about_exit\":\n routeInstruction.instruction = \"Sortie rond-point \" + name;\n break;\n case null:\n routeInstruction.instruction = \"Prendre \" + name;\n break;\n default:\n routeInstruction.instruction = \"?\" + routeInstruction.code + \"? \" + name;\n break;\n }\n }\n\n if (Array.isArray(response.routeInstructions)) {\n response.routeInstructions.push(routeInstruction);\n }\n }\n\n};\n\n/**\n * Méthode permettant de lancer la lecture d'une réponse XML du service de calcul d'itineraire,\n * à l'aide des readers de la classe.\n *\n * @method RouteResponseRESTReader.read\n * @param {DOMElement} root - racine de la réponse XML à lire\n * @static\n * @memberof RouteResponseRESTReader\n * @returns {DOMElement} response\n */\nRouteResponseRESTReader.read = function (root) {\n var response;\n\n if (root.nodeName === \"routeResult\") {\n response = RouteResponseRESTReader.READERS[\"routeResult\"](root);\n return response;\n } else {\n throw new Error(\"Erreur lors de la lecture de la réponse : elle n'est pas au format attendu.\");\n }\n};\n\n/**\n * Lecture de la valeur du premier child d'un noeud, si elle existe.\n *\n * @private\n * @memberof RouteResponseRESTReader\n * @method __getChildValue\n * @param {DOMElement} node - a DOM node\n * @return {String} value - valeur du firstChild du noeud en entrée, ou chaîne vide.\n */\nfunction __getChildValue (node) {\n var textNode;\n var value = \"\";\n\n if (node.hasChildNodes()) {\n textNode = node.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n value = textNode.nodeValue;\n }\n }\n return value;\n}\n\n/**\n * Récupération des noeuds enfants à partir d'un noeud donné, pour lecture (readNode).\n *\n * @private\n * @memberof RouteResponseRESTReader\n * @method __getChildNodes\n * @param {DOMElement} node - a DOM node\n * @param {Array|Object} [data] - an object to be filled with node data\n */\nfunction __getChildNodes (node, data) {\n if (node.hasChildNodes()) {\n var children = node.childNodes;\n var child;\n var childName;\n\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n\n if (child.nodeType === 1) { // 1 === node.ELEMENT_NODE\n childName = child.localName || child.baseName || child.nodeName;\n\n if (RouteResponseRESTReader.READERS[childName]) {\n var reader = RouteResponseRESTReader.READERS[childName];\n reader(child, data);\n } else {\n __getChildNodes(child, data);\n }\n }\n }\n }\n}\n\nexport default RouteResponseRESTReader;\n" - }, - { - "id": 95, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Formats/RouteResponseOLSReader.js", - "name": "./src/Services/Route/Formats/RouteResponseOLSReader.js", - "index": 94, - "index2": 89, - "size": 3128, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Response/RouteResponseFactory.js", - "issuerId": 93, - "issuerName": "./src/Services/Route/Response/RouteResponseFactory.js", - "profile": { - "factory": 218, - "building": 861, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 93, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Route/Response/RouteResponseFactory.js", - "module": "./src/Services/Route/Response/RouteResponseFactory.js", - "moduleName": "./src/Services/Route/Response/RouteResponseFactory.js", - "type": "harmony import", - "userRequest": "../Formats/RouteResponseOLSReader", - "loc": "15:0-71" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "/**\n * Analyse de la reponse OLS\n *\n * @module RouteResponseOLSReader\n * @alias Gp.Services.Route.Formats.RouteResponseOLSReader\n * @todo not yet implemented !\n * @private\n */\n\nimport Logger from \"../../../Utils/LoggerByDefault\";\n\n/**\n * Objet RouteResponseOLSReader\n * @member {Object} RouteResponseOLSReader\n *\n * @property {Object} RouteResponseOLSReader.READERS - Objet contenant des fonctions de lecture, appelées \"readers\"\n * dont chaque clé correspond au nom d'un tag du XML que l'on souhaite lire\n * et la valeur associée est une fonction (node, data)\n * où node est un noeud du document DOM\n * et data est un objet où l'on stocke les informations lues dans le XML.\n *\n * @property {Method} RouteResponseOLSReader.read - Méthode permettant de lancer la lecture d'une réponse\n * XML du service de calcul d'itineraire, à l'aide des readers de la classe.\n */\nvar RouteResponseOLSReader = {};\n\n/**\n * Objet contenant des fonctions de lecture, appelées \"readers\"\n * dont chaque clé correspond au nom d'un tag du XML que l'on souhaite lire\n * et la valeur associée est une fonction (node, data)\n * où node est un noeud du document DOM\n * et data est un objet où l'on stocke les informations lues dans le XML.\n * @static\n * @memberof RouteResponseOLSReader\n */\nRouteResponseOLSReader.READERS = {\n /*\n // INFO\n // pas de reponse en JSON pour l'API OLS, uniquement du XML !\n\n // INFO\n // Exemple d'erreur du service\n // \n // \n // \n // \n // \n // \n // \n // \n // \n\n // INFO\n // Exemple d'erreur NGinx\n // Resource parameter not found\n */\n};\n\n/**\n * Méthode permettant de lancer la lecture d'une réponse XML du service de calcul d'itineraire,\n * à l'aide des readers de la classe.\n *\n * @method RouteResponseOLSReader.read\n * @param {DOMElement} root - racine de la réponse XML à lire\n * @static\n * @memberof RouteResponseOLSReader\n */\nRouteResponseOLSReader.read = function (root) {\n // logger\n var logger = Logger.getLogger(\"RouteResponseOLSReader\");\n logger.error(\"not yet implemented !\");\n};\n\nexport default RouteResponseOLSReader;\n" - }, - { - "id": 96, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "name": "./src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "index": 95, - "index2": 97, - "size": 10279, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Services.js", - "issuerId": 45, - "issuerName": "./src/Services/Services.js", - "profile": { - "factory": 513, - "building": 339, - "dependencies": 77 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 45, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/Services.js", - "module": "./src/Services/Services.js", - "moduleName": "./src/Services/Services.js", - "type": "harmony import", - "userRequest": "./ProcessIsoCurve/ProcessIsoCurve", - "loc": "15:0-64" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 3, - "source": "\nimport Logger from \"../../Utils/LoggerByDefault\";\nimport _ from \"../../Utils/MessagesResources\";\nimport ErrorService from \"../../Exceptions/ErrorService\";\nimport CommonService from \"../CommonService\";\nimport DefaultUrlService from \"../DefaultUrlService\";\nimport ProcessIsoCurveRequest from \"./Request/ProcessIsoCurveRequest\";\nimport ProcessIsoCurveResponseFactory from \"./Response/ProcessIsoCurveResponseFactory\";\n\n/**\n * @classdesc\n * Appel du service d'isochrone/distance du Géoportail :\n * envoi de la requête construite selon les paramètres en options,\n * éventuellement parsing et analyse de la réponse,\n * retour d'une réponse en paramètre de la fonction onSuccess.\n * @constructor\n * @extends {Gp.Services.CommonService}\n * @alias Gp.Services.ProcessIsoCurve\n * @param {Object} options - options spécifiques au service (+ les options heritées)\n *\n * @param {String} options.outputFormat - Le format de la réponse du service iso : 'xml' ou 'json'.\n * Ce paramètre déterminera l'extension '.xml' ou '.json' du service.\n * Nécessaire si serverUrl est renseigné pour connaître le format dans lequel sera fournie la réponse (pour son traitement).\n * Par défaut, ce paramètre vaut 'json'.\n *\n * @param {Object} options.position - Point de départ du calcul.\n * Coordonnées exprimées en longitudes, latitudes (EPSG:4326)\n * @param {Float} options.position.x - Abcisse du point de départ du calcul d'isochrone/distance.\n * @param {Float} options.position.y - Ordonnée du point de départ du calcul d'isochrone/distance.\n *\n * @param {String} options.srs - Projection.\n * Système de coordonnées dans lequel les coordonnées du point « location » sont exprimées et\n * dans lequel la géométrie de la courbe résultante sera exprimée.\n * Par défaut, le système de coordonnées utilisé sera « EPSG:4326 ».\n *\n * @param {String} [options.graph = \"voiture\"] - Nom du graphe à utiliser pour le calcul (« Pieton » ou « Voiture »).\n * La valeur par défaut est : «voiture»\n *\n * @param {Array.} [options.exclusions] - Critères d'exclusions à appliquer pour le calcul.\n * On précise ici le type de tronçons que l'on ne veut pas que l'isochrone/distance emprunte\n * (valeurs possibles : « toll » (éviter les péages), « bridge », « tunnel »).\n *\n * @param {String} [options.method = \"time\"] - Méthode utilisée pour le calcul de la courbe iso.\n * Les valeurs possible sont \"time\" pour un calcul d'isochrone, \"distance\" pour un calcul d'isodistance.\n * Pas de valeur spécifié équivaut à un calcul d'isochrone.\n *\n * @param {Float} options.time - Durée maximum (exprimée en secondes) à utiliser pour le calcul de la courbe à partir du ou jusqu'au point « location ».\n * Ce paramètre doit être renseigné si l'option \"méthod\" a la valeur \"time\".\n * Si l'option method n'est pas renseignée, ce paramètre doit être renseigné.\n *\n * @param {Float} options.distance - Distance maximum (exprimée en metres) à utiliser pour le calcul de la courbe à partir du ou j'usqu'au point « location ».\n * Ce paramètre doit être renseigné si l'option \"méthod\" a la valeur \"DISTANCE\".\n * Si l'option \"method\" n'est pas renseignée, ce paramètre sera ignoré.\n *\n * @param {Boolean} [options.reverse = false] - Indique si la géométrie résultante doit être lissée (« true ») pour ne pas avoir d'effet d'escalier.\n * Par défaut, la valeur « false » est appliquée.\n *\n * @param {Boolean} [options.smoothing = false] - Indique si la géométrie résultante doit être lissée (« true ») pour ne pas avoir d'effet d'escalier.\n * Par défaut, la valeur « false » est appliquée.\n *\n * @param {Boolean} [options.holes = false] - Indique si la géométrie résultante (surface) doit être retournée avec des trous (« true »).\n * Par défaut, la valeur « false » est appliquée.\n *\n * @example\n * var options = {\n * // options communes aux services\n * apiKey : null,\n * serverUrl : 'http://localhost/service/',\n * protocol : 'JSONP', // JSONP|XHR\n * proxyURL : null,\n * httpMethod : 'GET', // GET|POST\n * timeOut : 10000, // ms\n * rawResponse : false, // true|false\n * scope : null, // this\n * onSuccess : function (response) {},\n * onFailure : function (error) {},\n * // spécifique au service\n * position : {\n * x : 2.3242664298058053,\n * y : 48.86118017324745\n * },\n * distance : 200,\n * [time : ]\n * method : \"distance\",\n * exclusions : [\"Bridge\", \"Tunnel\", \"Toll\"],\n * graph : \"voiture\",\n * reverse : false,\n * smoothing : false,\n * holes : false\n * };\n * @private\n */\n\nfunction ProcessIsoCurve (options) {\n if (!(this instanceof ProcessIsoCurve)) {\n throw new TypeError(_.getMessage(\"CLASS_CONSTRUCTOR\", \"ProcessIsoCurve\"));\n }\n\n /**\n * Nom de la classe (heritage)\n * FIXME instance ou classe ?\n */\n this.CLASSNAME = \"ProcessIsoCurve\";\n\n // appel du constructeur par heritage\n CommonService.apply(this, arguments);\n\n this.logger = Logger.getLogger(\"Gp.Services.ProcessIsoCurve\");\n this.logger.trace(\"[Constructeur ProcessIsoCurve (options)]\");\n\n if (!options.position) {\n throw new Error(_.getMessage(\"PARAM_MISSING\", \"position\"));\n }\n\n // on lance une exception afin d'eviter au service de le faire...\n if (options.position.x === null) {\n throw new Error(_.getMessage(\"PARAM_MISSING\", \"position.x\"));\n }\n\n if (options.position.y === null) {\n throw new Error(_.getMessage(\"PARAM_MISSING\", \"position.y\"));\n }\n\n if (!options.time && !options.distance) {\n throw new Error(\"Parameter (s) 'distance' missing. Parameter time to calculate an isochrone, parameter distance for an isodistance\");\n }\n\n // si on a que le paramètre \"distance\" en entrée, on calcule une isodistance.\n // Le paramètre \"méthode\" doit pour avoir une réponse du service, être passé à \"distance\"\n if (!options.time && options.distance) {\n this.options.method = \"distance\";\n // on supprime l'éventuel attribut time, résidu d'un appel antérieur\n if (this.options.time) {\n delete this.options.time;\n }\n }\n\n // si on a que le paramètre \"time\" en entrée, on calcule une isochrone.\n // Le paramètre \"méthode\" doit pour avoir une réponse du service, être passé à \"time\"\n if (options.time && !options.distance) {\n this.options.method = \"time\";\n // on supprime l'éventuel attribut time, résidu d'un appel antérieur\n if (this.options.distance) {\n delete this.options.distance;\n }\n }\n\n // au cas où on a ni l'un, ni l'autre...\n this.options.method = this.options.method || \"time\";\n\n // options par defaut du service\n this.options.exclusions = options.exclusions || null;\n this.options.graph = options.graph || \"Voiture\"; // TODO test de la valeur à faire !\n this.options.reverse = options.reverse || false;\n this.options.smoothing = options.smoothing || false;\n this.options.holes = options.holes || false;\n this.options.srs = options.srs || \"EPSG:4326\";\n\n // on passe l'option outputFormat en minuscules afin d'éviter des exceptions.\n this.options.outputFormat = (typeof options.outputFormat === \"string\") ? options.outputFormat.toLowerCase() : \"json\";\n\n // gestion de l'url du service par defaut\n // si l'url n'est pas renseignée, il faut utiliser les urls par defaut\n if (!this.options.serverUrl) {\n var lstUrlByDefault = DefaultUrlService.ProcessIsoCurve.url(this.options.apiKey);\n\n var urlFound = lstUrlByDefault[\"iso\" + \"-\" + this.options.outputFormat];\n if (!urlFound) {\n throw new Error(\"Url by default not found !\");\n }\n this.options.serverUrl = urlFound;\n this.logger.trace(\"Serveur URL par defaut : \" + this.options.serverUrl);\n }\n\n // gestion du type de service\n // si l'extension de l'url est .json ou .xml, on surcharge le format de sortie (outputFormat)\n var idx = this.options.serverUrl.lastIndexOf(\".\");\n if (idx !== -1) {\n var extension = this.options.serverUrl.substring(idx + 1);\n if (extension && extension.length < 5) { // FIXME extension de moins de 4 car. ...\n this.logger.trace(\"Serveur Extension URL : \" + extension);\n switch (extension.toLowerCase()) {\n case \"json\":\n case \"xml\":\n this.options.outputFormat = extension.toLowerCase();\n break;\n default:\n throw new Error(\"type of service : unknown or unsupported (json or xml) !\");\n }\n }\n }\n}\n\n/**\n * @lends module:ProcessIsoCurve#\n */\nProcessIsoCurve.prototype = Object.create(CommonService.prototype, {\n // todo\n // getter/setter\n});\n\n/*\n * Constructeur (alias)\n */\nProcessIsoCurve.prototype.constructor = ProcessIsoCurve;\n\n/**\n * Création de la requête (overwrite)\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nProcessIsoCurve.prototype.buildRequest = function (error, success) {\n try {\n var oIsoCurve = new ProcessIsoCurveRequest(this.options);\n if (!oIsoCurve.processRequestString()) {\n throw new Error(_.getMessage(\"SERVICE_REQUEST_BUILD\"));\n }\n\n this.request = oIsoCurve.requestString;\n } catch (e) {\n error.call(this, new ErrorService(e.message));\n return;\n }\n\n success.call(this, this.request);\n};\n\n/**\n * (overwrite)\n * Analyse de la reponse\n *\n * @param {Function} onError - callback des erreurs\n * @param {Function} onSuccess - callback de succès de l'analyse de la réponse\n */\nProcessIsoCurve.prototype.analyzeResponse = function (onError, onSuccess) {\n if (this.response) {\n var options = {\n response : this.response,\n outputFormat : this.options.outputFormat,\n rawResponse : this.options.rawResponse,\n onSuccess : onSuccess,\n onError : onError,\n scope : this\n };\n\n ProcessIsoCurveResponseFactory.build(options);\n } else {\n onError.call(this, new ErrorService(_.getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n }\n};\n\nexport default ProcessIsoCurve;\n" - }, - { - "id": 97, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Request/ProcessIsoCurveRequest.js", - "name": "./src/Services/ProcessIsoCurve/Request/ProcessIsoCurveRequest.js", - "index": 96, - "index2": 93, - "size": 9054, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "issuerId": 96, - "issuerName": "./src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "profile": { - "factory": 82, - "building": 534, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 96, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "module": "./src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "moduleName": "./src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "type": "harmony import", - "userRequest": "./Request/ProcessIsoCurveRequest", - "loc": "7:0-70" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 4, - "source": "\nimport Logger from \"../../../Utils/LoggerByDefault\";\nimport _ from \"../../../Utils/MessagesResources\";\nimport ProcessIsoCurveParam from \"./model/ProcessIsoCurveParam\";\n\n/**\n * @classdesc\n * Classe de gestion des requêtes sur le service de calcul d'isoschrone/isodistance.\n * Les requêtes peuvent être en mode GET ou POST,\n * et le format de sorti est en JSON ou en XML.\n *\n * @constructor\n * @alias Gp.Services.ProcessIsoCurve.Request.ProcessIsoCurveRequest\n * @param {Object} options - options\n *\n * @example\n * var options = {\n * httpMethod : 'GET', // GET|POST\n * // spécifique au service\n * exclusions : ['Bridge', 'Tunnel'],\n * position : {\n * x : 2.3242664298058053,\n * y : 48.86118017324745\n * },\n * graph : \"Voiture\",\n * method : 'time',\n * time : 1000, //distance : 200\n * reverse : false,\n * smoothing : false,\n * holes : false,\n * srs : 'EPSG:4326'\n * };\n *\n * try {\n *\n * var oIsoCurve = new ProcessIsoCurveRequest (options);\n * if (!oIsoCurve.processRequestString ()) {\n * // error\n * }\n *\n * var request = oIsoCurve.requestString;\n *\n * } catch (e) {\n * // error\n * }\n * @private\n */\nfunction ProcessIsoCurveRequest (options) {\n this.logger = Logger.getLogger(\"ProcessIsoCurveRequest\");\n this.logger.trace(\"[Constructeur ProcessIsoCurveRequest ()]\");\n\n if (!(this instanceof ProcessIsoCurveRequest)) {\n throw new TypeError(\"ProcessIsoCurveRequest constructor cannot be called as a function.\");\n }\n\n // existance des options\n if (!options) {\n throw new Error(_.getMessage(\"PARAM_EMPTY\", \"options\"));\n }\n\n /**\n * Liste des options\n */\n this.settings = options;\n\n /**\n * Mode HTPP.\n * Par defaut, \"GET\".\n * @type {String}\n */\n this.mode = this.settings.httpMethod || \"GET\";\n}\n\nProcessIsoCurveRequest.prototype = {\n\n /**\n * @lends module:ProcessIsoCurveRequest#\n */\n\n /**\n * Requête\n * @type {String}\n */\n requestString : null,\n\n /**\n * Constructeur (alias)\n */\n constructor : ProcessIsoCurveRequest,\n\n /**\n * Template de la requête (POST)\n * * __X__ __Y__ __SRS__ __GRAPHNAME__ __METHOD__ (obligatoire)\n * * __REVERSE__ __SMOOTHING__ __HOLES__ (par defaut)\n * * __TIME__ __TIMEVALUE__ (choix)\n * * __DISTANCE__ __DISTANCEVALUE__ (choix)\n * * __EXCLUSIONS__ __EXCLUSIONFEATURE__ __EXCLUSIONVALUE__ (optionnel)\n * * __PROFIL__ __PROFILID__ __PROFILNAME__ (très optionnel)\n * * __ID__ __IDVALUE__ (très optionnel)\n */\n template : {\n container : \"\\n\" +\n \"\\n\" +\n \"__ID__\" +\n \"\\t\\n\" +\n \"\\t\\t__X__\\n\" +\n \"\\t\\t__Y__\\n\" +\n \"\\t\\n\" +\n \"\\t__SRS__\\n\" +\n \"\\t__GRAPHNAME__\\n\" +\n \"__PROFIL__\" +\n \"__EXCLUSIONS__\" +\n \"\\t__METHOD__\\n\" +\n \"__TIME__\" +\n \"__DISTANCE__\" +\n \"\\t__REVERSE__\\n\" +\n \"\\t__SMOOTHING__\\n\" +\n \"\\t__HOLES__\\n\" +\n \"\",\n id : \"\\t__IDVALUE__\\n\",\n profil : \"\\t__PROFILID__\\n\" + \"\\t__PROFILNAME__\\n\",\n exclusions : {\n container : \"\\t\\n\" +\n \"__EXCLUSIONFEATURE__\\n\" +\n \"\\t\\n\",\n feature : \"\\t\\t__EXCLUSIONVALUE__\"\n },\n time : \"\\t\\n\",\n distance : \"\\t__DISTANCEVALUE__\\n\"\n },\n\n /**\n * Construction de la requête.\n *\n * @example\n * // GET out :\n * // (http://wxs.ign.fr/KEY/isochrone/isochrone.json?)\n * // location=&\n * // time=& ou distance=&\n * // method=\"DISTANCE|TIME\"&\n * // graph=Pieton&\n * // graphName=Pieton&\n * // exclusions=&\n * // reverse=10&\n * // smoothing=&\n * // holes=&\n * // srs=\n *\n * // POST out :\n * // \n * // \n * // 1\n * // \n * // -1.557189\n * // 47.217122\n * // \n * // \n * // \n * // \n * // \n * // \n * // \n * // \n * // \n * // \n * // \n * // \n * // \n * // \n * // \n * // \n *\n * @returns {String} request\n */\n processRequestString : function () {\n var request = \"\";\n var i = 0;\n\n switch (this.mode) {\n case \"GET\":\n this.logger.trace(\"Process GET Request\");\n\n // Mapping des options avec le service de l'API REST\n var oParams = new ProcessIsoCurveParam(this.settings);\n var params = oParams.getParams();\n\n for (i = 0; i < params.length; i++) {\n var o = params[i];\n if (request) {\n request += \"&\";\n }\n request += o.k + \"=\" + o.v;\n }\n\n break;\n\n case \"POST\":\n this.logger.trace(\"Process POST Request\");\n\n request = this.template.container;\n\n // options non prises en compte car non implémentées !\n // clean : id\n request = request.replace(/__ID__/g, \"\");\n // clean : profil\n request = request.replace(/__PROFIL__/g, \"\");\n\n // options obligatoires\n request = request.replace(/__X__/g, this.settings.position.x);\n request = request.replace(/__Y__/g, this.settings.position.y);\n request = request.replace(/__GRAPHNAME__/g, this.settings.graph);\n\n // options par defaut\n request = request.replace(/__SRS__/g, this.settings.srs);\n request = request.replace(/__SMOOTHING__/g, this.settings.smoothing);\n request = request.replace(/__HOLES__/g, this.settings.holes);\n request = request.replace(/__REVERSE__/g, this.settings.reverse);\n\n // options conditionnelles\n\n // exclusions\n if (this.settings.exclusions) {\n var tmplExclusions = this.template.exclusions.container;\n var exclusions = [];\n for (i = 0; i < this.settings.exclusions.length; i++) {\n var tmplFeature = this.template.exclusions.feature;\n tmplFeature = tmplFeature.replace(/__EXCLUSIONVALUE__/, this.settings.exclusions[i]);\n exclusions.push(tmplFeature);\n }\n tmplExclusions = tmplExclusions.replace(/__EXCLUSIONFEATURE__/, exclusions.join(\"\\n\"));\n request = request.replace(/__EXCLUSIONS__/g, tmplExclusions);\n }\n // clean exclusions\n request = request.replace(/__EXCLUSIONS__/g, \"\");\n\n // distance\n if (this.settings.distance) {\n var tmplDistance = this.template.distance;\n tmplDistance = tmplDistance.replace(/__DISTANCEVALUE__/g, this.settings.distance);\n request = request.replace(/__DISTANCE__/g, tmplDistance);\n // method\n request = request.replace(/__METHOD__/g, \"distance\");\n }\n // clean\n request = request.replace(/__DISTANCE__/g, \"\");\n\n // time\n if (this.settings.time) {\n var tmplTime = this.template.time;\n tmplTime = tmplTime.replace(/__TIMEVALUE__/g, this.settings.time);\n request = request.replace(/__TIME__/g, tmplTime);\n // method\n request = request.replace(/__METHOD__/g, \"time\");\n }\n // clean\n request = request.replace(/__TIME__/g, \"\");\n break;\n\n default:\n this.logger.error(\"No other HTTP method supported by the service !\");\n }\n\n this.logger.trace(request);\n this.requestString = request;\n\n return this.requestString;\n }\n};\n\nexport default ProcessIsoCurveRequest;\n" - }, - { - "id": 98, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Request/model/ProcessIsoCurveParam.js", - "name": "./src/Services/ProcessIsoCurve/Request/model/ProcessIsoCurveParam.js", - "index": 97, - "index2": 92, - "size": 3921, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Request/ProcessIsoCurveRequest.js", - "issuerId": 97, - "issuerName": "./src/Services/ProcessIsoCurve/Request/ProcessIsoCurveRequest.js", - "profile": { - "factory": 14, - "building": 967, - "dependencies": 1 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 97, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Request/ProcessIsoCurveRequest.js", - "module": "./src/Services/ProcessIsoCurve/Request/ProcessIsoCurveRequest.js", - "moduleName": "./src/Services/ProcessIsoCurve/Request/ProcessIsoCurveRequest.js", - "type": "harmony import", - "userRequest": "./model/ProcessIsoCurveParam", - "loc": "4:0-64" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "\nimport Logger from \"../../../../Utils/LoggerByDefault\";\n\n/**\n * @classdesc\n *\n * Classe de gestion des param. des requêtes du service de calcul des iso.\n * Permet le mapping avec les options du service.\n *\n * @constructor\n * @alias Gp.Services.ProcessIsoCurve.Request.ProcessIsoCurveParam\n * @param {Object} options - options\n * @private\n *\n */\nfunction ProcessIsoCurveParam (options) {\n if (!(this instanceof ProcessIsoCurveParam)) {\n throw new TypeError(\"ProcessIsoCurveParam constructor cannot be called as a function.\");\n }\n\n this.logger = Logger.getLogger();\n this.logger.trace(\"[Constructeur ProcessIsoCurveParam ()]\");\n\n /**\n * Options en paramêtres du constructeur.\n */\n this.options = options || {};\n\n // mapping des options avec l'API REST\n\n /** Identifiant de l’isochrone */\n this.id = this.options.id;\n\n /** Coordonnées de départ (ou arrivée si le reverse est à true). */\n this.location = this.options.position;\n\n /** projection (code EPSG comme epsg:4326 ou wgs84) */\n this.srs = this.options.srs;\n\n /**\n * Profil de véhicule à utiliser pour le calcul.\n * Voiture ou Pieton\n */\n this.graphName = this.options.graph;\n\n /**\n * Identifiant et nom du véhicule\n * FIXME non utilisé\n */\n this.profileId = this.options.profileId || null; // TODO !\n this.profileName = this.options.profileName || null; // TODO !\n\n /** Liste des règles de restrictions à utiliser */\n this.exclusions = this.options.exclusions;\n\n this.reverse = this.options.reverse;\n this.smoothing = this.options.smoothing;\n this.holes = this.options.holes;\n\n /**\n * \"time\" pour isochrone ou \"distance\" for isodistance.\n * Par defaut, time...\n */\n var value = this.options.method;\n switch (value) {\n case \"time\":\n this.method = \"time\";\n this.time = this.options.time;\n break;\n case \"distance\":\n this.method = \"distance\";\n this.distance = this.options.distance;\n break;\n default:\n this.logger.warn(\"Par defaut, on calcule un isochrone !\");\n this.method = \"time\";\n }\n}\n\n/**\n * CLASSNAME\n */\nProcessIsoCurveParam.CLASSNAME = \"ProcessIsoCurveParam\";\n\nProcessIsoCurveParam.prototype = {\n\n /**\n * @lends module:ProcessIsoCurveParam#\n */\n\n /**\n * Constructeur (alias)\n */\n constructor : ProcessIsoCurveParam,\n\n /**\n * Retourne la liste des exclusions\n * @returns {String} x,y\n */\n getLocation : function () {\n return this.location.x + \",\" + this.location.y;\n },\n\n /**\n * Retourne la liste des exclusions\n * @returns {String} exclusions\n */\n getExclusions : function () {\n return this.exclusions.join(\";\");\n }\n};\n\n/**\n * Tableau de clefs/valeurs pour param.\n *\n * @returns {Object[]} KVP\n */\nProcessIsoCurveParam.prototype.getParams = function () {\n var map = [];\n\n map.push({\n k : \"location\",\n v : this.getLocation()\n });\n\n map.push({\n k : \"smoothing\",\n v : this.smoothing\n });\n\n map.push({\n k : \"holes\",\n v : this.holes\n });\n\n map.push({\n k : \"reverse\",\n v : this.reverse\n });\n\n map.push({\n k : \"method\",\n v : this.method\n });\n\n if (this.time) {\n map.push({\n k : \"time\",\n v : this.time\n });\n }\n\n if (this.distance) {\n map.push({\n k : \"distance\",\n v : this.distance\n });\n }\n\n map.push({\n k : \"graphName\",\n v : this.graphName\n });\n\n if (this.exclusions) {\n map.push({\n k : \"exclusions\",\n v : this.getExclusions()\n });\n }\n\n if (this.srs) {\n map.push({\n k : \"srs\",\n v : this.srs\n });\n }\n\n return map;\n};\n\nexport default ProcessIsoCurveParam;\n" - }, - { - "id": 99, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "name": "./src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "index": 98, - "index2": 96, - "size": 7549, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "issuerId": 96, - "issuerName": "./src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "profile": { - "factory": 80, - "building": 378, - "dependencies": 166 - }, - "failed": false, - "errors": 0, - "warnings": 0, - "reasons": [ - { - "moduleId": 96, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "module": "./src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "moduleName": "./src/Services/ProcessIsoCurve/ProcessIsoCurve.js", - "type": "harmony import", - "userRequest": "./Response/ProcessIsoCurveResponseFactory", - "loc": "8:0-87" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 4, - "source": "/**\n * Factory pour générer une reponse JSON à partir d'un XML ou d'un JSON\n * (Factory)\n *\n * @module ProcessIsoCurveResponseFactory\n * @alias Gp.Services.ProcessIsoCurve.Response.ProcessIsoCurveResponseFactory\n * @private\n */\nimport Logger from \"../../../Utils/LoggerByDefault\";\nimport MRes from \"../../../Utils/MessagesResources\";\nimport ErrorService from \"../../../Exceptions/ErrorService\";\nimport XML from \"../../../Formats/XML\";\nimport WKT from \"../../../Formats/WKT\";\nimport ProcessIsoCurveResponseReader from \"../Formats/ProcessIsoCurveResponseReader\";\nimport ProcessIsoCurveResponse from \"./model/ProcessIsoCurveResponse\";\n\nvar ProcessIsoCurveResponseFactory = {\n\n /**\n * interface unique\n *\n * @method build\n * @static\n * @param {Object} options - options definies dans le composant ProcessIsoCurve\n *\n * @example\n * var options = {\n * response :\n * outputFormat :\n * rawResponse :\n * scope :\n * onSuccess :\n * onError :\n * };\n *\n */\n build : function (options) {\n // logger\n var logger = Logger.getLogger(\"ProcessIsoCurveResponseFactory\");\n logger.trace([\"ProcessIsoCurveResponseFactory::build()\"]);\n\n var data = null;\n\n if (options.response) {\n if (options.rawResponse) {\n logger.trace(\"analyze response : raw\");\n data = options.response;\n } else {\n switch (options.outputFormat) {\n case \"xml\":\n logger.trace(\"analyze response : xml\");\n\n try {\n var p = new XML({\n reader : ProcessIsoCurveResponseReader\n });\n\n // FIXME : mode XHR ne retourne que des string ? JSONP aussi à ce niveau ?\n if (typeof options.response === \"string\") {\n p.setXMLString(options.response);\n } else {\n p.setXMLDoc(options.response);\n }\n\n data = p.parse();\n\n if (!data) {\n throw new Error(MRes.getMessage(\"SERVICE_RESPONSE_EXCEPTION_2\"));\n }\n } catch (e) {\n var message = e.message;\n message += \"\\n (raw response service : '\" + options.response + \"')\";\n options.onError.call(options.scope, new ErrorService({\n message : MRes.getMessage(\"SERVICE_RESPONSE_EXCEPTION\", message),\n status : 200,\n type : ErrorService.TYPE_SRVERR\n }));\n return;\n }\n\n break;\n\n case \"json\":\n logger.trace(\"analyze response : json\");\n\n var JSONResponse;\n if (typeof options.response === \"string\") {\n JSONResponse = JSON.parse(options.response);\n } else {\n JSONResponse = options.response;\n }\n\n // analyse de la reponse\n if (JSONResponse.status === \"OK\" || JSONResponse.status === \"ok\") {\n // création de l'objet de réponse\n data = new ProcessIsoCurveResponse();\n\n // remplissage de l'objet créé avec les attribtuts de la réponse du service\n if (data) {\n data.time = JSONResponse.time;\n data.distance = JSONResponse.distance;\n data.message = JSONResponse.message;\n data.id = JSONResponse.id;\n data.srs = JSONResponse.srs;\n // callback de la reponse\n var onWKTSuccess = function (json) {\n data.geometry = json;\n };\n // callback d'erreur\n var onWKTError = function () {\n options.onError.call(options.scope, new ErrorService({\n message : MRes.getMessage(\"PARAM_FORMAT\", \"wktGeometry\")\n }));\n };\n if (data.hasOwnProperty(\"geometry\")) {\n WKT.toJson(JSONResponse.wktGeometry, onWKTSuccess, onWKTError);\n if (!data.geometry) {\n return;\n }\n }\n var coords = JSONResponse.location.split(\",\");\n if (data.location) {\n data.location.x = coords[0];\n data.location.y = coords[1];\n }\n } else {\n options.onError.call(options.scope, new ErrorService(MRes.getMessage(\"SERVICE_RESPONSE_ANALYSE\", options.response)));\n return;\n }\n } else if (JSONResponse.status === \"ERROR\" || JSONResponse.status === \"error\") {\n // JSHint bug if var message is used !?\n var mess = JSONResponse.message;\n mess += \"\\n (raw response service : '\" + JSONResponse + \"')\";\n options.onError.call(options.scope, new ErrorService(MRes.getMessage(\"SERVICE_RESPONSE_EXCEPTION\", mess)));\n return;\n }\n break;\n\n default:\n options.onError.call(options.scope, new ErrorService(MRes.getMessage(\"SERVICE_RESPONSE_FORMAT\", \"json\", \"xml\")));\n return;\n }\n\n // info : en cas de problèmes de droits (clé invalide ou autre), la réponse est au format XML !!\n // ex. Key does not exist or has expired\n // mais le statut est 403, l'erreur est donc remontée plus tôt.\n if (data && data.exceptionReport) {\n options.onError.call(options.scope, new ErrorService({\n message : MRes.getMessage(\"SERVICE_RESPONSE_EXCEPTION\", data.exceptionReport),\n type : ErrorService.TYPE_SRVERR,\n status : 200\n }));\n return;\n }\n }\n } else {\n // si la réponse est vide, on appelle le callback d'erreur\n options.onError.call(options.scope, new ErrorService(MRes.getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n return;\n }\n\n // si tout s'est bien passé, on appelle le callback de succès\n options.onSuccess.call(options.scope, data);\n }\n};\n\nexport default ProcessIsoCurveResponseFactory;\n" - }, - { - "id": 100, - "identifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Formats/ProcessIsoCurveResponseReader.js", - "name": "./src/Services/ProcessIsoCurve/Formats/ProcessIsoCurveResponseReader.js", - "index": 99, - "index2": 95, - "size": 9051, - "cacheable": true, - "built": true, - "optional": false, - "prefetched": false, - "chunks": [ - 0 - ], - "assets": [], - "issuer": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "issuerId": 99, - "issuerName": "./src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "profile": { - "factory": 170, - "building": 912, - "dependencies": 2 - }, - "failed": false, - "errors": 0, - "warnings": 1, - "reasons": [ - { - "moduleId": 99, - "moduleIdentifier": "/home/jpbazonnais/Projets/geoportal-access-lib/node_modules/eslint-loader/index.js??ref--0-0!/home/jpbazonnais/Projets/geoportal-access-lib/src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "module": "./src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "moduleName": "./src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js", - "type": "harmony import", - "userRequest": "../Formats/ProcessIsoCurveResponseReader", - "loc": "14:0-85" - } - ], - "usedExports": [ - "default" - ], - "providedExports": [ - "default" - ], - "optimizationBailout": [], - "depth": 5, - "source": "/**\n * Analyse de la reponse XML\n *\n * @module ProcessIsoCurveResponseReader\n * @alias Gp.Services.ProcessIsoCurve.Formats.ProcessIsoCurveResponseReader\n * @todo not yet implemented !\n * @private\n */\n\nimport MessagesResources from \"../../../Utils/MessagesResources\";\nimport WKT from \"../../../Formats/WKT\";\nimport ErrSrv from \"../../../Exceptions/ErrorService\";\nimport ProcessIsoCurveResponse from \"../Response/model/ProcessIsoCurveResponse\";\n\n/**\n * Objet ProcessIsoCurveResponseReader\n *\n * @member {Object} ProcessIsoCurveResponseReader\n *\n * @property {Object} ProcessIsoCurveResponseReader.READERS - Objet contenant des fonctions de lecture, appelées \"readers\"\n * dont chaque clé correspond au nom d'un tag du XML que l'on souhaite lire\n * et la valeur associée est une fonction (node, data)\n * où node est un noeud du document DOM\n * et data est un objet où l'on stocke les informations lues dans le XML.\n *\n * @property {Method} ProcessIsoCurveResponseReader.read - Méthode permettant de lancer la lecture d'une réponse XML\n * du service de calcul isochrone/isodistance, à l'aide des readers de la classe.\n *\n */\n\nvar ProcessIsoCurveResponseReader = {};\n\n/*\n // INFO\n // Exemple d'erreur du service\n // \n // \n // Location point must have 2 components separated with a ,\n // ERROR\n // \n\n // \n // \n // ServiceException : Error in isochron computation Error in smartrouting null\n // ERROR\n // \n\n // INFO\n // Exemple d'erreur NGinx\n // Resource parameter not found\n*/\n\n/*\n // INFO\n // Exemple de réponse du service\n\n // \n // OK\n // \n // -1.557189,47.217122\n // \n // 5000\n // POLYGON ((-1.545312 47.178178, -1.545312 47.180418, ...))\n // \n\n // \n // OK\n // 1\n // -1.557189,47.217122\n // \n // \n // POLYGON ((-1.556864 47.216487, -1.556864 47.216948, ...))\n // \n*/\n\nProcessIsoCurveResponseReader.READERS = {\n\n /** TODO : jsdoc block */\n isochronResult : function (root) {\n // racine de la réponse XML : on crée l'objet de réponse\n var response = new ProcessIsoCurveResponse();\n\n if (root.hasChildNodes()) {\n var children = root.childNodes;\n var child;\n\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n\n if (ProcessIsoCurveResponseReader.READERS[child.nodeName]) {\n ProcessIsoCurveResponseReader.READERS[child.nodeName](child, response);\n }\n }\n }\n\n if (response.status === \"error\") {\n var message = MessagesResources.getMessage(\"SERVICE_RESPONSE_EXCEPTION\",\n response.message);\n throw new ErrSrv({\n message : message,\n type : ErrSrv.TYPE_SRVERR\n });\n }\n return response;\n },\n\n /** TODO : jsdoc block */\n message : function (node, response) {\n if (response) {\n response.message = __getChildValue(node);\n }\n },\n\n /** TODO : jsdoc block */\n status : function (node, response) {\n var status = __getChildValue(node);\n if (status === \"ERROR\" || status === \"error\") {\n if (response) {\n response.status = \"error\";\n }\n }\n },\n\n /** TODO : jsdoc block */\n id : function (node, response) {\n if (response) {\n response.id = __getChildValue(node);\n }\n },\n\n /** TODO : jsdoc block */\n location : function (node, response) {\n var coords = __getChildValue(node);\n if (response && response.location) {\n response.location.x = parseFloat(coords.split(\",\")[0]);\n response.location.y = parseFloat(coords.split(\",\")[1]);\n }\n },\n\n /** TODO : jsdoc block */\n srs : function (node, response) {\n if (response) {\n response.srs = __getChildValue(node);\n }\n },\n\n /** TODO : jsdoc block */\n distance : function (node, response) {\n if (response) {\n response.distance = parseFloat(__getChildValue(node));\n }\n },\n\n /** TODO : jsdoc block */\n time : function (node, response) {\n if (response) {\n response.time = parseFloat(__getChildValue(node));\n }\n },\n\n /** TODO : jsdoc block */\n wktGeometry : function (node, response) {\n if (response) {\n var wktGeometry = node.innerHTML;\n /** TODO : jsdoc block */\n var onWKTSuccess = function (json) {\n response.geometry = json;\n };\n /** TODO : jsdoc block */\n var onWKTError = function () {\n var msg = MessagesResources.getMessage(\"PARAM_FORMAT\", [\"wktGeometry\"]);\n throw new Error(msg);\n };\n if (response.hasOwnProperty(\"geometry\")) {\n WKT.toJson(wktGeometry, onWKTSuccess, onWKTError);\n }\n }\n },\n\n /** TODO : jsdoc block */\n serviceResult : function (node) {\n // en cas d'exception du service\n var response = {};\n if (node.hasChildNodes()) {\n var children = node.childNodes;\n var child;\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n if (ProcessIsoCurveResponseReader.READERS[child.nodeName]) {\n ProcessIsoCurveResponseReader.READERS[child.nodeName](child, response);\n }\n }\n }\n return response;\n },\n\n /** TODO : jsdoc block */\n ExceptionReport : function (node) {\n var response = {};\n if (node.hasChildNodes()) {\n var children = node.childNodes;\n var child;\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n if (child.nodeName === \"Exception\") {\n response.exceptionReport = ProcessIsoCurveResponseReader.READERS[\"Exception\"](child);\n }\n }\n }\n return response;\n },\n\n /** TODO : jsdoc block */\n Exception : function (node) {\n var exceptionReport = {};\n\n // get exception code\n var exceptionCode = node.getAttribute(\"exceptionCode\");\n if (exceptionCode) {\n exceptionReport.exceptionCode = exceptionCode;\n }\n\n // get exception message\n var textNode = node.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n exceptionReport.exception = textNode.nodeValue;\n }\n\n return exceptionReport;\n }\n};\n\n/** TODO : jsdoc block */\nProcessIsoCurveResponseReader.read = function (root) {\n var response;\n\n if (root.nodeName === \"isochronResult\" || root.nodeName === \"isochroneResult\" || root.nodeName === \"IsochroneResult\") {\n response = ProcessIsoCurveResponseReader.READERS[\"isochronResult\"](root);\n return response;\n } else if (root.nodeName === \"ExceptionReport\") {\n response = ProcessIsoCurveResponseReader.READERS[root.nodeName](root);\n return response;\n } else if (ProcessIsoCurveResponseReader.READERS[root.nodeName]) {\n response = ProcessIsoCurveResponseReader.READERS[root.nodeName](root);\n if (response.status === \"error\") {\n var errMsg = MessagesResources.getMessage(\"SERVICE_RESPONSE_EXCEPTION\",\n response.message);\n throw new ErrSrv({\n message : errMsg,\n type : ErrSrv.TYPE_SRVERR\n });\n }\n return response;\n } else {\n throw new ErrSrv({\n message : MessagesResources.getMessage(\"SERVICE_RESPONSE_ANALYSE\", root.nodeName),\n type : ErrSrv.TYPE_UNKERR\n });\n }\n};\n\n/**\n * Lecture de la valeur du premier child d'un noeud, si elle existe.\n *\n * @private\n * @memberof ProcessIsoCurveResponseReader\n * @method __getChildValue\n * @param {DOMElement} node - a DOM node\n * @return {String} value - valeur du firstChild du noeud en entrée, ou chaîne vide.\n */\nfunction __getChildValue (node) {\n var textNode;\n var value = \"\";\n\n if (node.hasChildNodes()) {\n textNode = node.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n value = textNode.nodeValue;\n }\n }\n return value;\n}\n\nexport default ProcessIsoCurveResponseReader;\n" - } - ], - "filteredModules": 0, - "children": [] -} From 8f92e662691383eb83abf6c997c00d111ea650ec Mon Sep 17 00:00:00 2001 From: "jean-philippe.bazonnais" Date: Mon, 6 Mar 2023 11:50:16 +0100 Subject: [PATCH 2/5] =?UTF-8?q?Mise=20=C3=A0=20jour=20du=20README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index f7a6d2de..5142bb80 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ [![GitHub release](https://img.shields.io/github/release/IGNF/geoportal-access-lib.svg)](https://github.com/IGNF/geoportal-access-lib) [![DeepScan grade](https://deepscan.io/api/teams/12425/projects/15468/branches/309615/badge/grade.svg)](https://deepscan.io/dashboard#view=project&tid=12425&pid=15468&bid=309615) + + La bibliothèque d’accès aux ressources de la plateforme Géoportail est une bibliothèque de fonctions javascript permettant d'accéder aux ressources délivrées par les services web du Géoportail. Elle permet plus particulièrement d'effectuer les opérations suivantes utilisant les données de l'IGN : @@ -22,23 +24,23 @@ Elle permet plus particulièrement d'effectuer les opérations suivantes utilisa * [Obtenir des informations relatives à un contrat d'accès au Géoportail](#getConfig) - ## Mise en oeuvre Vous pouvez récupérer la bibliothèque d'accès soit en la [téléchargeant directement](#t%C3%A9l%C3%A9chargement-direct), soit en utilisant le [gestionnaire de dépendances javascript NPM](#r%C3%A9cup%C3%A9ration-avec-npm). +Une documentation technique (jsdoc) et un testeur sont disponibles [ici](https://ignf.github.io/geoportal-access-lib/). + ### Téléchargement direct Vous pouvez récupérer ici la version compilée et autonome de la bibliothèque d'accès : [GpServices.js](https://github.com/IGNF/geoportal-access-lib/releases/latest), dans la partie "Downloads". - ### Récupération avec NPM La bibliothèque d'accès est aussi disponible dans les dépôts [NPM](https://www.npmjs.com/package/geoportal-access-lib). Prérequis : [NodeJS](https://nodejs.org/en/) et [npm](https://www.npmjs.com/) installés. -``` +``` bash npm install geoportal-access-lib ``` @@ -115,11 +117,11 @@ Dans un environnement **Front-End**, il faut installer les 2 dépendances suivan - xmldom - request -### Utilisation - -Le chargement de la bibliothèque d'accès vous donne accès au namespace [Gp.Services](http://ignf.github.io/geoportal-access-lib/latest/jsdoc/module-Services.html) à partir duquel vous pouvez utiliser les différentes fonctions proposées. +

(back to top)

+## Utilisation +Le chargement de la bibliothèque d'accès vous donne accès au namespace [Gp.Services](http://ignf.github.io/geoportal-access-lib/latest/jsdoc/module-Services.html) à partir duquel vous pouvez utiliser les différentes fonctions proposées. @@ -155,6 +157,7 @@ Gp.Services.geocode({ **Exemple d'utilisation** [![jsFiddle](http://jsfiddle.net/img/embeddable/logo-dark.png)](http://jsfiddle.net/ignfgeoportail/saye4oaz/embedded/result,js,html,css/) +

(back to top)

@@ -190,6 +193,7 @@ Gp.Services.autoComplete({ **Exemple d'utilisation** [![jsFiddle](http://jsfiddle.net/img/embeddable/logo-dark.png)](http://jsfiddle.net/ignfgeoportail/jsjqk4wq/embedded/result,js,html,css/) +

(back to top)

@@ -228,6 +232,7 @@ Gp.Services.reverseGeocode({ **Exemple d'utilisation** [![jsFiddle](http://jsfiddle.net/img/embeddable/logo-dark.png)](http://jsfiddle.net/ignfgeoportail/4t0wfey5/embedded/result,js,html,css/) +

(back to top)

@@ -264,6 +269,7 @@ Gp.Services.getAltitude({ **Exemple d'utilisation** [![jsFiddle](http://jsfiddle.net/img/embeddable/logo-dark.png)](http://jsfiddle.net/ignfgeoportail/owxffaf3/embedded/result,js,html,css/) +

(back to top)

@@ -301,6 +307,7 @@ Gp.Services.route({ **Exemple d'utilisation** [![jsFiddle](http://jsfiddle.net/img/embeddable/logo-dark.png)](http://jsfiddle.net/ignfgeoportail/prvrjd93/embedded/result,js,html,css/) +

(back to top)

@@ -339,6 +346,7 @@ Gp.Services.isoCurve({ **Exemple d'utilisation** [![jsFiddle](http://jsfiddle.net/img/embeddable/logo-dark.png)](http://jsfiddle.net/ignfgeoportail/x1hcak86/embedded/result,js,html,css/) +

(back to top)

@@ -364,3 +372,5 @@ Gp.Services.getConfig({ ``` **Exemple d'utilisation** [![jsFiddle](http://jsfiddle.net/img/embeddable/logo-dark.png)](http://jsfiddle.net/ignfgeoportail/0hsanbv2/embedded/result,js,html,css/) + +

(back to top)

From 5e3148234890599c088bb64a968d41c59bf044fc Mon Sep 17 00:00:00 2001 From: Giovanni Rosa Date: Fri, 14 Apr 2023 13:08:09 +0200 Subject: [PATCH 3/5] Fix for Dockerfile smell DL3025 Signed-off-by: Giovanni Rosa --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index d7c87e8d..68dea931 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -20,4 +20,4 @@ VOLUME ["/home/docker/html/geoportal-access-lib"] WORKDIR /home/docker/geoportal-access-lib -CMD bash /home/docker/start.sh +CMD ["bash", "/home/docker/start.sh"] From c9964c2cbe88fcf49160f6769ed0e4723a4a2e1f Mon Sep 17 00:00:00 2001 From: elias couppe Date: Fri, 12 May 2023 17:21:29 +0200 Subject: [PATCH 4/5] update(changelog): update of DRAFT_CHANGELOG --- DRAFT_CHANGELOG.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/DRAFT_CHANGELOG.md b/DRAFT_CHANGELOG.md index 78f9bca7..5bf1185f 100644 --- a/DRAFT_CHANGELOG.md +++ b/DRAFT_CHANGELOG.md @@ -1,12 +1,12 @@ -# Bibliothèque d'accès aux services Géoportail, version 3.2.1 +# Bibliothèque d'accès aux services Géoportail, version 3.2.2 -**17/01/2023 : 3.2.1** +**12/05/2023 : 3.2.2** > release of geoportal access library ## Summary -Mise à jour pour fix sur geocodage +Minor fixes on documentation and dockerfile ## Changelog @@ -14,12 +14,13 @@ Mise à jour pour fix sur geocodage * [Changed] - - le paramètre searchGeom est rendu facultatif (#81) - * [Removed] * [Fixed] + - documentation (#82) + - dockerfile best practice violation (#84) + * [Deprecated] * [Security] From 61feb6eec15669dab9028642647682883d8b9239 Mon Sep 17 00:00:00 2001 From: elias couppe Date: Fri, 12 May 2023 17:28:00 +0200 Subject: [PATCH 5/5] Release 3.2.2 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0deb79e6..b3320290 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "geoportal-access-lib", - "version": "3.2.1", - "date": "17/01/2022", + "version": "3.2.2", + "date": "12/05/2022", "description": "French Geoportal resources access library", "module": "src/Gp.js", "main": "dist/GpServices-src.js",