dsbuildId(id, type)node, way, or
relation, or one of the symbols
OsmPrimitiveType.NODE,
OsmPrimitiveType.WAY, or
OsmPrimitiveType.RELATION.buildId(id)id is either an instance
of
PrimitiveId or an object with
the properties id and type, i.e.
{id: 1234, type: 'node'}.| Name | Type | Description |
|---|---|---|
args |
see description |
import { buildId, OsmPrimitiveType} from 'josm/ds'
// build a node id
const id1 = buildId(1234, 'node')
// build a way id
const id2 = buildId(3333, OsmPrimitiveType.WAY)
// build a relation id
const id3 = buildId({id: 5423, type: 'relation'})