[ka-Map-dev] [Bug 1307] New: Error when the base layer is not visible on certain scales...

bugzilla-daemon at bugzilla.maptools.org bugzilla-daemon at bugzilla.maptools.org
Mon Feb 27 12:01:51 EST 2006


           Summary: Error when the base layer is not visible on certain
           Product: ka-Map
           Version: 0.2
          Platform: PC
        OS/Version: Windows 2000
            Status: NEW
          Severity: normal
          Priority: P2
         Component: core
        AssignedTo: ka-map-dev at lists.maptools.org
        ReportedBy: pieter.roggemans at ewbl.vlaanderen.be

A javascript error (nullpointer) occurs if the base layer (index 0 in array) 
isn't visible at all scales.

The error occurs in kamap.js, line 1442.

Here is a possible bugfix.  I am not sure if this is the ideal bugfix... but it 
works (for me).

 * internal function to check if images need to be wrapped
kaMap.prototype.checkWrap = function()

    this.xOffset = safeParseInt(this.theInsideLayer.style.left) + 
this.nCurrentLeft - this.xOrigin;
    this.yOffset = safeParseInt(this.theInsideLayer.style.top) + 
this.nCurrentTop - this.yOrigin;

    while (this.xOffset > 0)
    while (this.xOffset < -(this.nBuffer*this.tileWidth))
    while (this.yOffset > -(this.nBuffer*this.tileHeight))
    while (this.yOffset < -(2*this.nBuffer*this.tileHeight))
    /* BUGFIX by PIEROG */
   	var layers = this.aMaps[this.currentMap].getLayers();
	if(layers != null)
		var img = layers[0].domObj.childNodes[0].style;
	    this.nCurrentTop = safeParseInt(img.top) + this.yOrigin;
		this.nCurrentLeft = safeParseInt(img.left) + this.xOrigin;

------- 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