source: subversion/applications/editors/applet/build.xml @ 34448

Last change on this file since 34448 was 2155, checked in by danmoore, 13 years ago

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

File size: 4.2 KB
Line 
1<project name="openstreetmap" default="dist" basedir=".">
2
3  <property name="src" location="src"/>
4  <property name="build" location="build"/>
5  <property name="dist" location="dist"/>
6  <property name="lib" location="lib"/>
7  <property name="jsp" location="jsp"/>
8  <property name="bin" location="bin"/>
9  <property name="html" location="html"/>
10       
11        <property name="keystore.alias" value="steveC"/>
12        <property name="keystore.pass" value="blahblah"/>
13
14  <target name="init">
15    <tstamp/>
16    <mkdir dir="${build}"/>
17    <mkdir dir="${build}/gui"/>
18        <mkdir dir="${dist}"/>
19    <mkdir dir="${dist}/api"/>
20    <mkdir dir="${dist}/rc1/org"/>
21    <mkdir dir="${dist}/rc1/org/openstreetmap"/>
22    <mkdir dir="${dist}/rc1/org/openstreetmap/processing"/>
23  </target>
24
25
26  <target name="compile" depends="init">
27    <javac srcdir="${src}"
28      classpath="${lib}/core.jar:${lib}/commons-httpclient-3.0-rc3.jar:${lib}/commons-logging.jar:${lib}/commons-codec-1.3.jar:${lib}/MinML2.jar:${lib}/plugin.jar:${lib}/thinlet.jar"
29      debug="true"
30      optimize="off"
31      destdir="${build}"
32      />
33
34  </target>
35
36  <target name="dist" depends="compile">
37    <copy file="${lib}/commons-codec-1.3.jar" tofile="${dist}/commons-codec-1.3.jar"/>
38    <copy file="${lib}/commons-logging.jar" tofile="${dist}/commons-logging.jar"/>
39    <copy file="${lib}/commons-httpclient-3.0-rc3.jar" tofile="${dist}/commons-httpclient-3.0-rc3.jar"/>
40    <copy file="${lib}/core.jar" tofile="${dist}/core.jar"/>
41    <copy file="${lib}/MinML2.jar" tofile="${dist}/MinML2.jar"/>
42    <copy file="${lib}/thinlet.jar" tofile="${dist}/thinlet.jar"/>
43
44    <copy file="${lib}/data/LucidaSansUnicode-11.vlw" tofile="${dist}/rc1/data/LucidaSansUnicode-11.vlw"/>
45
46    <copy todir="${dist}">
47      <fileset dir="${html}"/>
48    </copy>
49        <replace file="${dist}/test_osm_applet.html" token="@user@" value="${test.user}"/>
50        <replace file="${dist}/test_osm_applet.html" token="@pass@" value="${test.pass}"/>
51
52        <copy todir="${dist}/rc1/org/openstreetmap/processing/">
53      <fileset dir="${build}/org/openstreetmap/processing"/>
54    </copy>
55    <copy todir="${dist}/rc1/org/openstreetmap/gui/">
56      <fileset dir="${build}/org/openstreetmap/gui"/>
57    </copy>
58    <copy todir="${dist}/rc1/org/openstreetmap/client/">
59      <fileset dir="${build}/org/openstreetmap/client"/>
60    </copy>
61    <copy todir="${dist}/rc1/org/openstreetmap/util/">
62      <fileset dir="${build}/org/openstreetmap/util"/>
63    </copy>
64
65    <mkdir dir="${dist}/rc1/data"/>
66    <copy file="${lib}/data/hand.png" tofile="${dist}/rc1/data/hand.png"/>
67    <copy file="${lib}/data/zoomin.png" tofile="${dist}/rc1/data/zoomin.png"/>
68    <copy file="${lib}/data/zoomout.png" tofile="${dist}/rc1/data/zoomout.png"/>
69    <copy file="${lib}/data/yahoo.png" tofile="${dist}/rc1/data/yahoo.png"/>
70    <copy file="${lib}/data/way.xml" tofile="${dist}/rc1/data/way.xml"/>
71    <copy file="${lib}/data/segment.xml" tofile="${dist}/rc1/data/segment.xml"/>
72    <copy file="${lib}/data/node.xml" tofile="${dist}/rc1/data/node.xml"/>
73    <copy file="${lib}/data/msgbox.xml" tofile="${dist}/rc1/data/msgbox.xml"/>
74
75    <jar destfile="${dist}/OSMApplet.jar" basedir="${dist}/rc1" />
76
77  </target>
78
79  <target name="sign" depends="dist">
80    <!-- FIXME figure out which really need signing (no its not just httpclient) -->
81    <signjar jar="${dist}/commons-codec-1.3.jar" alias="${keystore.alias}" storepass="${keystore.pass}"/>
82    <signjar jar="${dist}/commons-httpclient-3.0-rc3.jar" alias="${keystore.alias}" storepass="${keystore.pass}"/>
83    <signjar jar="${dist}/commons-logging.jar" alias="${keystore.alias}" storepass="${keystore.pass}"/>
84    <signjar jar="${dist}/core.jar" alias="${keystore.alias}" storepass="${keystore.pass}"/>
85    <signjar jar="${dist}/MinML2.jar" alias="${keystore.alias}" storepass="${keystore.pass}"/>
86    <signjar jar="${dist}/OSMApplet.jar" alias="${keystore.alias}" storepass="${keystore.pass}"/>
87    <signjar jar="${dist}/thinlet.jar" alias="${keystore.alias}" storepass="${keystore.pass}"/>
88  </target>
89 
90  <target name="clean">
91    <delete dir="${build}"/>
92    <delete dir="${dist}"/>
93  </target>
94
95  <target name="run.windows" depends="sign">
96    <exec executable="cmd">
97        <arg value="/c"/>
98        <arg file="dist/test_osm_applet.html"/>
99    </exec>
100  </target>
101
102</project>
Note: See TracBrowser for help on using the repository browser.