OpenLayers OpenLayers

Changeset 7058

Show
Ignore:
Timestamp:
05/02/08 19:15:00 (4 months ago)
Author:
edgemaster
Message:

Fix creation of point features, fix typo, add tests.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/edgemaster/openlayers/lib/OpenLayers/Format/GPX.js

    r6971 r7058  
    88 * @requires OpenLayers/Geometry/Point.js 
    99 * @requires OpenLayers/Geometry/LineString.js 
    10  * @requires OpenLayers/Geometry/Polygon.js 
    1110 * 
    1211 * Class: OpenLayers.Format.GPX 
     
    6160        var waypoints = doc.getElementsByTagName("wpt"); 
    6261        for (var l = 0; l < waypoints.length; l++) { 
    63             features.push(new OpenLayers.Geometry.Point(waypoints[i].getAttribute("lon"), waypoints[l].getAttribute("lat"))); 
     62            features.push(new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(waypoints[l].getAttribute("lon"), waypoints[l].getAttribute("lat")))); 
    6463        } 
    6564         
     
    7372        return features; 
    7473    }, 
     74     
    7575    extractSegment: function(segment, segmentType) { 
    7676        var points = this.getElementsByTagNameNS(segment, segment.namespaceURI, segmentType); 
  • sandbox/edgemaster/openlayers/tests/list-tests.html

    r6832 r7058  
    2727    <li>Format/GeoRSS.html</li> 
    2828    <li>Format/GML.html</li> 
     29    <li>Format/GPX.html</li> 
    2930    <li>Format/JSON.html</li> 
    3031    <li>Format/OSM.html</li>