Changeset 22929 in osm for applications/editors/josm


Ignore:
Timestamp:
2010-09-01T20:45:20+02:00 (14 years ago)
Author:
jttt
Message:

Fix #5400 WMS plugin change it's zoom level

Location:
applications/editors/josm/plugins/wmsplugin/src/wmsplugin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/wmsplugin/src/wmsplugin/GeorefImage.java

    r22854 r22929  
    9999
    100100        private BufferedImage createImage() {
    101                 return new BufferedImage(layer.getImageWidth(xIndex), layer.getImageHeight(yIndex), BufferedImage.TYPE_INT_RGB);
     101                return new BufferedImage(layer.getBaseImageWidth(), layer.getBaseImageHeight(), BufferedImage.TYPE_INT_RGB);
    102102        }
    103103
     
    217217                return yIndex;
    218218        }
    219        
     219
    220220        public void setLayer(WMSLayer layer) {
    221             this.layer = layer;
     221                this.layer = layer;
    222222        }
    223223}
  • applications/editors/josm/plugins/wmsplugin/src/wmsplugin/Grabber.java

    r22794 r22929  
    5252
    5353        int width(){
    54                 return layer.getImageWidth(request.getXIndex());
     54                return layer.getBaseImageWidth();
    5555        }
    5656        int height(){
    57                 return layer.getImageHeight(request.getYIndex());
     57                return layer.getBaseImageHeight();
    5858        }
    5959
  • applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSLayer.java

    r22902 r22929  
    297297        /**
    298298         *
     299         * @return Size of image in original zoom
     300         */
     301        public int getBaseImageWidth() {
     302                int overlap = (WMSPlugin.PROP_OVERLAP.get()?WMSPlugin.PROP_OVERLAP_EAST.get() * imageSize / 100:0);
     303                return imageSize + overlap;
     304        }
     305
     306        /**
     307         *
     308         * @return Size of image in original zoom
     309         */
     310        public int getBaseImageHeight() {
     311                int overlap = (WMSPlugin.PROP_OVERLAP.get()?WMSPlugin.PROP_OVERLAP_NORTH.get() * imageSize / 100:0);
     312                return imageSize + overlap;
     313        }
     314
     315
     316        /**
     317         *
    299318         * @param xIndex
    300319         * @param yIndex
Note: See TracChangeset for help on using the changeset viewer.