this patch primarily attempts to fix 3 broken areas of applet: concurrency, paint/event cycle and out of memory errors.
concurrency issues:
- applies (and hopefully explains) a synchronisation convention for applet
- uses more than one thread to fetch image tiles
paint/event cycle:
- lightens workload on event thread
- reduces swamping of redraw()
out of memory:
- fetches reduced resolution tiles at lower zoom levels
these fixes should improve the overall usability / experience through reliability and responsiveness.
NB: IMPORTANT because synchronisation has been changed/implemented, there is potential for new deadlock issues - hopefully everyone can agree, better to find these issues and fix rather than have unrestricted data errors and exceptions in system. only tested JDK 1.5 (compiled vs 1.3) - standalone, IE6, Firefox2 - i.e. needs testing before deploying!
increased functionality was not the aim, but applying these and testing has been made easier by adding / changing a few features:
- minor edit message / checking improvements
- see-through segments on node move (so can see where moving to) *ok, this one wasn't necessary, hope it's generally acceptable
- display of one-ways *ok, another side issue, was trying to work out what the data convention was
- fixed southern-hemisphere tile-gap bug
- tile detail now changed by { and } (shifted) keys
NB: if you like you can cause OutOfMemory? by increasing tile res and
zooming out - was thought best to allow freedom of use - could easily
restrict in future).
- added parameters for no. of tile threads, server connection timeout and retries, user-abortable map downloads, allowing debug output to web page
- probably a few others forgotten about
added files:
html/test_osm_applet.html - page for local in-browser testing
html/jquery.js - support for test page
util/Releaseable.java - interface for shutting down threads / releasing back refs
client/MapData.java - centralised low-level data holder, basis for edit/draw sync
client/Projection.java - refactored extract from Tile.java
|