Changeset 31089 in osm for applications/editors/josm/plugins
- Timestamp:
- 2015-04-21T00:15:34+02:00 (10 years ago)
- Location:
- applications/editors/josm/plugins/ElevationProfile
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/ElevationProfile/build.xml
r30876 r31089 4 4 <property name="commit.message" value="[josm_elevationprofile]"/> 5 5 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 6 <property name="plugin.main.version" value=" 7886"/>6 <property name="plugin.main.version" value="8168"/> 7 7 8 8 <!-- Configure these properties (replace "..." accordingly). -
applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/grid/ElevationGridTileLoader.java
r30344 r31089 13 13 */ 14 14 public class ElevationGridTileLoader implements TileLoader { 15 15 protected TileLoaderListener listener; 16 16 17 18 19 20 17 public ElevationGridTileLoader(TileLoaderListener listener) { 18 CheckParameterUtil.ensureParameterNotNull(listener); 19 this.listener = listener; 20 } 21 21 22 23 24 22 @Override 23 public TileJob createTileLoaderJob(final Tile tile) { 24 CheckParameterUtil.ensureParameterNotNull(tile); 25 25 26 26 return new TileJob() { 27 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 28 @Override 29 public void run() { 30 synchronized (tile) { 31 if ((tile.isLoaded() && !tile.hasError()) || tile.isLoading()) 32 return; 33 tile.initLoading(); 34 } 35 try { 36 tile.loadImage(null); 37 tile.setLoaded(true); 38 listener.tileLoadingFinished(tile, true); 39 } catch (Exception e) { 40 tile.setError(e.getMessage()); 41 listener.tileLoadingFinished(tile, false); 42 } finally { 43 tile.finishLoading(); 44 } 45 } 46 46 47 @Override 48 public Tile getTile() { 49 return tile; 50 } 51 }; 52 } 47 @Override 48 public Tile getTile() { 49 return tile; 50 } 51 52 @Override 53 public void submit() { 54 run(); 55 } 56 }; 57 } 53 58 54 59 }
Note:
See TracChangeset
for help on using the changeset viewer.