Hi Colin,

thanks for your long reply and for keeping this thread alive *g*

Anyways, I already responded to Andre, telling him, that his example is based on the J2D-renderer. Unfortunately, I only responded to him (the stupid response-setting at this mailing list. I already suggested to change it, but there was no big echo on that suggestion) and forgot to respond to the mailing list (I did that now), so I already recognised, that his was not the thing I needed.

The next thing you mentioned was, that with the LiteRenderer, it passes things on to an AffineTransform, which is, on it's part, passed to the LiteRenderer. I took another close look to the "How to render a shapefile, ..."-snippet, you recommended me, and: yes! There is an AffineTransform that seems to handle the area that is being rendered, so I'll be playing around a bit with that transform-thing.

The only problem I think, that will occur is, that the area is only changed on the screen, when re-rendering it. So I guess it's not even POSSIBLE to do the pan-method I want, with LiteRenderer? That would definitely be NOT good :(

I also fully agree to Rizzi's statement. But maybe some geotools-newbies like me start asking annoying questions and then develop these simple things, that are actually needed by the majority of the people ;)

Combe, Colin wrote:

Hi Bernhard,
First of all, I have to say that I haven't been keeping up with geotools
development and so I'm a bit hesitant about giving advice. But as I
understand it this is where things have gone wrong for you...

Earlier in this thread it was suggested that "areaOfInterest" in
MapContext refers to the area being displayed - I not sure this is true
(I think it could just be the default area that's displayed when you
start the application or click a 'home' type button). If you look at the
pan/zoom example mentioned below it doesn't use
mapContext.setAreaOfInterest(my_envelope), it creates an AffineTransform
and passes it to the renderer's paint method.

Also, I think the example code Andre has sent you isn't going to help
because it is based on using a different renderer. I think you're code
is based on LiteRenderer and Andre's is based on StyledMapPane - which
is in the org.geotools.gui.swing package and has now been moved to the
migrate module (i.e. it isn't really supported anymore). If you were
using StyledMapPane (or it's super class ZoomPane) you would find it
already contained most/all of the functionality you are looking for.
People will be bored of hearing this, but it brings us back to a
recurring subject on the list, to quote P.Rizzi:

"what most people actually wants (and I join them)
is a plain and simple StyledMapPane-like UI component that they can
embed
inside whatever Java application or applet they're writing.

uDig is wonderful, but it's far too much for the vast majority of
users."

This is the basis of the geowidgets project but I'm not sure how far
it's progressed (or where to find more info in it). Martin has also
mentioned revitalising StyledMapPane, either as part of geotools or part
of geowidgets (I'm not sure which). Actually, it was because my project
was sort of commited to the j2d renderer (the basis of StyledMapPane)
that I stopped updating my geotools code base. Of course, I'd be willing
to help develop 'geowidgets' - there's no point just moaning about
things and expecting other people to sort them out for you :-)

colin


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to