Ignore:
Timestamp:
2018-07-22T02:40:13+02:00 (6 years ago)
Author:
renerr18
Message:

Added GraphicsUtils - had been moved but was unversioned.

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  
    2424  public static final IntegerProperty TILE_DOWNLOAD_THREAD_PAUSE_LEN_SEC = new IntegerProperty("streetside.tile-download-thread-pause-len-sec", 60);
    2525  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);
    2727  public static final BooleanProperty DOWNLOAD_CUBEFACE_TILES_TOGETHER = new BooleanProperty("streetside.download-cubeface-tiles-together", false);
    2828
     
    6161    new StringProperty("streetside.start-directory", System.getProperty("user.home"));
    6262  public static final StringProperty URL_CLIENT_ID =
    63     new StringProperty("streetside.url-clientid", System.getProperty("T1Fzd20xZjdtR0s1VDk5OFNIOXpYdzoxNDYyOGRkYzUyYTFiMzgz"));
     63    new StringProperty("streetside.url-clientid", "T1Fzd20xZjdtR0s1VDk5OFNIOXpYdzoxNDYyOGRkYzUyYTFiMzgz");
    6464  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");
    6666  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");
    6868
    6969  /**
  • applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/utils/StreetsideURL.java

    r34428 r34431  
    4343
    4444                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) {
    4945                        return StreetsideURL.string2URL(StreetsideURL.STREETSIDE_BASE_URL, APIv3.queryStreetsideString(bounds));
    5046                }
     
    299295                }
    300296
    301                 if(StreetsideProperties.DEBUGING_ENABLED.get()) {
    302                   logger.debug(MessageFormat.format("queryStreetsideBoundsString result: {0}", ret.toString()));
    303                 }
    304 
    305297                return ret.toString();
    306298        }
  • applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/utils/StreetsideUtils.java

    r34385 r34431  
    88import java.text.ParseException;
    99import java.text.SimpleDateFormat;
    10 import java.util.ArrayList;
    1110import java.util.Calendar;
    12 import java.util.Iterator;
    13 import java.util.List;
    1411import java.util.Locale;
    1512import java.util.Set;
     
    1916import org.apache.commons.imaging.common.RationalNumber;
    2017import org.apache.commons.imaging.formats.tiff.constants.GpsTagConstants;
     18import org.apache.log4j.Logger;
    2119import org.openstreetmap.josm.data.Bounds;
    2220import org.openstreetmap.josm.data.coor.LatLon;
     
    3331 */
    3432public final class StreetsideUtils {
     33
     34  final static Logger logger = Logger.getLogger(StreetsideUtils.class);
    3535
    3636  private static final double MIN_ZOOM_SQUARE_SIDE = 0.002;
     
    285285    MainApplication.getMap().statusLine.setHelpText(ret.toString());
    286286  }
    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         // ignore
    307       }
    308     }
    309 
    310     return res;
    311   }
    312287}
Note: See TracChangeset for help on using the changeset viewer.