Changeset 6277
- Timestamp:
- 02/14/08 23:02:14 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
sandbox/achipa/openlayers/lib/OpenLayers/Layer/TimedPointTrack.js
r6270 r6277 57 57 * strokeLinecap: "round", 58 58 * pointRadius: 6, 59 * pointStyle: "dot" 59 * pointStyle: "square" 60 * 61 * note the extra pointStyle attribute, which define the appearance of the 62 * highlight, available values are 'square' and 'circle' 63 * 60 64 */ 61 65 defaultStyle: { … … 86 90 ); 87 91 this.events.register("datetimechanged", this, this.updateHighlight); 92 // this.map.events.register("zoomend", this, this.updateHighlight); 88 93 }, 89 94 … … 123 128 // this is good for a two point {OpenLayers.LineString} only, but that's what our superclass uses 124 129 // if PointTrack was to work with something else, this would have to be adapted, too 125 alert(" " + this.currentDateTime.from + " " + closestfeature.dateTime.from + " " + closestfeature.dateTime.to + " " + closestfeature.dateTime.getPlaceInInterval(this.currentDateTime.from));126 130 closestpoint = new OpenLayers.Geometry.Point( 127 131 closestgeom.components[0].x + (closestgeom.components[1].x - closestgeom.components[0].x) * closestfeature.dateTime.getPlaceInInterval(this.currentDateTime.from), sandbox/achipa/openlayers/lib/OpenLayers/Renderer/SVG.js
r6270 r6277 154 154 case "OpenLayers.Geometry.Point": 155 155 nodeType = style.externalGraphic ? "image" : "circle"; 156 if (nodeType == "circle" && style.pointStyle == "square") nodeType = "rect"; 156 157 break; 157 158 case "OpenLayers.Geometry.Rectangle": … … 319 320 drawPoint: function(node, geometry) { 320 321 if (node._style.pointStyle == "square") { 321 alert('ZQVARE');322 this.drawRectangle(node, {x: geometry.x, y: geometry.y, width: node.getAttributeNS(null, "r"), height: node.getAttributeNS(null, "r")})322 var size = node._style.pointRadius * this.getResolution(); 323 this.drawRectangle(node, {x: (geometry.x - size/2), y: (geometry.y + size/2), width: size, height: size}) 323 324 } else { 324 325 this.drawCircle(node, geometry, 1); … … 422 423 var x = (geometry.x / resolution + this.left); 423 424 var y = (this.top - geometry.y / resolution); 424 425 425 if (this.inValidRange(x, y)) { 426 426 node.setAttributeNS(null, "x", x);
