@wemap/routers 12.8.6 → 12.8.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/remote/geovelo/GeoveloRemoteRouter.ts +4 -1
- package/src/wemap-multi/CustomGraphMap.ts +2 -3
- package/src/wemap-multi/CustomGraphMapTester.ts +4 -2
package/dist/index.mjs
CHANGED
|
@@ -3261,7 +3261,10 @@ class GeoveloRemoteRouter extends RemoteRouter {
|
|
|
3261
3261
|
}
|
|
3262
3262
|
const res = await fetch(url, {
|
|
3263
3263
|
method: "POST",
|
|
3264
|
-
headers: {
|
|
3264
|
+
headers: {
|
|
3265
|
+
apiKey: apiKey$1,
|
|
3266
|
+
"Content-Type": "application/json"
|
|
3267
|
+
},
|
|
3265
3268
|
body: JSON.stringify(bodyParams)
|
|
3266
3269
|
}).catch(() => {
|
|
3267
3270
|
throw RemoteRoutingError.unreachableServer(this.rname, url.toString());
|
|
@@ -4301,7 +4304,6 @@ class CustomGraphMap {
|
|
|
4301
4304
|
}
|
|
4302
4305
|
static fromOsmXml(osmXmlString, name = null, callbackErrors) {
|
|
4303
4306
|
const errors = {
|
|
4304
|
-
couldNotParseFile: false,
|
|
4305
4307
|
routingIoNotFound: [],
|
|
4306
4308
|
routingBoundsNotFound: false
|
|
4307
4309
|
};
|
|
@@ -4309,7 +4311,7 @@ class CustomGraphMap {
|
|
|
4309
4311
|
try {
|
|
4310
4312
|
osmModel = OsmParser.parseOsmXmlString(osmXmlString);
|
|
4311
4313
|
} catch (e) {
|
|
4312
|
-
errors.couldNotParseFile =
|
|
4314
|
+
errors.couldNotParseFile = e instanceof Error ? e.message : "Unknown error";
|
|
4313
4315
|
callbackErrors == null ? void 0 : callbackErrors(errors);
|
|
4314
4316
|
return;
|
|
4315
4317
|
}
|
|
@@ -4430,7 +4432,8 @@ class CustomGraphMapTester {
|
|
|
4430
4432
|
const errors = [];
|
|
4431
4433
|
if ((customGraphMapErrors == null ? void 0 : customGraphMapErrors.couldNotParseFile) || !customGraphMap) {
|
|
4432
4434
|
errors.push({
|
|
4433
|
-
type: "could-not-parse-file"
|
|
4435
|
+
type: "could-not-parse-file",
|
|
4436
|
+
details: customGraphMapErrors == null ? void 0 : customGraphMapErrors.couldNotParseFile
|
|
4434
4437
|
});
|
|
4435
4438
|
return { errors };
|
|
4436
4439
|
}
|