Changes between Version 28 and Version 29 of Help/Preferences/RemoteControl


Ignore:
Timestamp:
2014-11-16T17:48:53+01:00 (11 years ago)
Author:
pyrog
Comment:

Add missing parameters for import, imagery, load_object, version. Params in the same order than http://127.0.0.1:8111

Legend:

Unmodified
Added
Removed
Modified
  • Help/Preferences/RemoteControl

    v28 v29  
    1 [[TranslatedPages(outdated=This page is missing some new options and the list of commands is probably better situated on a separate page.)]]
     1[[TranslatedPages(outdated=This page is missing some new commands : features and open_file. The list of commands is probably better situated on a separate page.)]]
    22= Preferences > Remote Control =
    33
     
    7171GET /import?url=...
    7272}}}
     73where
     74||= **Parameter** =||= **Required/Optional** =||= **Meaning** =||
     75|| `url` || R ||  ||
     76|| `new_layer` || O || If '''true''', downloads to a new layer ||
    7377
    7478=== {{{load_data}}} ===
     
    8185where
    8286||= **Parameter** =||= **Required/Optional** =||= **Meaning** =||
     87|| `data` || R || The XML data to load, this should be URL encoded in a way that also encodes the special characters &, = and ? to resp. %26, %3D and %3F. The JS [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent encodeUriComponent()] method provides this functionality out of the box. ||
    8388|| `new_layer` || O || Chose to load the data in a new layer ||
     89|| `mime_type` || O || Mime type of the data, by default this is "application/x-osm+xml", which is currently the only supported mime type, but in the future other mime types could be supported ||
    8490|| `layer_name` || O || Only valid when the data is loaded in a new layer; Gives JOSM a hint on how to name the layer ||
    85 || `mime_type` || O || Mime type of the data, by default this is "application/x-osm+xml", which is currently the only supported mime type, but in the future other mime types could be supported ||
    86 || `data` || R || The XML data to load, this should be URL encoded in a way that also encodes the special characters &, = and ? to resp. %26, %3D and %3F. The JS [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent encodeUriComponent()] method provides this functionality out of the box. ||
    8791
    8892=== {{{imagery}}} ===
     
    9397where
    9498||= **Parameter** =||= **Required/Optional** =||= **Meaning** =||
     99|| `url` || R || The Request URL, including patterns. Must be the last parameter, everything after "&url=" is interpreted as URL, even if it contains "&" characters.  ||
    95100|| `title` || O || The display name of the layer ||
    96101|| `type` || O || Type of the layer. Possible values are `wms`, `tms` and `bing` [[BR]] (since !RemoteControl Version 1.3) ||
     102|| `cookies` || O ||  ||
    97103|| `min_zoom` || O || The minimum zoom level [[BR]] (since !RemoteControl Version 1.4) ||
    98104|| `max_zoom` || O || The maximum zoom level. For higher scales, the images of the maximum level is enlarged [[BR]] (since !RemoteControl Version 1.4) ||
    99 || `url` || R || The Request URL, including patterns. Must be the last parameter, everything after "&url=" is interpreted as URL, even if it contains "&" characters.  ||
     105
     106
     107mandatory parameters: url
     108optional parameters: title, type, cookies, min_zoom, max_zoom
    100109
    101110==== Examples ====
     
    116125||= **Parameter** =||= **Required/Optional** =||= **Meaning** =||
    117126|| `objects` || R || Comma separated list of object ids, e.g. "{{{n1234,n1235,w84,r958493}}}" ||
    118 || `new_layer` || O || If true, downloads to a new layer ||
     127|| `new_layer` || O || If '''true''', downloads to a new layer ||
    119128|| `addtags` || O || Optional parameter to add tags. The key and value is separated by "=" and multiple tags can be separated by a Pipe "|". See [#addtags details]. ||
    120 || `referrers` || O || If true, downloads referrers of the object as well. I.e. parent relations, and for nodes, additionally, parent ways. (since r6782) ||
     129|| `relation_members` || O || If '''true''', downloads objects members of the relations as well. ||
     130|| `referrers` || O || If '''true''', downloads referrers of the object as well. I.e. parent relations, and for nodes, additionally, parent ways. (since r6782) ||
    121131
    122132==== Example ====
     
    166176GET /version[?jsonp=callback]
    167177}}}
     178where
     179||= **Parameter** =||= **Required/Optional** =||= **Meaning** =||
     180|| `jsonp` || O|| Jsonp callback for older browsers not implementing ​Cross-Origin Resource Sharing (CORS) ||
    168181
    169182The command returns a json object containing an application identifier that is always "JOSM !RemoteControl", a major number and a minor number. Compatible protocol changes result in an increase of the minor number. Incompatible changes increase the major number. So a client application knowing of protocol version 1.0 can still talk to JOSM having 1.1. But it's not guaranteed to be working with 2.0. So the client should verify the major number.