import josm from 'josm'
the global command history
| Name | Type | Description |
|---|---|---|
commands |
module:josm/command.CommandHistory |
import josm from 'josm' // undoes the last command josm.commands.undo() // redoes two commands josm.commands.redo(2)
Replies an accessor to the JOSM scripting console.
| Name | Type | Description |
|---|---|---|
console |
module:josm/scriptingconsole | accessor to the JOSM scripting console |
accessor for JOSM layers
| Name | Type | Description |
|---|---|---|
layers |
module:josm/layers | the layers object |
import josm from 'josm'
josm.alert('num layers: ' + josm.layers.length)
// name of first layer
josm.alert('num layers: ' + josm.layers.get(0).name)
| Name | Type | Description |
|---|---|---|
menu |
module:josm/ui/menu~MenuBar | accessor for JOSMs menu bar |
JOSM version string
import josm from 'josm' josm.alert(josm.version)