I've done what you told me but it doesn't change the scale... it's always Promiscuous...
Have you got another idea?
-----Message d'origine-----
De : Martin Desruisseaux [mailto:[EMAIL PROTECTED]]
Envoyé : jeudi 15 septembre 2005 11:40
À : Virginie BERRE
Cc : [email protected]
Objet : Re: TR: [Geotools-gt2-users] Problem with RenderedMapScale
Virginie BERRE a écrit :
> Is the right solution:
> - xmin,ymin= {0,0} and xmax,ymax={width,height}
> Or
> - xmin,ymin={-180,-90} and xmax,ymax={180,90} ??
Oups! Sorry. I mean the second one:
- xmin,ymin={-180,-90} and xmax,ymax={180,90} ??
*If* yours raster really cover the whole world.
> The last proposition is the same as mapPane. getVisibleArea()...
It may be the same by coincidence, but we should not rely on it. The
VisibleArea is highly volatile and change every time the user zoom.
If yours map cover the whole world, then there is an aspect to take in
account. The MapScale should be accurate at the location where it is
drawn. This means that if yours image cover the whole world, and if the
map scale is drawn near the south pole, then the distance will appears
completly different from the one we would expect at the equator for
example. Try to scroll down until the MapScale is drawn on top of the
equator. You should see the MapScale length change as you scroll. Try to
zoom too; the deformation become less important with closer zooms.
Martin.
