Changes between Version 22 and Version 23 of Help/Preferences/RemoteControl


Ignore:
Timestamp:
2014-10-23T09:53:05+02:00 (10 years ago)
Author:
sanderd17
Comment:

Add new command

Legend:

Unmodified
Added
Removed
Modified
  • Help/Preferences/RemoteControl

    v22 v23  
    6868}}}
    6969
    70 
     70=== {{{load_data}}} ===
     71Instruct JOSM to load OSM data, directly encoded in the URL, instead of coming from an external file. This is only suited for smaller data (some browsers limit the maximum URL length), but it is faster (since no download is required), and in many cases where dynamically generated data is needed, it's easier to generate.
     72
     73{{{
     74GET /load_data?new_layer=(true/false)&layer_name=...&mime_type=...&data=...
     75}}}
     76where
     77||= **Parameter** =||= **Required/Optional** =||= **Meaning** =||
     78|| `new_layer` || O || Chose to load the data in a new layer ||
     79|| `layer_name` || O || Only valid when the data is loaded in a new layer; Gives JOSM a hint on how to name the layer ||
     80|| `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 ||
     81|| `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. ||
    7182
    7283=== {{{imagery}}} ===