Changes between Version 15 and Version 29 of Help/RemoteControlCommands


Ignore:
Timestamp:
(multiple changes)
Author:
(multiple changes)
Comment:
(multiple changes)

Legend:

Unmodified
Added
Removed
Modified
  • Help/RemoteControlCommands

    v15 v29  
    66A complete list of commands and mandatory/optional parameters is shown at http://127.0.0.1:8111/ (when JOSM is running).
    77
    8 === {{{load_and_zoom}}} ===
     8=== {{{load_and_zoom}}} ===#load_and_zoom
    99Instructs JOSM to download a bounding box from the API, zoom to the downloaded area and optionally select one or more objects.
    1010{{{
     
    2929|| `changeset_hashtags` ||  O  || Hashtags of the changeset ''(since r13109)'' ||
    3030|| `changeset_tags` ||  O  || Optional parameter to add changeset tags. The key and value is separated by "=" and multiple tags can be separated by a Pipe "|". This command uses the same syntax as the [#addtags addtags] parameter. `changeset_comment` and `changeset_source` currently override the `comment` and `source` tags passed in this parameter, but this may change in the future. ''(since r15316)'' ||
    31 || `search` ||  O  || Search objects in the current data layer. See [wiki:/Help/Action/Search Search] ||
     31|| `search` ||  O  || Search objects in the current data layer. See [wikitr:/Help/Action/Search Search] ||
    3232
    3333==== Example ====
     
    9999where
    100100||= **Parameter** =||= **Required/ \\ Optional** =||= **Meaning** =||
    101 || `url` ||  R  || The Request URL, including patterns. Must be the last parameter, everything after "&url=" is interpreted as URL, even if it contains "&" characters.  ||
     101|| `url` ||  R or `id`  || The Request URL, including patterns. Must be the last parameter, everything after "&url=" is interpreted as URL, even if it contains "&" characters.  ||
     102|| `id` ||  R or `url`  || The imagery ID in JOSM, see [[Maps]] (since r17655).  ||
    102103|| `title` ||  O  || The display name of the layer ||
    103 || `type` ||  O  || Type of the layer. Possible values are `wms`, `tms` and `bing` ''(since !RemoteControl Version 1.3)'' ||
     104|| `type` ||  O  || Type of the layer. Possible values are `wms`, `tms` and `bing` ''(defaults to `wms`, since !RemoteControl Version 1.3)'' ||
    104105|| `cookies` ||  O  ||  ||
    105106|| `min_zoom` ||  O  || The minimum zoom level ''(since !RemoteControl Version 1.4)'' ||
    106107|| `max_zoom` ||  O  || The maximum zoom level. For higher scales, the images of the maximum level is enlarged ''(since !RemoteControl Version 1.4)'' ||
    107 
    108 
    109 mandatory parameters: url
    110 optional parameters: title, type, cookies, min_zoom, max_zoom
     108|| `name` ||  O  || alias for `title` ''(since !RemoteControl Version 1.10)'' ||
     109|| `attribution-text` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     110|| `attribution-url` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     111|| `bestMarked` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     112|| `bounds` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     113|| `category` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     114|| `country-code` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     115|| `customHttpHeaders` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     116|| `date` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     117|| `default-layers` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     118|| `description` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     119|| `eula` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     120|| `icon` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     121|| `id` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     122|| `logo-image` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     123|| `logo-url` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     124|| `metadataHeaders` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     125|| `minimumTileExpire` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     126|| `modTileFeatures` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     127|| `noTileChecksums` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     128|| `noTileHeaders` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     129|| `overlay` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     130|| `permission-reference-url` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     131|| `pixel-per-eastnorth` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     132|| `projections` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     133|| `shapes` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     134|| `terms-of-use-text` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     135|| `terms-of-use-url` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     136|| `tileSize` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     137|| `transparent` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     138|| `type` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     139|| `valid-georeference` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
    111140
    112141==== Examples ====
    113 * TMS layer "osm" {{{http://tile.openstreetmap.org/{zoom}/{x}/{y}.png}}}
    114 
    115 [http://localhost:8111/imagery?title=osm&type=tms&url=http://tile.openstreetmap.org/%7Bzoom%7D/%7Bx%7D/%7By%7D.png]
     142* TMS layer "osm" {{{https://tile.openstreetmap.org/{zoom}/{x}/{y}.png}}}
     143
     144http://localhost:8111/imagery?title=osm&type=tms&min_zoom=1&max_zoom=20&url=https://tile.openstreetmap.org/%7Bzoom%7D/%7Bx%7D/%7By%7D.png
    116145
    117146* WMS layer "landsat" {{{http://irs.gis-lab.info/?layers=landsat&SRS={proj}&WIDTH={width}&HEIGHT={height}&BBOX={bbox} }}}
    118 [http://localhost:8111/imagery?title=landsat&type=wms&url=http://irs.gis-lab.info/?layers=landsat&SRS=%7Bproj%7D&WIDTH=%7Bwidth%7D&HEIGHT=%7Bheight%7D&BBOX=%7Bbbox%7D]
     147http://localhost:8111/imagery?title=landsat&type=wms&url=http://irs.gis-lab.info/?layers=landsat&SRS=%7Bproj%7D&WIDTH=%7Bwidth%7D&HEIGHT=%7Bheight%7D&BBOX=%7Bbbox%7D
     148
     149* "Bing" layer
     150
     151http://localhost:8111/imagery?id=Bing
    119152
    120153
     
    195228      "minor": 0
    196229   },
    197    "application": "JOSM RemoteControl"
     230   "application": "JOSM RemoteControl",
     231   "version": 16587, // JOSM version (since r16587)
     232   "osm_server": "default" // indicates that the user is using the OSM server by "default" or "custom" (since r19416)
    198233}
    199234}}}
     
    257292}}}
    258293
     294=== {{{openapi.json}}} ===
     295JOSM RemoteControl as [https://swagger.io/specification/ OpenAPI Specification]
     296
     297* http://localhost:8111/openapi.json
     298* https://petstore.swagger.io/?url=http://localhost:8111/openapi.json
     299
    259300
    260301=== Adding, changing or deleting tags === #addtags
     
    273314[http://localhost:8111/load_and_zoom?addtags=wikipedia%3Ade=%7Cmaxspeed=&select=way23071688,way23076176,way23076177,&left=13.739727546842&right=13.740890970188&top=51.049987191025&bottom=51.048466954325].
    274315
     316=== {{{export}}} ===
     317''(since JOSM r19425)''
     318
     319Returns the content of the active layer in the `.osm` format
     320{{{
     321GET /export
     322}}}
     323
     324If there is no active layer, or it is in the process of uploading changes, an empty response will be returned.
     325
     326
    275327=== Other commands ===
    276328Remotecontrol allows other plugins to add additional commands. The other registers a RequestHandler class and specifies a command to be handled by this class. The command syntax has to be defined by the other plugin.
    277329
    278 Reverter plugin since version 27091 makes use of this feature.
    279 
     330==== Reverter ====
     331Reverter plugin since version 27091 makes use of this feature. See [source:osm/applications/editors/josm/plugins/reverter/src/reverter/RevertChangesetHandler.java RevertChangesetHandler.java].
     332
     333==== Mapillary ====
     334See [https://github.com/JOSM/Mapillary/blob/master/src/main/java/org/openstreetmap/josm/plugins/mapillary/io/remotecontrol/MapillaryRemoteControl.java MapillaryRemoteControl.java].
     335Either `sequence` or `photo` must be specified, but not both. Since the remote control class was written for multiple imagery sources, the id for either `sequence` or `photo` ''must'' be prefixed with `Mapillary/`.
     336
     337==== Compilation of plugin remote control commands ====
     338||= Plugin =||= **Command** =||= **Parameter** =||= **Required/ \\ Optional** =||= **Meaning** =||
     339|| Reverter || `revert_changeset` ||  ||  || Base command to revert a changeset ||
     340|| || || `id` ||  R  || The changeset id to use (should match regex `[0-9]+`). Since version 36321, you can pass multiple ids separated by commas. ||
     341|| MapWithAI || `mapwithai` || || || Base command to download MapWithAI data ||
     342|| || || `max_obj` ||  O  || Set the maximum number of objects the user can add per action from the MapWithAI layer. Should match regex `[0-9]+`. ||
     343|| || || `switch_layer` ||  O  || Use if you want to force users to automatically switch layers when they add data to OSM. Takes `true`/`false`. ||
     344|| || || `bbox` ||  O  || The bbox to download (`lat,lon,lat,lon` -- assumes the bbox will not cross meridian) ||
     345|| || || `crop_bbox` ||  O  || Crop downloaded MapWithAI data (roads only) to this bbox. Tasking managers may also generate a well-known layer. ||
     346|| || || `url` ||  O  || The URL to use instead of the built-in data sources. Useful for imports (please make certain you went through the import process). ||
     347|| || || `source` ||  O  || The source to use when uploading to OSM (changeset source) ||
     348|| Mapillary || `photo` || || || Base command to download a Mapillary photo (may be extended to other imagery sources in the future) ||
     349|| || || `photo` ||  R/O  || The id of the image to show and download. Either this or `sequence` must be specified. ||
     350|| || || `sequence` ||  R/O  || The id of the sequence to show and download. First image is shown in image viewer. ||
    280351----
    281352Back to [wikitr:/Help/Preferences/RemoteControl Remote control preferences] \\