This mixin is auto-loaded by the scripting plugin and mixed into the
native java class Node. It
provides additional properties and methods which you can invoke on an instance of
Node.
This mixin extends the mixin OsmPrimitiveMixin.
Properties and methods of the parent mixin are available for scripting, too.
This mixin provides additional properties and methods for the native Java class
Node, 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
east:number
Get the projected east coordinate, or undefined, if the projected east coordinate isn't known.
varnb=require("josm/builder").NodeBuilder;// set members varn=nb.create();n.east;
lat:number
Get or set the node latitude.
get
Replies the current latitude, or undefined, if the latitude isn't known.
set
Assign the latitude. Expects a number in the range [-90,90]. Raises an error,
if the node is a proxy node.
varnb=require("josm/builder").NodeBuilder;// set members varn=nb.create();n.lat=23.245;n.lat;// -> 23.245
lon:number
Get or set the node longitude.
get
Replies the current longitude, or undefined, if the longitude isn't known.
set
Assign the longitude. Expects a number in the range [-180,180]. Raises an error,
if the node is a proxy node.
varnb=require("josm/builder").NodeBuilder;// set members varn=nb.create();n.lon=-120.78;n.lon;// -> -120.78;
north:number
Get the projected north coordinate, or undefined, if the projected north coordinate isn't known.
varnb=require("josm/builder").NodeBuilder;// set members varn=nb.create();n.north;
replies an instance of
LatLon or
undefined, if the position isn't known.
set
Assign the position. Either an instance of LatLon
or an object with the properties {lat: ..., lon: ...}
varLatLon=org.openstreetmap.josm.data.coor.LatLon;varnb=require("josm/builder").NodeBuilder;// assign a LatLon as position n.pos=newLatLon(23,32.33);// assign an object as position n.pos={lat:23,lon:32.33};// get the positionn.pos;// -> a LatLon with the position