Changeset 3138
- Timestamp:
- 05/19/08 10:29:28 (6 months ago)
- Files:
-
- trunk/projects/bos/tmp/chess-board.lisp (modified) (1 diff)
- trunk/projects/bos/web/contract-tree.lisp (modified) (6 diffs)
- trunk/projects/bos/web/image-tree.lisp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/projects/bos/tmp/chess-board.lisp
r3017 r3138 162 162 (let ((rect (make-rectangle2 (geo-location obj)))) 163 163 (kml-overlay (format nil "http://~a/contract-tree-image/~d" (website-host) (id obj)) 164 rect (+ 100 (depth obj))0)))164 rect :draw-order (+ 100 (depth obj)) :absolute 0))) 165 165 ;; (cond 166 166 ;; ;; we deal with small-contracts differently at last layer trunk/projects/bos/web/contract-tree.lisp
r3135 r3138 135 135 (some #'identity (children node))) 136 136 137 (defun any-child (node) 138 (find-if #'identity (children node))) 139 137 140 (defun child-index (node child) 138 141 (dotimes (i 4) … … 190 193 (defclass contract-tree-node (quad-tree-node) 191 194 ((timestamp :accessor timestamp :initform (get-universal-time)) 192 (placemark-contracts :initform nil :accessor placemark-contracts))) 195 (placemark-contracts :initform nil :accessor placemark-contracts) 196 (kml-req-count :initform 0 :accessor kml-req-count) 197 (image-req-count :initform 0 :accessor image-req-count))) 193 198 194 199 (defvar *contract-tree* nil) … … 284 289 (if (zerop (depth node)) 285 290 16 286 256))291 512)) 287 292 288 293 (defmethod network-link-lod-max ((node contract-tree-node)) … … 318 323 (rmcpath) (rmcid)) 319 324 (handle-if-node-modified 325 (incf (kml-req-count node)) 320 326 (setf (hunchentoot:header-out :last-modified) 321 327 (hunchentoot:rfc-1123-date (timestamp node))) … … 336 342 ;; overlay 337 343 (kml-overlay (format nil "http://~a/contract-tree-image?path=~{~d~}" (website-host) path) 338 rect (+ 1 (* 2 (depth node))) 0 344 rect 345 :draw-order (+ 1000 (depth node)) 346 ;; :absolute 0 339 347 ;; GroundOverlay specific LOD 340 `(:min ,(network-link-lod-min node) :max ,(network-link-lod-max node))) 348 :lod `(:min ,(network-link-lod-min node) 349 :max ,(if (node-has-children-p node) 350 (* 6 (network-link-lod-min (any-child node))) 351 -1))) 341 352 ;; placemark-contracts 342 353 (let ((placemark-contracts … … 389 400 (with-query-params (path) 390 401 (handle-if-node-modified 402 (incf (image-req-count node)) 391 403 (let ((box (geo-box node)) 392 (image-size *contract-tree-images-size*))404 (image-size (progn *contract-tree-images-size* 128))) 393 405 (cl-gd:with-image (cl-gd:*default-image* image-size image-size t) 394 406 (setf (cl-gd:save-alpha-p) t 395 407 (cl-gd:alpha-blending-p) nil) 408 ;; (cl-gd:draw-rectangle* 0 0 127 127 :filled nil :color (cl-gd:find-color 255 0 0)) 396 409 (let ((white (cl-gd:find-color 255 255 255 :alpha 127)) 397 410 (subbox (make-geo-box 0d0 0d0 0d0 0d0))) trunk/projects/bos/web/image-tree.lisp
r3122 r3138 284 284 (kml-lat-lon-box rect "LatLonAltBox")) 285 285 286 (defun kml-overlay (img-path rect & optional (drawOrder 0) absolute lod)286 (defun kml-overlay (img-path rect &key (draw-order 0) absolute lod) 287 287 (with-element "GroundOverlay" 288 288 (with-element "name" (text (file-namestring img-path))) 289 289 (when lod (kml-region rect lod)) 290 (with-element "drawOrder" (integer-text draw Order))290 (with-element "drawOrder" (integer-text draw-order)) 291 291 (with-element "Icon" 292 292 (with-element "href" (text img-path)) … … 622 622 (kml-region rect lod) 623 623 (kml-overlay (format nil "http://~a/image/~d" (website-host) (store-object-id obj)) 624 rect (* 2 (depth obj)) 0) 624 rect 625 :draw-order (depth obj) 626 ;; :absolute 0 627 ) 625 628 (dolist (child (children obj)) 626 629 (kml-network-link (format nil "http://~a/image-tree-kml/~d" (website-host) (store-object-id child))
