The global object josm.layers
represents the current layers in josm. The methods
and properties of this object are defined in the module layers.
The following scripts prints the names of the currently opened layers:
Data layers are instances of the JOSM native class OsmDataLayer. The Javascript mixin OsmDataLayerMixin provides additional methods and properties for instances of a data layer.
You can open a file with OSM data in a new data layer with the method
josm.open()
:
Alternatively, you can create a data layer for a dataset, in particual for a dataset which has been downloaded from the central OSM server.