Potlatch 1/Development overview/File-by-file
< Potlatch 1 | Development overview(Redirected from Potlatch/Development overview/File-by-file)
Jump to navigation
Jump to search
Like the rest of OSM, all the Potlatch source is in svn.
Program files
These are static files at sites/rails_port/public/potlatch/. They are delivered to the user.
- potlatch.swf is the main (compiled) SWF client. The user runs this within their browser.
- swfobject.js is an open-source SWF embedding library.
- ymap.swf is Yahoo!'s interface to their API. This SWF is compiled with Adobe Flash rather than Ming. (The .fla is not necessary to run Potlatch but is available on request, and consists simply of the Yahoo component and six lines of ActionScript.)
Server files
These run on the server to do the database interaction (see server overview).
- sites/rails_port/app/controllers/amf_controller.rb is the serverside script which receives requests from the SWF, accesses the database, then returns the result.
- sites/rails_port/app/controllers/swf_controller.rb is the serverside script which draws GPS traces.
- sites/rails_port/config/potlatch/presets.txt is a CSV-like list of common way and node key/value pairs.
- sites/rails_port/config/potlatch/colours.txt is a tab-separated list of fill and stroke colours used when drawing the map.
- sites/rails_port/config/potlatch/relation_colours.txt is a tab-separated list of highlight colours used when drawing relations on the map.
- sites/rails_port/config/potlatch/autocomplete.txt is a tab-separated list of keys and values used for the autocomplete menus.
Source files
These are provided so that you can hack on Potlatch! They are compiled into the SWF client mentioned above (see client overview). They're all at applications/editors/potlatch/.
- potlatch.as is the main ActionScript source code.
- Other .as files are includes for the above. They have fairly obvious names.
- potlatch_assets.pl contains Ming-Perl drawing primitives for the icons.
- potlatch.pl (can be called from the command line or as a CGI) just compiles an SWF from the above. You probably won't need to change this.