[ka-Map-dev] [Bug 1308] 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:02:51 EST 2006


http://bugzilla.maptools.org/show_bug.cgi?id=1308

           Summary: Error when the base layer is not visible on certain
                    scales...
           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)
    {
        this.wrapR2L();
    }
    while (this.xOffset < -(this.nBuffer*this.tileWidth))
    {
        this.wrapL2R();
    }
    while (this.yOffset > -(this.nBuffer*this.tileHeight))
    {
        this.wrapB2T();
    }
    while (this.yOffset < -(2*this.nBuffer*this.tileHeight))
    {
        this.wrapT2B();
    }
    
    /* 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