[ka-Map-dev] [Bug 2160] New: metaLeft and metaTop in Tile.php
bugzilla-daemon at bugzilla.maptools.org
bugzilla-daemon at bugzilla.maptools.org
Wed Feb 17 08:49:17 EST 2010
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: ka-map-dev at lists.maptools.org
ReportedBy: quitomorales at gmail.com
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.
More information about the ka-Map-dev
mailing list