Potlatch 2, the OpenStreetMap Flash editor.
Clone or download
Pull request Compare This branch is 17 commits ahead of openstreetmap:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
embedded New Tasks palette Dec 18, 2014
hxasm Removed executable flag from files which don't need it. Nov 14, 2010
it/sephiroth/expr Removed executable flag from files which don't need it. Nov 14, 2010
l10n Localisation updates from https://translatewiki.net. Oct 22, 2018
lib Move to Apache Flex Feb 25, 2017
net/systemeD Use much faster native JSON parsing if available Jun 6, 2018
org/vanrijkom start of vector import support Dec 17, 2009
resources Convert various URLs to https Jan 16, 2018
resources_src Merge remote-tracking branch 'upstream/master' Nov 7, 2012
styles New Bookmarks menu Jul 4, 2015
.gitignore Add the .DS_Store to the .gitignore. Jan 31, 2013
README.md Add note about Java 8 Feb 26, 2017
build.properties.template Iterate over the locales rather than having to hardcode them. Thanks … Nov 26, 2011
build.xml Add --tags to git describe to we pick up the 2.4 tag Jul 5, 2015
debug-config.xml Removed executable flag from files which don't need it. Nov 14, 2010
halcyon_viewer-config.xml Get Halcyon working again Mar 19, 2012
halcyon_viewer.as Get Halcyon working again Mar 19, 2012
potlatch2-config.xml Disable RSLs in default build May 24, 2012
potlatch2.mxml Make coordsbox wider Mar 24, 2017


Potlatch 2.0 - OpenStreetMap editor in ActionScript 3

Potlatch 2.0 is the fourth OpenStreetMap online editor (after two Java applets and Potlatch 1, and before iD). It's written in ActionScript 3 and requires a Flash Player.

What you'll need

The Flash debug player is essential to see errors as and when they occur.

You'll only need OSM Rails port installed on your local machine if you are doing hard-core server-communication coding. Generally you can use the dev server at api06.dev.openstreetmap.org for development and testing.

Compiling during development

  • fcsh
    • launches the Flex Compiler SHell -- stops the compiler having to bootstrap itself each time you invoke it. You don't need this, but it does make things slightly faster (about a second a shot for me)
  • mxmlc -load-config+=debug-config.xml potlatch2.mxml
    • compile potlatch2 in debug configuration -- build is incremental so you can run it again and mxmlc will only compile changes. Output has debug enabled along with decent stack traces. (you can substitute halcyon_viewer.as in the above to compile that)
  • compile 1
    • when using fcsh recompile the first command. (Incremental recompiling does not work on Java 8, but 6 or 7 are fine.)

If you have rlwrap on your system, use rlwrap fcsh so that command-line history will work within fcsh.

Flash's security model will not allow you to make calls from localhost to the internet. Either use instead; or run resources/server.py to launch a local server, then go to http://localhost:3333/potlatch2.html to get started (or if you're already running e.g. Apache locally, feel free to use that instead.) Alternatively, you can update your global Flash security settings to "always trust files" in your local dev area.

If you are testing against a local copy of openstreetmap-website, you will need to add an OAuth application by going to http://rails-port.local/user/<username>/oauth_clients/new. Enter Potlatch 2 (local) as the name and http://localhost:3333/resources/potlatch2.html as the application URL, and then update resources/potlatch2.html replacing the domains.

Compiling using ant

  1. Copy the properties template file: cp build.properties.template build.properties
  2. Edit the FLEX_HOME variable in build.properties: e.g. FLEX_HOME=c:/flex_sdk/
  3. ant to compile in debug configuration, putting the result at resources/potlatch2.swf

You can also ant release to compile in release configuration; ant halcyon to compile the Halcyon rendering engine as a standalone viewer; ant docs to create class documentation (in resources/docs) using asdoc; ant test to run the (few) unit tests using flexunit.

ant debug-no-locales and ant release-no-locales are quicker as they skip the translation steps. You may need to tell ant to use more memory, by typing export ANT_OPTS="-Xms768m -Xmx1024m -XX:MaxPermSize=768m -XX:ReservedCodeCacheSize=512m" beforehand (you can put this in your .profile).

Compiling with Flex Builder

If you happen to have Adobe Flex Builder 3/Flash Builder 4, you can create a project and import files into it. See http://wiki.openstreetmap.org/wiki/Potlatch_2/Developer_Documentation for details.

Thank you

Many icons used in halcyon/potlatch2 are based on the awesome CC0-licensed SJJB icons project. http://www.sjjb.co.uk/mapicons/

Thanks to Dave Stubbs, Andy Allan, Steve Bennett and everyone else who contributed to Potlatch 2 during its heyday.

Richard Fairhurst / @richardf