[ka-Map-dev] [Bug 1656] New: ZoomToExtents does not work properly for negative latitude

bugzilla-daemon at bugzilla.maptools.org bugzilla-daemon at bugzilla.maptools.org
Mon Feb 19 15:33:14 EST 2007


http://bugzilla.maptools.org/show_bug.cgi?id=1656

           Summary: ZoomToExtents does not work properly for negative
                    latitude
           Product: ka-Map
           Version: 1.0
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: core
        AssignedTo: ka-map-dev at lists.maptools.org
        ReportedBy: dave at smartrak.co.nz


Calling ZoomToExtents when viewing coordinates with negative latitude causes the
calculated tmpCellSizeY to be negative.
This means that only the width of the drawn zoom box is taken into account when
calculating the extents to zoom to.

Fix:
cvs diff: Diffing .
Index: kaMap.js
===================================================================
RCS file: /cvs/maptools/cvsroot/ka-map/htdocs/kaMap.js,v
retrieving revision 1.99
diff -r1.99 kaMap.js
379,380c379,380
<     var tmpCellSizeX = (maxx - minx)/this.viewportWidth;
<     var tmpCellSizeY = (maxy - miny)/this.viewportHeight;
---
>     var tmpCellSizeX = Math.abs((maxx - minx)/this.viewportWidth);
>     var tmpCellSizeY = Math.abs((maxy - miny)/this.viewportHeight);



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


Please do NOT reply to this email, use the link above instead to 
login to bugzilla and submit your comment. Any email reply to this
address will be lost.


More information about the ka-Map-dev mailing list