Custom configuration XML files for JOSM

Samples (See comments in XML)

Preferences addition or replacement commands

Following code adds one more imagery to the list:

<preferences operation="append">
    <!-- Any preferences.xml fragment can be used here -->
    <tag key="download.autorun" value="true"/> <!-- example of simple preference modification - download.autorun := true -->
    <maps key="imagery.entries"> 
        <tag key="name" value="ScanEx IRS"/>
        <tag key="type" value="scanex"/>
        <tag key="url" value="IRS"/>
        <tag key="attribution-text" value="IRS"/>
        <tag key="attribution-url" value=""/>

If <preferences operation="replace"> will be used instead, all other <map> elements will be deleted from imagery.entries !

Another example:

  <preferences operation="replace"> <!-- old content of draw.anglesnap.angles will be deleted -->
     <list key="draw.anglesnap.angles">
       <entry value="30"/>
       <entry value="45"/>
       <entry value="60"/>

File operations - downloading, deleting, unzipping

  <delete path="plugins/tmp"/>
  <!-- delete recursively plugins/tmp from preferences directory -->
  <!-- base = "prefs" - delete from preferences folder base = "plugins" - delete from plugins folder base = "cache" - delete from cache folder -->
  <delete path="splug" base="plugins"/>
  <!-- delete recursively splug folder from preferences directory -->
  <!--<delete path="." base="cache"/> delete cache folder -->

  <download url="" path="plugins/tmp/bt.jar" mkdir="true" unzip="true"/>
  <!-- download file from url and place as "path" if mkdir="true", then all necessary directories will be created if unzip="true", then zip/jar file will be exanded and then deleted -->

  <download url="" path="1/logo.svg" mkdir="true" base="cache"/>

  <download url="file://localhost/e:/" path="qqq/" unzip="true" mkdir="true"/>
  <!-- copy from local folder and unzip -->

Plugin operations: install, disable, delete

<!-- install plugins and remove them without deleting plastic_laf.jar -->
   <plugin install="buildings_tools;wayselector" remove="plastic_laf"/>
   <plugin delete="proj4j"/> <!-- disable plugin and delete jar -->

See also

Last modified 4 years ago Last modified on 2020-08-12T14:03:58+02:00
Note: See TracWiki for help on using the wiki.