|
From: Ian T. <ian...@us...> - 2001-12-03 14:23:15
|
Update of /cvsroot/geotools/geotools/src/uk/ac/leeds/ccg/geotools
In directory usw-pr-cvs1:/tmp/cvs-serv20868/uk/ac/leeds/ccg/geotools
Modified Files:
MultiLayer.java
Log Message:
added getIDs method
Index: MultiLayer.java
===================================================================
RCS file: /cvsroot/geotools/geotools/src/uk/ac/leeds/ccg/geotools/MultiLayer.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -w -C2 -d -r1.14 -r1.15
*** MultiLayer.java 2001/11/30 01:48:57 1.14
--- MultiLayer.java 2001/12/03 14:23:12 1.15
***************
*** 14,18 ****
static boolean DEBUG=false;
static String DBC="ML->";
! Vector layers = new Vector();
GeoRectangle bounds = new GeoRectangle();
--- 14,18 ----
static boolean DEBUG=false;
static String DBC="ML->";
! public Vector layers = new Vector();
GeoRectangle bounds = new GeoRectangle();
***************
*** 20,24 ****
}
public void clearLayers(boolean quite){
! layers= new Vector();
if(!quite) notifyLayerChangedListeners(LayerChangedEvent.DATA);
}
--- 20,25 ----
}
public void clearLayers(boolean quite){
! //layers= new Vector();
! layers.clear();
if(!quite) notifyLayerChangedListeners(LayerChangedEvent.DATA);
}
***************
*** 160,163 ****
--- 161,178 ----
return null;
}
+ public int[] getIDs(GeoRectangle box,int mode){
+ int [] ids=new int[0];
+ int [] tmp=new int[0];
+ for(int i=0;i<layers.size();i++){
+ int [] id=((Layer)layers.elementAt(i)).getIDs(box,mode);
+ tmp=ids;
+ ids=new int[id.length+ids.length];
+ System.arraycopy(tmp,0,ids,0,tmp.length);
+ System.arraycopy(id,0,ids,tmp.length,id.length);
+
+ }
+ return ids;
+
+ }
}
|