Changeset 7058


Ignore:
Timestamp:
May 2, 2008 4:15:00 PM (8 years ago)
Author:
edgemaster
Message:

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

Location:
sandbox/edgemaster/openlayers
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • 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>
Note: See TracChangeset for help on using the changeset viewer.