diff --git a/Logic/FeatureSource/OsmApiFeatureSource.ts b/Logic/FeatureSource/OsmApiFeatureSource.ts index 13d2e4d82f..6b01a6755c 100644 --- a/Logic/FeatureSource/OsmApiFeatureSource.ts +++ b/Logic/FeatureSource/OsmApiFeatureSource.ts @@ -22,6 +22,10 @@ export default class OsmApiFeatureSource implements FeatureSource { public load(id: string) { + if(id.indexOf("-") >= 0){ + // Newly added point - not yet in OSM + return; + } OsmObject.DownloadObject(id, (element, meta) => { const geojson = element.asGeoJson(); geojson.id = geojson.properties.id; diff --git a/Logic/Osm/OsmObject.ts b/Logic/Osm/OsmObject.ts index 5de7fd5915..613d5e6e98 100644 --- a/Logic/Osm/OsmObject.ts +++ b/Logic/Osm/OsmObject.ts @@ -149,6 +149,9 @@ export abstract class OsmObject { TagsXML(): string { let tags = ""; for (const key in this.tags) { + if(key.startsWith("_")){ + continue; + } const v = this.tags[key]; if (v !== "") { tags += ' \n' diff --git a/Models/Constants.ts b/Models/Constants.ts index f1e8195c1a..66d4261364 100644 --- a/Models/Constants.ts +++ b/Models/Constants.ts @@ -2,7 +2,7 @@ import { Utils } from "../Utils"; export default class Constants { - public static vNumber = "0.7.1b"; + public static vNumber = "0.7.1c"; // The user journey states thresholds when a new feature gets unlocked public static userJourney = { diff --git a/Utils.ts b/Utils.ts index 19a70b7b69..b9cdb333e6 100644 --- a/Utils.ts +++ b/Utils.ts @@ -1,4 +1,5 @@ import * as $ from "jquery" +import {type} from "os"; export class Utils { @@ -14,6 +15,10 @@ export class Utils { private static extraKeys = ["nl", "en", "fr", "de", "pt", "es", "name", "phone", "email", "amenity", "leisure", "highway", "building", "yes", "no", "true", "false"] static EncodeXmlValue(str) { + if(typeof str !== "string"){ + str = ""+str + } + return str.replace(/&/g, '&') .replace(//g, '>')