Search:
Login
Preferences
Help/Guide
About Trac
Register
Forgot your password?
Wiki
Timeline
Changelog
Browse Source
View Tickets
New Ticket
Roadmap
Builds
Sonar
Search
Context Navigation
+0
Start Page
Index
History
Editing Help/Preferences/ImportExport
Adjust edit area height:
8
12
16
20
24
28
32
36
40
Edit side-by-side
[[TranslatedPages]] = Custom configuration XML files for JOSM = == Samples (See comments in XML) == * Categorized examples [attachment:scripts.zip:ticket:4421 scripts.zip] * Installing presets and styles: [attachment:seamap.xml:ticket:4421 seamap.xml], [attachment:seamap_ForOfflineInstallation.zip:ticket:4421 seamap_ForOfflineInstallation.zip] * Imagery layer, plugin and options tuning (only Russian localization for now): [attachment:forestMapping.xml:ticket:4421 forestMapping.xml] === Preferences addition or replacement commands === Following code adds one more imagery to the list: {{{#!xml <config> <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"> <map> <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="http://irs.gis-lab.info/"/> </map> </maps> </preferences> </config> }}} If '''<preferences operation="replace">''' will be used instead, all other <map> elements will be __deleted__ from '''imagery.entries''' ! Another example: {{{#!xml <config> <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"/> </list> </preferences> </config> }}} === File operations - downloading, deleting, unzipping === {{{#!xml <config> <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="http://josm.openstreetmap.de/osmsvn/applications/editors/josm/dist/buildings_tools.jar" 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="https://wiki.openstreetmap.org/w/images/7/79/Public-images-osm_logo.svg" path="1/logo.svg" mkdir="true" base="cache"/> <download url="file://localhost/e:/a.zip" path="qqq/a.zip" unzip="true" mkdir="true"/> <!-- copy from local folder and unzip --> </config> }}} === Plugin operations: install, disable, delete === {{{#!xml <config> <!-- 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 --> </config> }}} == See also == * Development discussion: #4421, #18830
Note:
See
WikiFormatting
and
TracWiki
for help on editing wiki content.
Change information
Your email or username:
E-mail address and name can be saved in the
Preferences
Comment about this change (optional):
Note:
See
TracWiki
for help on using the wiki.