@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.js
CHANGED
|
@@ -3263,7 +3263,10 @@ class GeoveloRemoteRouter extends RemoteRouter {
|
|
|
3263
3263
|
}
|
|
3264
3264
|
const res = await fetch(url, {
|
|
3265
3265
|
method: "POST",
|
|
3266
|
-
headers: {
|
|
3266
|
+
headers: {
|
|
3267
|
+
apiKey: apiKey$1,
|
|
3268
|
+
"Content-Type": "application/json"
|
|
3269
|
+
},
|
|
3267
3270
|
body: JSON.stringify(bodyParams)
|
|
3268
3271
|
}).catch(() => {
|
|
3269
3272
|
throw RemoteRoutingError.unreachableServer(this.rname, url.toString());
|
|
@@ -4303,7 +4306,6 @@ class CustomGraphMap {
|
|
|
4303
4306
|
}
|
|
4304
4307
|
static fromOsmXml(osmXmlString, name = null, callbackErrors) {
|
|
4305
4308
|
const errors = {
|
|
4306
|
-
couldNotParseFile: false,
|
|
4307
4309
|
routingIoNotFound: [],
|
|
4308
4310
|
routingBoundsNotFound: false
|
|
4309
4311
|
};
|
|
@@ -4311,7 +4313,7 @@ class CustomGraphMap {
|
|
|
4311
4313
|
try {
|
|
4312
4314
|
osmModel = osm.OsmParser.parseOsmXmlString(osmXmlString);
|
|
4313
4315
|
} catch (e) {
|
|
4314
|
-
errors.couldNotParseFile =
|
|
4316
|
+
errors.couldNotParseFile = e instanceof Error ? e.message : "Unknown error";
|
|
4315
4317
|
callbackErrors == null ? void 0 : callbackErrors(errors);
|
|
4316
4318
|
return;
|
|
4317
4319
|
}
|
|
@@ -4432,7 +4434,8 @@ class CustomGraphMapTester {
|
|
|
4432
4434
|
const errors = [];
|
|
4433
4435
|
if ((customGraphMapErrors == null ? void 0 : customGraphMapErrors.couldNotParseFile) || !customGraphMap) {
|
|
4434
4436
|
errors.push({
|
|
4435
|
-
type: "could-not-parse-file"
|
|
4437
|
+
type: "could-not-parse-file",
|
|
4438
|
+
details: customGraphMapErrors == null ? void 0 : customGraphMapErrors.couldNotParseFile
|
|
4436
4439
|
});
|
|
4437
4440
|
return { errors };
|
|
4438
4441
|
}
|