Add friendly confirm message on newly created points

This commit is contained in:
Pieter Vander Vennet 2022-11-07 23:12:31 +01:00
parent 5c28ce2995
commit ccf3bb3993
6 changed files with 63 additions and 30 deletions

View file

@ -3,9 +3,11 @@
*/
import { UIEventSource } from "./UIEventSource"
import { GeoJSONObject } from "@turf/turf"
import {Feature, Point} from "geojson";
import {OsmTags} from "../Models/OsmFeature";
export class ElementStorage {
public ContainingFeatures = new Map<string, any>()
public ContainingFeatures = new Map<string, Feature<Point, OsmTags >>()
private _elements = new Map<string, UIEventSource<any>>()
constructor() {}

View file

@ -4,6 +4,7 @@ import { TagsFilter } from "./TagsFilter"
export class Tag extends TagsFilter {
public key: string
public value: string
public static newlyCreated = new Tag("_newly_created","yes") ;
constructor(key: string, value: string) {
super()
this.key = key
@ -63,7 +64,7 @@ export class Tag extends TagsFilter {
}
/**
const t = new Tag("key", "value")
t.asHumanString() // => "key=value"
t.asHumanString(true) // => "<a href='https://wiki.openstreetmap.org/wiki/Key:key' target='_blank'>key</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:key%3Dvalue' target='_blank'>value</a>"