Changeset 1553 in osm for utils/josm/plugins/landsat/src/landsat/LandsatLayer.java
- Timestamp:
- 2006-11-07T23:33:22+01:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
utils/josm/plugins/landsat/src/landsat/LandsatLayer.java
r1443 r1553 7 7 import java.awt.Toolkit; 8 8 import java.io.IOException; 9 import java.util.ArrayList; 9 10 10 11 import javax.swing.Icon; … … 20 21 import org.openstreetmap.josm.gui.dialogs.LayerListPopup; 21 22 import org.openstreetmap.josm.gui.layer.Layer; 23 import org.openstreetmap.josm.data.coor.EastNorth; 22 24 23 25 /** … … 29 31 private static Icon icon = new ImageIcon(Toolkit.getDefaultToolkit().createImage(LandsatPlugin.class.getResource("/images/wms.png"))); 30 32 31 private final LandsatImage landsatImage; 33 private final ArrayList<LandsatImage> landsatImages; 32 34 33 35 private final String url; … … 47 49 48 50 this.url = url; 49 landsatImage = new LandsatImage(url); 51 //landsatImage = new LandsatImage(url); 52 landsatImages = new ArrayList<LandsatImage>(); 50 53 } 51 54 … … 53 56 { 54 57 MapView mv = Main.map.mapView; 58 LandsatImage landsatImage = new LandsatImage(url); 55 59 landsatImage.grab(mv); 60 landsatImages.add(landsatImage); 56 61 } 57 62 … … 60 65 { 61 66 MapView mv = Main.map.mapView; 67 LandsatImage landsatImage = new LandsatImage(url); 62 68 landsatImage.grab(mv,minlat,minlon,maxlat,maxlon); 69 landsatImages.add(landsatImage); 63 70 } 64 71 … … 79 86 80 87 @Override public void paint(Graphics g, final MapView mv) { 81 landsatImage.paint(g,mv); 88 for(LandsatImage landsatImage : landsatImages) { 89 landsatImage.paint(g,mv); 90 } 82 91 } 83 92 … … 97 106 new JMenuItem(new LayerListPopup.InfoAction(this))}; 98 107 } 108 109 public LandsatImage findImage(EastNorth eastNorth) 110 { 111 for(LandsatImage landsatImage : landsatImages) { 112 if (landsatImage.contains(eastNorth)) { 113 return landsatImage; 114 } 115 } 116 return null; 117 } 99 118 }
Note:
See TracChangeset
for help on using the changeset viewer.