[Bug 2160] New: metaLeft and metaTop in Tile.php

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 2160] New: metaLeft and metaTop in Tile.php

bugzilla-daemon (Bugzilla)-13
http://bugzilla.maptools.org/show_bug.cgi?id=2160

           Summary: metaLeft and metaTop in Tile.php
           Product: ka-Map
           Version: 1.0
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: major
          Priority: P2
         Component: core
        AssignedTo: [hidden email]
        ReportedBy: [hidden email]


Hi.
First, sorry for my english.

When tile.php is calculating the variable $metaLeft and $metaTop use the
function floor, but this function in PHP, use scientific notation, and the
script in kamap.js that calculate the same variable don't use scientific
notation.
For example

a=2400000
floor(a) in PHP 2.4E6
floor(a) in JS 2400000

so, when Kamap script search for the tile with top or left 2400000 is not found
because is recorded how 2.4E6.png

I add these lines to tile.php and tile_query.php after floor calculation

$metaLeft=number_format($metaLeft,0, '.', '');
$metaTop=number_format($metaTop,0, '.', '');

I hope you can understand.

Joaquin Morales

/* Calculate the metatile's top-left corner coordinates.
 * Include the $metaBuffer around the metatile to account for various
 * rendering issues happening around the edge of a map
 */
$metaLeft = floor( ($left)/($tileWidth*$metaWidth) ) * $tileWidth * $metaWidth;
$metaTop = floor( ($top)/($tileHeight*$metaHeight) ) * $tileHeight
*$metaHeight;

$metaLeft=number_format($metaLeft,0, '.', '');
$metaTop=number_format($metaTop,0, '.', '');

--
Configure bugmail: http://bugzilla.maptools.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
ka-Map-dev mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/ka-map-dev
Loading...