As far as I know the bounds are only used to calculate the map scale. 
Have a look for a constructor where you set the MathTransform for the 
Map to use; then it won't need to check the data bounds?

As for you original question; subclass MemoryDataStore and override the 
getBounds( Query ) method to return a value you provide? There may 
already be a cached value which you can provide a setter for?
Jody
> 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
>
> ------------------------------------------------------------------------
> Téléchargez gratuitement Messenger 2008 
> <http://www.windowslive.fr/majmessenger.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
>   


-------------------------------------------------------------------------
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

Reply via email to