Mixin ChangesetMixin

This mixin is auto-loaded by the scripting plugin and mixed into the native java class Changeset.

This mixin provides additional properties and methods for the native Java class Changeset, whose native public methods are available for scripting, too. If a native method name is hidden by a property name in the mixin, then prefix the native name with $.

Properties

bounds:Bounds

Get the bounding box the bounding box.

get:
Replies a Bounds or undefined, if the bounding box isn't known.

closedAt:Date

Set or get the date this changeset was closed.

get:
Replies a utilDate or undefined, if the date isn't known.
set:
Assign null or undefined to clear the date. Assign a Date to set the date. Note, that you can't assign a javascript Date object.

createdAt:Date

Set or get the date this changeset was created.

get:
Replies a utilDate or undefined, if the date isn't known.
set:
Assign null or undefined to clear the date. Assign a Date to set the date. Note, that you can't assign a javascript Date object.

id:number

Replies the unique numeric id.

isOpen:boolean | Aliases: open

Get or set whether this changeset is open.

max:LatLon

Set or get the coordinates of the upper right corner of the bounding box.

get:
Replies a LatLon or undefined, if max isn't known.
set:
Assign null or undefined to clear the coordinates. Assign a LatLon or an object {lat:number, lon: number} to set the coordinates.

min:LatLon

Set or get the coordinates of the lower left corner of the bounding box.

get:
Replies a LatLon or undefined, if min isn't known.
set:
Assign null or undefined to clear the coordinates. Assign a LatLon or an object {lat:number, lon: number} to set the coordinates.

tags:object

Get or set the tags of the changeset.

get: - replies the tags as javascript object.

set:

  • assign null or undefined to remove all tags
  • assign an object to set its properties as tags.
  • assign an java.util.Map to set its elements as tags

null values and undefined tag values aren't assigned. tag keys are normalized, i.e. leading and trailing white space is removed. Both, tag keys and tag values, are converted to strings.

var cs = .... // create a changeset

// set the tags using a javascript object
cs.tags = {amenity:"restaurant", name:"Obstberg"}; 
cs.tags.amenity;  // -> restaurant
cs.tags.name;     // -> Obstberg

// remove all tags 
cs.tags = null;

// set tags using a java map 
var tags = new java.util.HashMap();
tags.put("amenity", "restaurant");
tags.put("name", "Obstberg");
cs.tags = tags; 
Name Description
Properties
bounds Get the bounding box the bounding box.
closedAt Set or get the date this changeset was closed.
createdAt Set or get the date this changeset was created.
id Replies the unique numeric id.
isOpen, open Get or set whether this changeset is open.
max Get or set the coordinates of the upper right corner
min Get or set the coordinates of the lower left corner
tags Get or set the tags.