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