The first Jody's answer give me an idea to how I should
write my code. His explanation about scale and scale 
denominator was enough. I did not need to use the class
ScaleUtils. Here goes a piece of my code:

private class MouseHandler extends AbstractZoomTool {

// other code here...
.
.
.

  int jump = 0;

  double currentScale =
getMapPane().getWorldToScreenTransform().getScaleX();
  double scaleWithZoom = currentScale * this.getZoom();

  double resultScale = (scaleWithZoom - currentScale);

  if (resultScale >= 1 && resultScale < 5)
      jump = 12;
  if (resultScale >= 5 && resultScale < 10)
      jump = 9;
  if (resultScale >= 10 && resultScale < 15)
      jump = 6;
  if (resultScale >= 15)
      jump = 3;
                
  createPointWithArrows(jump);

.
.
.

// More code here...

}

Into the method "createPointWithArrows(int jump)" I have a loop:

for (j = 1; j <= 733; j+=jump) {
   for (i = 1; i <= 601; i+=jump) {

and it place arrows based on the scale of 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-tp6422768p6426658.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

Reply via email to