Changeset 34431 in osm for applications/editors/josm/plugins/MicrosoftStreetside/src
- Timestamp:
- 2018-07-22T02:40:13+02:00 (6 years ago)
- Location:
- applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/utils
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/utils/StreetsideProperties.java
r34428 r34431 24 24 public static final IntegerProperty TILE_DOWNLOAD_THREAD_PAUSE_LEN_SEC = new IntegerProperty("streetside.tile-download-thread-pause-len-sec", 60); 25 25 public static final BooleanProperty PREDOWNLOAD_CUBEMAPS = new BooleanProperty("streetside.predownload-cubemaps", false); 26 public static final BooleanProperty DEBUGING_ENABLED = new BooleanProperty("streetside.debugging-enabled", true);26 public static final BooleanProperty DEBUGING_ENABLED = new BooleanProperty("streetside.debugging-enabled", false); 27 27 public static final BooleanProperty DOWNLOAD_CUBEFACE_TILES_TOGETHER = new BooleanProperty("streetside.download-cubeface-tiles-together", false); 28 28 … … 61 61 new StringProperty("streetside.start-directory", System.getProperty("user.home")); 62 62 public static final StringProperty URL_CLIENT_ID = 63 new StringProperty("streetside.url-clientid", System.getProperty("T1Fzd20xZjdtR0s1VDk5OFNIOXpYdzoxNDYyOGRkYzUyYTFiMzgz"));63 new StringProperty("streetside.url-clientid", "T1Fzd20xZjdtR0s1VDk5OFNIOXpYdzoxNDYyOGRkYzUyYTFiMzgz"); 64 64 public static final StringProperty BING_MAPS_KEY = 65 new StringProperty("streetside.bing-maps-key", System.getProperty("AuftgJsO0Xs8Ts4M1xZUQJQXJNsvmh3IV8DkNieCiy3tCwCUMq76-WpkrBtNAuEm"));65 new StringProperty("streetside.bing-maps-key", "AuftgJsO0Xs8Ts4M1xZUQJQXJNsvmh3IV8DkNieCiy3tCwCUMq76-WpkrBtNAuEm"); 66 66 public static final StringProperty TEST_BUBBLE_ID = 67 new StringProperty("streetside.test-bubble-id", System.getProperty("80848005"));67 new StringProperty("streetside.test-bubble-id", "80848005"); 68 68 69 69 /** -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/utils/StreetsideURL.java
r34428 r34431 43 43 44 44 public static URL searchStreetsideImages(Bounds bounds) { 45 return StreetsideURL.string2URL(StreetsideURL.STREETSIDE_BASE_URL, APIv3.queryStreetsideString(bounds));46 }47 48 public static URL searchStreetsideSequences(final Bounds bounds) {49 45 return StreetsideURL.string2URL(StreetsideURL.STREETSIDE_BASE_URL, APIv3.queryStreetsideString(bounds)); 50 46 } … … 299 295 } 300 296 301 if(StreetsideProperties.DEBUGING_ENABLED.get()) {302 logger.debug(MessageFormat.format("queryStreetsideBoundsString result: {0}", ret.toString()));303 }304 305 297 return ret.toString(); 306 298 } -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/utils/StreetsideUtils.java
r34385 r34431 8 8 import java.text.ParseException; 9 9 import java.text.SimpleDateFormat; 10 import java.util.ArrayList;11 10 import java.util.Calendar; 12 import java.util.Iterator;13 import java.util.List;14 11 import java.util.Locale; 15 12 import java.util.Set; … … 19 16 import org.apache.commons.imaging.common.RationalNumber; 20 17 import org.apache.commons.imaging.formats.tiff.constants.GpsTagConstants; 18 import org.apache.log4j.Logger; 21 19 import org.openstreetmap.josm.data.Bounds; 22 20 import org.openstreetmap.josm.data.coor.LatLon; … … 33 31 */ 34 32 public final class StreetsideUtils { 33 34 final static Logger logger = Logger.getLogger(StreetsideUtils.class); 35 35 36 36 private static final double MIN_ZOOM_SQUARE_SIDE = 0.002; … … 285 285 MainApplication.getMap().statusLine.setHelpText(ret.toString()); 286 286 } 287 288 public static List<StreetsideAbstractImage> sortImagesInSequence(List<StreetsideAbstractImage> images) {289 List<StreetsideAbstractImage> res = new ArrayList<StreetsideAbstractImage>();290 if (images != null && images.size() > 0) {291 res.add(images.get(0));292 try {293 images.remove(0);294 String nextImageId = Long.toString(images.get(0).getNe());295 if (nextImageId != null) {296 Iterator<StreetsideAbstractImage> iter = images.iterator();297 while (iter.hasNext()) {298 StreetsideAbstractImage current = (StreetsideAbstractImage) iter.next();299 if (nextImageId.equals(current.getId())) {300 res.add(current);301 images.remove(current);302 }303 }304 }305 } catch (java.lang.UnsupportedOperationException uoe) {306 // ignore307 }308 }309 310 return res;311 }312 287 }
Note:
See TracChangeset
for help on using the changeset viewer.