OpenLayers OpenLayers

Changeset 6798 for sandbox/achipa

Show
Ignore:
Timestamp:
04/06/08 19:06:20 (9 months ago)
Author:
achipa
Message:

pubDate casing, more georss attributes propagated

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/achipa/openlayers/lib/OpenLayers/Format/GeoRSS.js

    r6180 r6798  
    186186        ); 
    187187 
    188         var pubdate = this.getChildValue(item, "*", "pubDate"); 
     188        var pubDate = this.getChildValue(item, "*", "pubDate"); 
    189189 
    190190        /* If no link URL is found in the first child node, try the 
     
    205205            "description": description, 
    206206            "link": link, 
    207         "pubdate": pubdate 
     207        "pubDate": pubDate 
    208208        }; 
    209209        var feature = new OpenLayers.Feature.Vector(geometry, data); 
  • sandbox/achipa/openlayers/lib/OpenLayers/Layer/GeoRSS.js

    r6180 r6798  
    190190                             new OpenLayers.Size(250, 120); 
    191191             
    192             data.pubdate = feature.attributes.pubdate; 
     192            data.pubDate = feature.attributes.pubDate; 
     193            data.link = feature.attributes.link; 
     194            data.title = feature.attributes.title; 
     195            data.description = feature.attributes.description; 
    193196 
    194197            if (title || description) { 
  • sandbox/achipa/openlayers/lib/OpenLayers/Layer/TimedPointTrack.js

    r6561 r6798  
    135135     * begins with the date found on the earliest feature, and ends with the 
    136136     * date found on the latest feature. The property name to use for the dates 
    137      * is specified in the attrname parameter and is "pubdate" by default 
     137     * is specified in the attrname parameter and is "pubDate" by default 
    138138     *  
    139139     * Parameters: 
     
    145145        var end = null; 
    146146        var attr = attrname; 
    147         if (!attr) attr = "pubdate"; 
     147        if (!attr) attr = "pubDate"; 
    148148        for(var i = 0; i < this.features.length; i++) { 
    149             if (this.features[i].attributes["pubdate"]) { 
    150                 pubdate = OpenLayers.Date.smartParse(this.features[i].attributes[attr]); 
    151                 if (pubdate <= begin || !begin) 
    152                     begin = pubdate; 
    153                 if (pubdate >= end || !end) 
    154                     end = pubdate; 
     149            if (this.features[i].attributes["pubDate"]) { 
     150                pubDate = OpenLayers.Date.smartParse(this.features[i].attributes[attr]); 
     151                if (pubDate <= begin || !begin) 
     152                    begin = pubDate; 
     153                if (pubDate >= end || !end) 
     154                    end = pubDate; 
    155155            } 
    156156        } 
     
    185185 
    186186        if (pointFeature.data) 
    187             pubDate = OpenLayers.Date.smartParse(pointFeature.data["pubdate"]); 
     187            pubDate = OpenLayers.Date.smartParse(pointFeature.data["pubDate"]); 
    188188        else if (pointFeature.attributes) 
    189             pubDate = OpenLayers.Date.smartParse(pointFeature.attributes["pubdate"]); 
     189            pubDate = OpenLayers.Date.smartParse(pointFeature.attributes["pubDate"]); 
    190190             
    191191            if (!endPoint) { 
     
    207207                         
    208208                lines[i-1] = new OpenLayers.Feature.Vector(line, attributes); 
    209         if (attributes["pubdate"]) { 
     209        if (attributes["pubDate"]) { 
    210210                lines[i-1].dateTime = new Date(prevDate); 
    211211                    lines[i-1].dateTime.duration = pubDate-prevDate;