Changeset 31179 in osm for applications/editors
- Timestamp:
- 2015-06-02T13:27:08+02:00 (10 years ago)
- Location:
- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryToggleDialog.java
r31178 r31179 106 106 } 107 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 108 115 CacheAccess<String, BufferedImageCacheEntry> prev; 109 116 try { … … 166 173 if (MapillaryToggleDialog.getInstance().getImage() != null) { 167 174 MapillaryData.getInstance().selectNext(); 168 Main.map.mapView.zoomTo(MapillaryData.getInstance() 169 .getSelectedImage().getLatLon()); 175 if (MapillaryData.getInstance() 176 .getSelectedImage() != null) 177 Main.map.mapView.zoomTo(MapillaryData.getInstance() 178 .getSelectedImage().getLatLon()); 170 179 } 171 180 } … … 189 198 if (MapillaryToggleDialog.getInstance().getImage() != null) { 190 199 MapillaryData.getInstance().selectPrevious(); 191 Main.map.mapView.zoomTo(MapillaryData.getInstance() 192 .getSelectedImage().getLatLon()); 200 if (MapillaryData.getInstance() 201 .getSelectedImage() != null) 202 Main.map.mapView.zoomTo(MapillaryData.getInstance() 203 .getSelectedImage().getLatLon()); 193 204 } 194 205 } -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillarySequenceDownloadThread.java
r31178 r31179 34 34 private Bounds bounds; 35 35 36 public MapillarySequenceDownloadThread(ExecutorService ex, String url, Bounds bounds) { 36 public MapillarySequenceDownloadThread(ExecutorService ex, String url, 37 Bounds bounds) { 37 38 this.url = url; 38 39 this.ex = ex; … … 51 52 } 52 53 JsonArray jsonseq = jsonall.getJsonArray("ss"); 54 // At the moment there is a bug with some sequences at Mapillay API, 55 // so if they are worng he use this variable to skip them. 56 boolean isSequenceWrong = false; 53 57 for (int i = 0; i < jsonseq.size(); i++) { 54 58 JsonObject jsonobj = jsonseq.getJsonObject(i); … … 64 68 .getJsonNumber(0).doubleValue(), cas 65 69 .getJsonNumber(j).doubleValue())); 70 } catch (IndexOutOfBoundsException e) { 71 Main.error(e); 72 isSequenceWrong = true; 66 73 } catch (Exception e) { 67 74 Main.error(e); 68 75 } 69 76 } 77 if (isSequenceWrong) 78 break; 70 79 MapillarySequence sequence = new MapillarySequence(); 71 80 int first = -1;
Note:
See TracChangeset
for help on using the changeset viewer.