forked from openstreetmap/iD
-
Notifications
You must be signed in to change notification settings - Fork 1
Previous changes
Pieter Vander Vennet edited this page Jul 3, 2019
·
2 revisions
Your coach has some experience customizing iD. As he knew that would happen again, here are some pointers.
- Point to our server: see API.md on how to change the endpoint (done in modules/services/osm.js)
- Remove unneeded buttons
- Remove mapillary related stuff
- Update the translations, to remove mentions of OpenStreetMap
- Update the background WMS-layers
See data/imagery.json There is an 'update_imagery' which builds imagery.json
Presets are placed into data/presets
- Actions are various actions a user can perform (save, add data, ...)
- Behavior are miscellanious other actions (copy, draw, lasso-select, ...)
- Core are various data functionalities
- Geo contains geo-calculation algorithms
- 'Mode' represents the various states that iD can be in (select-mode, add-way mode, save mode, ...)
- Operations are all the actions that the user can perform on an OSM-object (such as move, rotate, merge, ...)
- OSM is the OSM data model
- presets contains the representation of presets
- renderer draws everything on screen
- services contains various third-party services (nominatim, keepright, wikipedia, ...) Here, removing Mapillary, OpenStreetCam, OpenStreetView, ... removes the respective services. They also have to be removed in index.js
- SVG contains svg-related stuff
- UI is the big directory containing all the UI elements. The most important modules in it are: Here, various services should be removed as well. (photoviewer, qa_issues, improveosm, ...) a) account where user account related stuff lives. TODO: figure out if we can make a login function there b) map_data contains the buttons for 'mapillary' and others, which can be removed. It also contains the layer control, the 'openstreetMap-notes' button etc c) Sidebar is the full information bar on the left d) init.js contains various initialization things (and also the link to the issue tracker - search for issues) The buttons on the right can be tweaked there too (search for '// map controls') Oh, our version can be found there as well e) help.js is the help-pane. Removing dead weight there helps as well f) changeset_editor contains the save dialog. The commit message can be removed there. (commit &nd Commit_changes contain the code actually uploading the changes, but it seems a bit intertwined). Also note that there is some authentication code there
- Util contains various leftover pieces of code
- Validations is for the validation rules
- core/context.js contains the assetPath, where all the assets live
For custom rendering, add 'tag-class' in modules/svg/tag_classes.js Then, in css/, extra rules can be added