@wemap/routers 12.8.7 → 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
CHANGED
|
@@ -4306,7 +4306,6 @@ class CustomGraphMap {
|
|
|
4306
4306
|
}
|
|
4307
4307
|
static fromOsmXml(osmXmlString, name = null, callbackErrors) {
|
|
4308
4308
|
const errors = {
|
|
4309
|
-
couldNotParseFile: false,
|
|
4310
4309
|
routingIoNotFound: [],
|
|
4311
4310
|
routingBoundsNotFound: false
|
|
4312
4311
|
};
|
|
@@ -4314,7 +4313,7 @@ class CustomGraphMap {
|
|
|
4314
4313
|
try {
|
|
4315
4314
|
osmModel = osm.OsmParser.parseOsmXmlString(osmXmlString);
|
|
4316
4315
|
} catch (e) {
|
|
4317
|
-
errors.couldNotParseFile =
|
|
4316
|
+
errors.couldNotParseFile = e instanceof Error ? e.message : "Unknown error";
|
|
4318
4317
|
callbackErrors == null ? void 0 : callbackErrors(errors);
|
|
4319
4318
|
return;
|
|
4320
4319
|
}
|
|
@@ -4435,7 +4434,8 @@ class CustomGraphMapTester {
|
|
|
4435
4434
|
const errors = [];
|
|
4436
4435
|
if ((customGraphMapErrors == null ? void 0 : customGraphMapErrors.couldNotParseFile) || !customGraphMap) {
|
|
4437
4436
|
errors.push({
|
|
4438
|
-
type: "could-not-parse-file"
|
|
4437
|
+
type: "could-not-parse-file",
|
|
4438
|
+
details: customGraphMapErrors == null ? void 0 : customGraphMapErrors.couldNotParseFile
|
|
4439
4439
|
});
|
|
4440
4440
|
return { errors };
|
|
4441
4441
|
}
|