I have the following problem :
I am creating a new map, with a DefaultMapContext, and I want the user to
create new features by clicking in the map.
To do this, I create a new layer with no datas in, with theses steps :
sensorSites = new MemoryDataStore();
try{
sensorSites.createSchema(MSS_SensorSite.getSensorSiteType());
}catch(IOException ioe){
ioe.printStackTrace();
}
try{
fsSites = sensorSites.getFeatures(MSS_SensorSite.getSensorSiteType()); //
Of course, there is no features in...!
}catch(IOException ioe){
ioe.printStackTrace();
}
sensorSiteLayer = new DefaultMapLayer(fsSites, getSensorSiteLayerStyle());
sensorSiteLayer.setTitle("Sensor sites");
My problem is actually, my Map has no area. So when I clic in, I get no valid
coordinate... so how can I specify the bounds of an empty layer, to put it next
in the context ?
Or how can I specify the bounds of my map, without inserting any layer ? (I
tried to use : map.setMapArea(new Envelope(coord1, coord2)), but it is not
working until I put a first layer in the context...
Thanks in advance,
Anaxa
_________________________________________________________________
Comme 9 millions de français, créez un compte Hotmail !
http://www.windowslive.fr/hotmail/default.asp-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users