1. openscales-team
  2. Untitled project
  3. openscales
  4. Issues
Issue #438 resolved

MultiPoint componentsString function

Ossi Rönnberg
created an issue

There is a small glitch in MultiPoint class. In componentsString function. The for loop is pointing to object's length when it should use the one declared in the function. At the moment function will return string with first values and then rest are just nulls.

Orginal: https://bitbucket.org/gis/openscales/src/d780acfa1f7d/openscales-geometry/src/main/flex/org/openscales/geometry/MultiPoint.as#cl-127

Proposal: {{{

!ActionScript

    public function get componentsString():String {
        var length:uint = this.componentsLength;            
        var strings:Vector.<String> = new Vector.<String>(length);
        var realIndex:uint;

        for(var i:int = 0; i < length; ++i) {
            realIndex= i*2;
            strings[i]= this._components[realIndex] + ", " + this._components[realIndex+1];
        }
        return strings.join(",");
    }

}}}

Comments (4)

  1. Log in to comment