Changeset 31183 in osm for applications/editors/josm/plugins
- Timestamp:
- 2015-06-02T17:24:37+02:00 (9 years ago)
- Location:
- applications/editors/josm/plugins/mapillary
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mapillary/build.xml
r31182 r31183 30 30 <!-- <property name="plugin.link" value="..."/>--> 31 31 <!--<property name="plugin.early" value="..."/>--> 32 <!--<property name="plugin.requires" value="commons-imag ery"/>-->32 <!--<property name="plugin.requires" value="commons-imaging"/>--> 33 33 <!--<property name="plugin.stage" value="..."/>--> 34 34 -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryLayer.java
r31176 r31183 49 49 MouseListener, DataSetListener, EditLayerChangeListener { 50 50 51 public final static int SEQUENCE_MAX_JUMP_DISTANCE = 100; 52 51 53 public static Boolean INSTANCED = false; 52 54 public static MapillaryLayer INSTANCE; … … 249 251 private MapillaryImage[] getClosestImagesFromDifferentSequences() { 250 252 MapillaryImage[] ret = new MapillaryImage[2]; 251 double[] distances = { 100, 100};253 double[] distances = { SEQUENCE_MAX_JUMP_DISTANCE, SEQUENCE_MAX_JUMP_DISTANCE }; 252 254 LatLon selectedCoords = mapillaryData.getSelectedImage().getLatLon(); 253 double maxJumpDistance = 100;254 255 for (MapillaryImage image : mapillaryData.getImages()) { 255 if (image.getLatLon().greatCircleDistance(selectedCoords) < maxJumpDistance256 if (image.getLatLon().greatCircleDistance(selectedCoords) < SEQUENCE_MAX_JUMP_DISTANCE 256 257 && mapillaryData.getSelectedImage().getSequence() != image 257 258 .getSequence()) { -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryPlugin.java
r31176 r31183 37 37 public MapillaryPlugin(PluginInformation info) { 38 38 super(info); 39 Main.logLevel = 1; 39 synchronized (this) { 40 Main.logLevel = 1; 41 } 40 42 downloadAction = new MapillaryDownloadAction(); 41 43 exportAction = new MapillaryExportAction(); -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryToggleDialog.java
r31179 r31183 105 105 return; 106 106 } 107 if (this.image != null) { 108 this.nextButton.setEnabled(true); 109 this.previousButton.setEnabled(true); 110 if (this.image.next() == null) 111 this.nextButton.setEnabled(false); 112 if (this.image.previous() == null) 113 this.previousButton.setEnabled(false); 114 115 CacheAccess<String, BufferedImageCacheEntry> prev; 116 try { 117 this.mapillaryImageDisplay.setImage(null); 118 prev = JCSCacheManager.getCache("mapillary"); 119 if (thumbnailCache != null) 120 thumbnailCache.cancelOutstandingTasks(); 121 thumbnailCache = new MapillaryCache(image.getKey(), 122 MapillaryCache.Type.THUMBNAIL, prev, 200000, 123 200000, new HashMap<String, String>()); 124 thumbnailCache.submit(this, false); 125 126 if (imageCache != null) 127 imageCache.cancelOutstandingTasks(); 128 imageCache = new MapillaryCache(image.getKey(), 129 MapillaryCache.Type.FULL_IMAGE, prev, 200000, 130 200000, new HashMap<String, String>()); 131 imageCache.submit(this, false); 132 } catch (IOException e) { 133 // TODO Auto-generated catch block 134 e.printStackTrace(); 135 } 107 if (this.image == null) 108 return; 109 this.nextButton.setEnabled(true); 110 this.previousButton.setEnabled(true); 111 if (this.image.next() == null) 112 this.nextButton.setEnabled(false); 113 if (this.image.previous() == null) 114 this.previousButton.setEnabled(false); 115 116 CacheAccess<String, BufferedImageCacheEntry> prev; 117 try { 118 this.mapillaryImageDisplay.setImage(null); 119 prev = JCSCacheManager.getCache("mapillary"); 120 if (thumbnailCache != null) 121 thumbnailCache.cancelOutstandingTasks(); 122 thumbnailCache = new MapillaryCache(image.getKey(), 123 MapillaryCache.Type.THUMBNAIL, prev, 200000, 200000, 124 new HashMap<String, String>()); 125 thumbnailCache.submit(this, false); 126 127 if (imageCache != null) 128 imageCache.cancelOutstandingTasks(); 129 imageCache = new MapillaryCache(image.getKey(), 130 MapillaryCache.Type.FULL_IMAGE, prev, 200000, 200000, 131 new HashMap<String, String>()); 132 imageCache.submit(this, false); 133 } catch (IOException e) { 134 Main.error(e); 136 135 } 137 136 } … … 173 172 if (MapillaryToggleDialog.getInstance().getImage() != null) { 174 173 MapillaryData.getInstance().selectNext(); 175 if (MapillaryData.getInstance() 176 .getSelectedImage() != null) 174 if (MapillaryData.getInstance().getSelectedImage() != null) 177 175 Main.map.mapView.zoomTo(MapillaryData.getInstance() 178 176 .getSelectedImage().getLatLon()); … … 198 196 if (MapillaryToggleDialog.getInstance().getImage() != null) { 199 197 MapillaryData.getInstance().selectPrevious(); 200 if (MapillaryData.getInstance() 201 .getSelectedImage() != null) 198 if (MapillaryData.getInstance().getSelectedImage() != null) 202 199 Main.map.mapView.zoomTo(MapillaryData.getInstance() 203 200 .getSelectedImage().getLatLon()); -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillaryExportWriterThread.java
r31182 r31183 25 25 26 26 /** 27 * Writes the images from the queue in the HD.27 * Writes the images from the queue in the file system. 28 28 * 29 29 * @author nokutu
Note:
See TracChangeset
for help on using the changeset viewer.