forked from MapComplete/MapComplete
Add friendly confirm message on newly created points
This commit is contained in:
parent
5c28ce2995
commit
ccf3bb3993
6 changed files with 63 additions and 30 deletions
|
@ -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() {}
|
||||
|
|
|
@ -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>"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue