Bug 1038 - [ka-Map] panning problems in mozilla at large scales
: [ka-Map] panning problems in mozilla at large scales
Status: RESOLVED FIXED
: ka-Map
core
: 0.1
: PC All
: P1 critical
: ---
Assigned To:
:
:
:
:
: 1036
  Show dependency treegraph
 
Reported: 2005-05-17 16:07 by
Modified: 2005-05-23 21:04 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2005-05-17 16:07:39
Problem: at large scales (1:1000 for instance) in Mozilla-based browsers, the
map becomes 'sticky' and won't pan properly in the horizontal and/or vertical
dimension.  It seems dependent on the map file.

Analysis: ka-Map uses some simple math to determine pixel locations by assuming
they are relative to the origin of the projection.  In theory, this should be
fine as browsers support very large numbers in javascript.  These pixel offsets
are used to absolutely position the images in a div that is then offset by an
opposite amount to make the image visible.  This works great for pixel locations
up to 1 million.  After this, the style object in mozilla converts the numbers
to scientific notation with a fixed number of decimal places, effectively
rounding or truncating the numbers.  The result is that between 1 million and 10
million in pixel coordinates, the style object rounds the last digit.  Between
10 million and 100 million, it rounds two places ... meaning that a single mouse
event must cover 100 pixels to trigger movement.

Solution: convert all calculations to a floating origin so that image offsets
never get very large.  Unfortunately, this will affect loads of code.
------- Comment #1 From 2005-05-17 16:54:35 -------
This article seems to cover the ins-and-outs of js number representation quite
thoroughly:

http://www.devx.com/webdev/Article/17215/0/page/1
------- Comment #2 From 2005-05-18 22:20:39 -------
implemented in dmti interface, seems to solve the zooming issue plus the related
issue in 1036 for IE ... plus a rendering problem noted by Zak where numerous
php processes get generated, browser freezes, but no tiles arrive.
------- Comment #3 From 2005-05-18 22:22:13 -------
*** Bug 1036 has been marked as a duplicate of this bug. ***
------- Comment #4 From 2005-05-19 08:59:26 -------
I have verified this on Firefox 1.0.4 and Safari 1.3 on the mac and it fixes
all the problems I was seeing.
------- Comment #5 From 2005-05-23 21:04:01 -------
code ported to CVS HEAD.  Marking as fixed.