[ka-Map-users] kaXmlOverlay.js bug

Justin George justin.george at gmail.com
Tue Jun 6 18:19:11 EDT 2006


I just spent quite a while tracking this one down.

On line 558 in kaXmlOverlay.prototype.removePoint, there is a loop
which indexes over the contents of the overlay objects array. Each
time it removes an object. So the array must index from the length
down to zero, rather than the opposite.

Fix:
		for (var i=this.ovrObjects.length; i >= 0; i--) {

Instead of

		for (var i=0; i < this.ovrObjects.length; i++) {

Hope that helps everyone with the new overlays, they're working great for me.


More information about the ka-Map-users mailing list