OpenLayers OpenLayers

Changeset 2899

Show
Ignore:
Timestamp:
03/26/07 16:55:32 (2 years ago)
Author:
sderle
Message:

Patch from fredj adds toString() method to Geometry.Linearring. Fixes #565. Thanks, Fred.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/lib/OpenLayers/BaseTypes.js

    r2861 r2899  
    2121            if (typeof arguments[i] == "function") { 
    2222                var mixin = arguments[i]; 
    23                 arguments[i] = new mixin(OpenLayers.Class.isPrototype)
     23                arguments[i] = mixin.prototype
    2424            } 
    2525            OpenLayers.Util.extend(proto, arguments[i]); 
  • trunk/openlayers/lib/OpenLayers/Geometry/LinearRing.js

    r2803 r2899  
    109109    }, 
    110110 
     111 
     112    /** 
     113     * @returns The coordinates components as a string 
     114     * @type String 
     115     */ 
     116    toString: function() { 
     117        return this.components.toString(); 
     118    }, 
     119 
    111120    /** @final @type String */ 
    112121    CLASS_NAME: "OpenLayers.Geometry.LinearRing" 
  • trunk/openlayers/tests/Geometry/test_LinearRing.html

    r2803 r2899  
    9191    } 
    9292 
     93    function test_05_LinearRing_toString(t) { 
     94        t.plan(1); 
     95         
     96        ring = new OpenLayers.Geometry.LinearRing(components); 
     97        t.eq( ring.toString(), components.toString() + ',' + components[0].toString(), "toString output is ok"); 
     98    } 
     99 
    93100  // --> 
    94101  </script>