Skip to content

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.

Changes made for Anyways (v2)

  1. Point to our server: see API.md on how to change the endpoint (done in modules/services/osm.js)
  2. Remove unneeded buttons
  3. Remove mapillary related stuff
  4. Update the translations, to remove mentions of OpenStreetMap
  5. Update the background WMS-layers

Background layers

See data/imagery.json There is an 'update_imagery' which builds imagery.json

Presets

Presets are placed into data/presets

Overview of Modules/*

  1. Actions are various actions a user can perform (save, add data, ...)
  2. Behavior are miscellanious other actions (copy, draw, lasso-select, ...)
  3. Core are various data functionalities
  4. Geo contains geo-calculation algorithms
  5. 'Mode' represents the various states that iD can be in (select-mode, add-way mode, save mode, ...)
  6. Operations are all the actions that the user can perform on an OSM-object (such as move, rotate, merge, ...)
  7. OSM is the OSM data model
  8. presets contains the representation of presets
  9. renderer draws everything on screen
  10. 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
  11. SVG contains svg-related stuff
  12. 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
  13. Util contains various leftover pieces of code
  14. Validations is for the validation rules
  15. core/context.js contains the assetPath, where all the assets live

Custom rendering

For custom rendering, add 'tag-class' in modules/svg/tag_classes.js Then, in css/, extra rules can be added

Clone this wiki locally