Thanks Simone. I appreciate the help. I'll just wait until you release 
the code to try it again. In the meantime, I'll take care of that 
DefaultMapContext.

Best regards,

Amy


Simone Giannecchini wrote:
> Ciao Amy,
> I ran your code with svn code for 2.3.x and it works fine. I think the
> bug you are seeing was already fixed. Thx anyway for your code, I will
> try to incorporate it as a test case.
>
> A suggestion, in your case the fofllowing code would have been cleaner
> (no warnings)
>
> mapContext = new DefaultMapContext(DefaultGeographicCRS.WGS84);
>             mapContext.addLayer(featureSource, aStyle);
>             mapArea = mapContext.getAreaOfInterest();
>             renderer = new StreamingRenderer();
>             renderer.setContext(mapContext);
>
>             RenderingHints hints = new RenderingHints(
>                     RenderingHints.KEY_ANTIALIASING,
>                     RenderingHints.VALUE_ANTIALIAS_ON);
>             renderer.setJava2DHints(hints);
>
> Ina few words, it is preferred to set the CRS of the MapContetx.
>
> Ciao,
> Simone.
>
> On 12/1/06, Amy Johnson <[EMAIL PROTECTED]> wrote:
>> Simone,
>>
>> I am attaching a test case for you. Before you spend too much time, I
>> did notice as I was hacking away at my code that I left a deprecated
>> instantiation in:
>>
>>         mapContext = new DefaultMapContext();
>>
>> It's on line 113 of what I am sending you. If you think that might be
>> the cause, let me know and I'll get rid of it and test again. I know you
>> guys are trying to get 2.3.0 out, and I've got other things to do, so
>> this can wait.
>>
>> Best regards,
>>
>> Amy
>>
>>
>> Simone Giannecchini wrote:
>> > Ciao Amy,
>> >
>> > could you provide a self contained test-case (or something close to it
>> > :-) ) for me to have a look at? I am no able from the information you
>> > provide to provide a final statement on what is happening.
>> >
>> > Ciao,
>> > Simone.
>> >
>> > On 11/30/06, Amy Johnson <[EMAIL PROTECTED]> wrote:
>> >> I'm compiling with 2.3.x and I did a straight replacement of
>> >> ReferencedEnvelope for Envelope in
>> >> StreamingRenderer.paint(|java.awt.Graphics2D graphics,
>> >> java.awt.Rectangle paintArea,
>> >> com.vividsolutions.jts.geom.Envelope mapArea). I am now getting the
>> >> following error:
>> >>
>> >> Exception in thread "AWT-EventQueue-0"
>> >> java.lang.IllegalArgumentException: The provided envelope is 
>> outside the
>> >> source CRS definition area
>> >>    at
>> >> 
>> org.geotools.renderer.lite.RendererUtilities.calculateScale(RendererUtilities.java:500)
>>  
>>
>> >>
>> >>    at
>> >> 
>> org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:636)
>>  
>>
>> >>
>> >>    at
>> >> 
>> org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:419)
>>  
>>
>> >>
>> >>
>> >> Here is my code:
>> >>
>> >>         mapArea = mapContext.getAreaOfInterest();
>> >>            renderer = new StreamingRenderer();
>> >>          renderer.setContext(mapContext);
>> >>
>> >>          RenderingHints hints = new
>> >> RenderingHints(RenderingHints.KEY_ANTIALIASING,
>> >> RenderingHints.VALUE_ANTIALIAS_ON );
>> >>          renderer.setJava2DHints(hints);
>> >>
>> >>          Map rendererParams = new HashMap();
>> >>          rendererParams.put("optimizedDataLoadingEnabled",new
>> >> Boolean(true) );
>> >>
>> >>          renderer.paint(g2, paintArea, mapArea);
>> >>
>> >> I checked to see if mapArea was getting set correctly and it 
>> appears to
>> >> be. Am I doing something wrong? I'm not sure how to use
>> >> ReferencedEnvelope, but I thought it just extended the Envelope I was
>> >> using.  Any help is appreciated.
>> >>
>> >> Regards,
>> >>
>> >> Amy
>> >>
>> >> |
>> >>
>> >> 
>> ------------------------------------------------------------------------- 
>>
>> >>
>> >> Take Surveys. Earn Cash. Influence the Future of IT
>> >> Join SourceForge.net's Techsay panel and you'll get the chance to
>> >> share your
>> >> opinions on IT & business topics through brief surveys - and earn 
>> cash
>> >> 
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV 
>>
>> >>
>> >> _______________________________________________
>> >> Geotools-gt2-users mailing list
>> >> [email protected]
>> >> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>> >>
>> >
>> >
>>
>>
>>
>> ------------------------------------------------------------------------- 
>>
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to 
>> share your
>> opinions on IT & business topics through brief surveys - and earn cash
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV 
>>
>>
>> _______________________________________________
>> Geotools-gt2-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>>
>>
>>
>>
>
>


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to