[Mapbender-dev] Strange IE8 error: "Anzahl der Bruchstellen ..."

Michael Schulz mschulz at webgis.de
Fri Jan 15 07:38:46 EST 2010

Hi Devs,

yesterday i noticed a strange IE8 script error, that sometimes occurs
when the function convertPixelToReal in map_obj.js is is called:
"Die Anzahl der Bruchstellen befindet sich außerhalb des gültigen Bereichs."

I wonder if this is special to the customized application i'm using or
if others can reproduce this error (Mapbender 2.6.1). Activated
debugging shows the following:

This is the line where the error happens:
return new Point(posX.toFixed(-digitsX), posY.toFixed(-digitsY));

the error occurs, when the value of digitsX is positive and thus is
turned into a neagtive value through "-". If I understand it correctly
the value of digitsX is dependant on the scale, but usually the value
is > 0 (unless you have a pretty small scaledenom).

toFixed should actually turn a Number into a string with the specified
number of digits after the decimal point, eventually rounded or filled
up with "0"s. In FF I noticed a rather strange behaviour also: FF
throws no error when giving toFixed a negative value, it rounds the
value on the digits before the decimal point:

<script type="text/javascript">
var n = new Number(352834.120912);


IE8 throws the described error on the last line of this test script.

Update: I just found that this code was introduced rather recently,
wrt ticket http://trac.osgeo.org/mapbender/ticket/557.

Thx for any thoughts ...

Cheers, Michael

Aufwind durch Wissen!

Qualifizierte Open Source Schulungen bei der

Michael Schulz
mschulz at webgis.de

in medias res
Gesellschaft für Informationstechnologie mbH

+++ Bitte beachten Sie unsere neue Adresse und Durchwahl +++

Schwimmbadstraße 2
D-79100  Freiburg i. Br.

Tel:  +49 (0)761 705798-102
Tel:  +49 (0)761 705798-0
Fax: +49 (0)761 705798-09

+++ Bitte beachten Sie unsere neue Adresse und Durchwahl +++

http://www.webgis.de / http://www.zopecms.de
Geschäftsführer: Stefan Giese, Dr. Christof Lindenbeck
Eingetragen im Handelsregister HRB 5930 beim Amtsgericht Freiburg

More information about the Mapbender_dev mailing list