Changeset 6798 for sandbox/achipa
- Timestamp:
- 04/06/08 19:06:20 (9 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
sandbox/achipa/openlayers/lib/OpenLayers/Format/GeoRSS.js
r6180 r6798 186 186 ); 187 187 188 var pub date = this.getChildValue(item, "*", "pubDate");188 var pubDate = this.getChildValue(item, "*", "pubDate"); 189 189 190 190 /* If no link URL is found in the first child node, try the … … 205 205 "description": description, 206 206 "link": link, 207 "pub date": pubdate207 "pubDate": pubDate 208 208 }; 209 209 var feature = new OpenLayers.Feature.Vector(geometry, data); sandbox/achipa/openlayers/lib/OpenLayers/Layer/GeoRSS.js
r6180 r6798 190 190 new OpenLayers.Size(250, 120); 191 191 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; 193 196 194 197 if (title || description) { sandbox/achipa/openlayers/lib/OpenLayers/Layer/TimedPointTrack.js
r6561 r6798 135 135 * begins with the date found on the earliest feature, and ends with the 136 136 * date found on the latest feature. The property name to use for the dates 137 * is specified in the attrname parameter and is "pub date" by default137 * is specified in the attrname parameter and is "pubDate" by default 138 138 * 139 139 * Parameters: … … 145 145 var end = null; 146 146 var attr = attrname; 147 if (!attr) attr = "pub date";147 if (!attr) attr = "pubDate"; 148 148 for(var i = 0; i < this.features.length; i++) { 149 if (this.features[i].attributes["pub date"]) {150 pub date = OpenLayers.Date.smartParse(this.features[i].attributes[attr]);151 if (pub date <= begin || !begin)152 begin = pub date;153 if (pub date >= end || !end)154 end = pub date;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; 155 155 } 156 156 } … … 185 185 186 186 if (pointFeature.data) 187 pubDate = OpenLayers.Date.smartParse(pointFeature.data["pub date"]);187 pubDate = OpenLayers.Date.smartParse(pointFeature.data["pubDate"]); 188 188 else if (pointFeature.attributes) 189 pubDate = OpenLayers.Date.smartParse(pointFeature.attributes["pub date"]);189 pubDate = OpenLayers.Date.smartParse(pointFeature.attributes["pubDate"]); 190 190 191 191 if (!endPoint) { … … 207 207 208 208 lines[i-1] = new OpenLayers.Feature.Vector(line, attributes); 209 if (attributes["pub date"]) {209 if (attributes["pubDate"]) { 210 210 lines[i-1].dateTime = new Date(prevDate); 211 211 lines[i-1].dateTime.duration = pubDate-prevDate;
