Ignore:
Timestamp:
2015-06-24T20:57:43+02:00 (9 years ago)
Author:
wiktorn
Message:

Introduce WMS layer based on TMS. (closes: #11255)

HEADS UP: After this patch you need to manually remove JAX-B generated file/class: org/w3/_2001/xmlschema/Adapter1.java to compile the tree again.

  • create AbstractTileSourceLayer based on TMSLayer as a base for TMS, WMS and (future) WMTS layers, (addresses #11459)
  • WMS layer now uses JCS Caching (closes: #7363)
  • introduce new conversion methods in TileSource, that convert both X and Y (lat and lon) in one call. This is necessary for other than PseudoMercator projections
    • introduce TileXY class that represents X and Y indexes of tile in tile matrix/space
    • mark old conversion methods as deprecated
    • refactor JMapViewer and JOSM to new methods
    • change use of Coordinate class to ICoordinate where appropiate
  • extract CachedAttributionBingAerialTileSource to separate file
  • create TemplatedWMSTileSource that provides the WMS Layer with square (according to current projection) tiles (closes: #11572, closes: #7682, addresses: #5454)
  • implemented precaching imagery along GPX track for AbstractTileSourceLayer, so now it work for both - WMS and TMS (closes: #9154)
  • implemented common righ-click menu on map view, as well on layer list (closes #3591)
  • create separate build commands for JMapViewer classes to easily spot, when josm classes are used within JMapViewer
  • remove unnecessary classes of previous WMS implementation - GeorefImage, wms-cache.xsd (and JAXB task from build), WMSCache, WMSRequest, WMSGrabber, HTMLGrabber, WMSException
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java

    r8513 r8526  
    193193            }
    194194            // object not in cache, so submit work to separate thread
    195             getDownloadExecutor().execute(this);
     195            downloadJobExecutor.execute(this);
    196196        }
    197197    }
     
    230230    protected String getServerKey() {
    231231        return getUrl().getHost();
    232     }
    233 
    234     /**
    235      * this needs to be non-static, so it can be overridden by subclasses
    236      */
    237     protected ThreadPoolExecutor getDownloadExecutor() {
    238         return downloadJobExecutor;
    239232    }
    240233
     
    506499     */
    507500    public void cancelOutstandingTasks() {
    508         ThreadPoolExecutor downloadExecutor = getDownloadExecutor();
    509         for (Runnable r: downloadExecutor.getQueue()) {
    510             if (downloadExecutor.remove(r)) {
    511                 if (r instanceof JCSCachedTileLoaderJob) {
    512                     ((JCSCachedTileLoaderJob<?, ?>) r).handleJobCancellation();
    513                 }
     501        for(Runnable r: downloadJobExecutor.getQueue()) {
     502            if (downloadJobExecutor.remove(r) && r instanceof JCSCachedTileLoaderJob) {
     503                ((JCSCachedTileLoaderJob<?, ?>) r).handleJobCancellation();
    514504            }
    515505        }
Note: See TracChangeset for help on using the changeset viewer.