Changeset 6180
- Timestamp:
- 02/09/08 20:33:31 (10 months ago)
- Files:
-
- sandbox/achipa/openlayers/examples/timed-point-track-markers.html (added)
- sandbox/achipa/openlayers/lib/OpenLayers.js (modified) (2 diffs)
- sandbox/achipa/openlayers/lib/OpenLayers/BaseTypes.js (modified) (1 diff)
- sandbox/achipa/openlayers/lib/OpenLayers/BaseTypes/DateTime.js (added)
- sandbox/achipa/openlayers/lib/OpenLayers/Format/GeoRSS.js (modified) (2 diffs)
- sandbox/achipa/openlayers/lib/OpenLayers/Layer.js (modified) (3 diffs)
- sandbox/achipa/openlayers/lib/OpenLayers/Layer/GeoRSS.js (modified) (1 diff)
- sandbox/achipa/openlayers/lib/OpenLayers/Layer/TimedPointTrack.js (added)
- sandbox/achipa/openlayers/lib/OpenLayers/Renderer/SVG.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
sandbox/achipa/openlayers/lib/OpenLayers.js
r5921 r6180 79 79 "OpenLayers/BaseTypes/Pixel.js", 80 80 "OpenLayers/BaseTypes/Size.js", 81 "OpenLayers/BaseTypes/DateTime.js", 81 82 "OpenLayers/Console.js", 82 83 "Rico/Corner.js", … … 173 174 "OpenLayers/Layer/Vector.js", 174 175 "OpenLayers/Layer/PointTrack.js", 176 "OpenLayers/Layer/TimedPointTrack.js", 175 177 "OpenLayers/Layer/GML.js", 176 178 "OpenLayers/Style.js", sandbox/achipa/openlayers/lib/OpenLayers/BaseTypes.js
r5686 r6180 10 10 * @requires OpenLayers/BaseTypes/Bounds.js 11 11 * @requires OpenLayers/BaseTypes/Element.js 12 * @requires OpenLayers/BaseTypes/DateTime.js 12 13 */ 13 14 sandbox/achipa/openlayers/lib/OpenLayers/Format/GeoRSS.js
r5837 r6180 186 186 ); 187 187 188 var pubdate = this.getChildValue(item, "*", "pubDate"); 189 188 190 /* If no link URL is found in the first child node, try the 189 191 href attribute */ … … 202 204 "title": title, 203 205 "description": description, 204 "link": link 206 "link": link, 207 "pubdate": pubdate 205 208 }; 206 209 var feature = new OpenLayers.Feature.Vector(geometry, data); sandbox/achipa/openlayers/lib/OpenLayers/Layer.js
r5982 r6180 42 42 * {Array(String)} Supported application event types 43 43 */ 44 EVENT_TYPES: ["loadstart", "loadend", "loadcancel", "visibilitychanged" ],44 EVENT_TYPES: ["loadstart", "loadend", "loadcancel", "visibilitychanged", "datetimechanged"], 45 45 46 46 /** … … 171 171 resolutions: null, 172 172 173 /** 174 * APIProperty: datetimeIntervals 175 * {Array} A list of time Intervals which define the time periods in ascending 176 * order. If this is not set in the layer constructor, it will be set 177 * based on other resolution related properties (maxExtent, 178 * maxResolution, maxScale, etc.). 179 */ 180 datetimeIntervals: null, 181 182 /** 183 * APIProperty: currentDateTime 184 * {<OpenLayers.DateTime>} A moment or interval of time 185 */ 186 currentDateTime: null, 187 173 188 /** 174 189 * APIProperty: maxExtent … … 1018 1033 }, 1019 1034 1035 /** 1036 * Method: isTemporalLayer 1037 * {Boolean} Whether or not the layer's features change through time. 1038 * 1039 */ 1040 isTemporalLayer: function () { 1041 if (this.datetimeIntervals && this.datetimeIntervals.length > 0) 1042 return true; 1043 }, 1044 1045 /** 1046 * Method: setDateTime 1047 * {Date} or {<OpenLayers.DateTime>} Sets the current date/time in the layers 1048 * 1049 */ 1050 setDateTime: function (dt) { 1051 if (!this.isTemporalLayer()) 1052 return; 1053 1054 if (typeof dt == "OpenLayers.DateTime") 1055 this.currentDateTime = dt; 1056 else 1057 this.currentDateTime = new OpenLayers.DateTime(dt); 1058 1059 this.events.triggerEvent("datetimechanged"); 1060 }, 1061 1062 /** 1063 * Method: getStartDateTime 1064 * {Date} Returns the first date/time the layer is available for, null 1065 * if the layer has no temporal conotation 1066 * 1067 */ 1068 getStartDateTime: function () { 1069 if (!this.isTemporalLayer()) 1070 return null; 1071 1072 if (this.datetimeIntervals.length < 1) 1073 return null; 1074 1075 return this.datetimeIntervals[0].from; 1076 }, 1077 1078 /** 1079 * Method: getStopDateTime 1080 * {Date} Returns the last date/time the layer is available for, null 1081 * if the layer has no temporal conotation 1082 * 1083 */ 1084 getStopDateTime: function () { 1085 if (!this.isTemporalLayer()) 1086 return null; 1087 1088 if (this.datetimeIntervals.length < 1) 1089 return null; 1090 1091 return this.datetimeIntervals[datetimeIntervals.length -1].to; 1092 }, 1093 1020 1094 CLASS_NAME: "OpenLayers.Layer" 1021 1095 }); sandbox/achipa/openlayers/lib/OpenLayers/Layer/GeoRSS.js
r5828 r6180 190 190 new OpenLayers.Size(250, 120); 191 191 192 data.pubdate = feature.attributes.pubdate; 193 192 194 if (title || description) { 193 195 var contentHTML = '<div class="olLayerGeoRSSClose">[x]</div>'; sandbox/achipa/openlayers/lib/OpenLayers/Renderer/SVG.js
r5909 r6180 219 219 } else { 220 220 node.setAttributeNS(null, "r", style.pointRadius); 221 if (style.pointStyle == "pixel"){ 222 node.setAttributeNS(null, "point", "pixel"); 223 } 221 224 } 222 225 }
