Hi Jody,

I'm not sure if we're exactly in sync. My point was just that the
required changes to JMapPane have not yet been done (nor the changes
in the render module which need to be done first) so if Gustavo is
querying the map pane for scale I think it's safest to do it as per
the javadocs.

As for the development work, I'll catch up with you on IRC to make
sure I'm up to date with all that needs doing and the best way to do
it. Sorry that didn't happen last week - paid work intervened :(

Michael

On 1 June 2011 13:51, Jody Garnett <[email protected]> wrote:
> That is right we were going to start taking the affine transform into the
> viewport model (so you can externalize all the logic into one class).
> So your example is kind of correct:
> double scale = mapPane.getWorldToScreenTransform().getScaleX();
> We should probably combine this with the MathTransform from the viewport in
> order to get the actual scale?
>
> On Wed, Jun 1, 2011 at 11:51 AM, Michael Bedward <[email protected]>
> wrote:
>>
>> Hello Gustavo, Jody,
>>
>> I hope this isn't complicating things, but I'm not sure whether Jody's
>> answer applies to JMapPane right now because it isn't explicitly using
>> the new MapContent and MapViewport classes yet. Rather, it is still
>> calculating its own AffineTransforms to convert between map and
>> display coordinates. So at the moment it might be safer to retrieve
>> the scale as described in the javadocs for JMapPane...
>>
>>
>> http://docs.geotools.org/stable/javadocs/org/geotools/swing/JMapPane.html#getWorldToScreenTransform()
>>
>> Jody - please correct me if I'm wrong here.
>>
>> Michael
>>
>>
>> On 1 June 2011 00:07, Jody Garnett <[email protected]> wrote:
>> > Usually in GIS apps this is known as the scale; and represented as the
>> > "scale denominator". If you think of an exact picture as 1:1, and a half
>> > sized picture as 1:2 (the scale denominator is 2) you can see that this
>> > number gets bigger as you zoom out.
>> > All the information on what area of the world to display is in the
>> > Viewport
>> > now; you should be able to use that class; and the class ScaleUtils to
>> > calculate the current map scale.
>> >
>> > --
>> > Jody Garnett
>> >
>> > On Tuesday, 31 May 2011 at 11:48 PM, Gustavo Mesquita wrote:
>> >
>> > Hi guys,
>> >
>> > I need to show features on the map depending of the zoom level. I saw
>> > some
>> > codes from older versions of JMapPane class and there was a method
>> > getZoomFactor() but in the current version of this class doesn't have
>> > this
>> > method. How can I get the zoom factor, to know the current zoom on the
>> > map
>> > to show more or less features depending of the zoom over the map.
>> >
>> > Gustavo Mesquita.
>> >
>> > -----
>> > Gustavo Mesquita da Silva.
>> > Brazilian Navy Hydrographic Center
>> > NiterĂ³i, Rio de Janeiro - Brazil
>> > --
>> > View this message in context:
>> >
>> > http://osgeo-org.1803224.n2.nabble.com/Zoom-Factor-tp6422768p6422768.html
>> > Sent from the geotools-gt2-users mailing list archive at Nabble.com.
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > Simplify data backup and recovery for your virtual environment with
>> > vRanger.
>> > Installation's a snap, and flexible recovery options mean your data is
>> > safe,
>> > secure and there when you need it. Data protection magic?
>> > Nope - It's vRanger. Get your free trial download today.
>> > http://p.sf.net/sfu/quest-sfdev2dev
>> > _______________________________________________
>> > Geotools-gt2-users mailing list
>> > [email protected]
>> > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>> >
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > Simplify data backup and recovery for your virtual environment with
>> > vRanger.
>> > Installation's a snap, and flexible recovery options mean your data is
>> > safe,
>> > secure and there when you need it. Data protection magic?
>> > Nope - It's vRanger. Get your free trial download today.
>> > http://p.sf.net/sfu/quest-sfdev2dev
>> > _______________________________________________
>> > Geotools-gt2-users mailing list
>> > [email protected]
>> > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>> >
>> >
>
>

------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger. 
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today. 
http://p.sf.net/sfu/quest-sfdev2dev
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to