Changeset 32957 in osm for applications/editors
- Timestamp:
- 2016-09-08T23:32:55+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerAction.java
r32912 r32957 138 138 progressMonitor.subTask(tr("checking cache...")); 139 139 cleanupCache(); 140 processnodelist(pos, topLeft, botRight, waylen, maxnode, threshold, 141 epsilon, resolution, tilesize, startdir, wmslayer, 142 progressMonitor.createSubTaskMonitor(ProgressMonitor.ALL_TICKS, false)); 140 processnodelist(new Lakewalker(waylen, maxnode, threshold, epsilon, resolution, tilesize, startdir, wmslayer), 141 pos, topLeft, botRight, epsilon, progressMonitor.createSubTaskMonitor(ProgressMonitor.ALL_TICKS, false)); 143 142 } 144 143 … … 150 149 } 151 150 }; 152 Thread executeThread = new Thread(lakewalkerTask); 153 executeThread.start(); 151 new Thread(lakewalkerTask).start(); 154 152 } catch (Exception ex) { 155 System.out.println("Exception caught: " + ex.getMessage());153 Main.error(ex); 156 154 } 157 155 } 158 156 159 private void processnodelist(LatLon pos, LatLon topLeft, LatLon botRight, int waylen, int maxnode, int threshold, 160 double epsilon, int resolution, int tilesize, String startdir, String wmslayer, ProgressMonitor progressMonitor) { 157 private void processnodelist(Lakewalker lw, LatLon pos, LatLon topLeft, LatLon botRight, double epsilon, ProgressMonitor progressMonitor) { 161 158 progressMonitor.beginTask(null, 3); 162 159 try { 163 160 ArrayList<double[]> nodelist = new ArrayList<>(); 164 161 165 Lakewalker lw = new Lakewalker(waylen, maxnode, threshold, epsilon, resolution, tilesize, startdir, wmslayer);166 162 try { 167 163 nodelist = lw.trace(pos.lat(), pos.lon(), topLeft.lon(), botRight.lon(), topLeft.lat(), botRight.lat(), 168 164 progressMonitor.createSubTaskMonitor(1, false)); 169 165 } catch (LakewalkerException e) { 170 System.out.println(e.getMessage());166 Main.error(e); 171 167 } 172 168
Note:
See TracChangeset
for help on using the changeset viewer.