Changeset 3504
- Timestamp:
- 07/18/08 16:28:25 (4 months ago)
- Files:
-
- trunk/projects/bos/web/kml-handlers.lisp (modified) (2 diffs)
- trunk/projects/bos/web/kml-utils.lisp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/projects/bos/web/kml-handlers.lisp
r3492 r3504 84 84 (with-element "tilt" (text "0")) 85 85 (with-element "heading" (text "1.391362238653075"))) 86 (dolist (sat-layer (class-instances 'sat-layer)) 87 (kml-network-link (format nil "http://~a/sat-root-kml?name=~A" (website-host) (name sat-layer)) 88 :rect (geo-box-rectangle *m2-geo-box*) 89 :lod '(:min 0 :max -1) 90 :name (dictionary-entry (princ-to-string (name sat-layer)) lang))) 86 (with-element "Folder" 87 (attribute "name" "Sat-Images") 88 (attribute "open" "1") 89 (with-element "Style" 90 (with-element "ListStyle" 91 (with-element "listItemType" (text "radioFolder")))) 92 (dolist (sat-layer (class-instances 'sat-layer)) 93 (kml-network-link (format nil "http://~a/sat-root-kml?name=~A" (website-host) (name sat-layer)) 94 :rect (geo-box-rectangle *m2-geo-box*) 95 :lod '(:min 0 :max -1) 96 :name (dictionary-entry (princ-to-string (name sat-layer)) lang) 97 :hide-children t))) 91 98 (let ((href (if (not contract) 92 99 (format nil "http://~a/contract-tree-kml?lang=~A" (website-host) lang) … … 99 106 :rect (geo-box-rectangle (geo-box *contract-tree*)) 100 107 :lod (node-lod *contract-tree*) 101 :name (dictionary-entry "Squaremetre Area" lang))) 108 :name (dictionary-entry "Squaremetre Area" lang) 109 :hide-children t)) 102 110 (kml-network-link (format nil "http://~a/poi-kml-all?lang=~A" (website-host) lang) 103 111 :name (dictionary-entry "POIs" lang) 104 112 :rect (make-rectangle :x 0 :y 0 :width +width+ :height +width+) 105 :lod '(:min 0 :max -1)) 113 :lod '(:min 0 :max -1) 114 :hide-children t) 106 115 (kml-network-link (format nil "http://~a/country-stats?lang=~A" (website-host) lang) 107 :name (dictionary-entry "Country-Stats" lang))))))) 116 :name (dictionary-entry "Country-Stats" lang) 117 :hide-children t)))))) 108 118 109 119 (defmethod handle-object ((handler kml-root-handler) (object sponsor)) trunk/projects/bos/web/kml-utils.lisp
r3493 r3504 268 268 ;; (kml-link string))) 269 269 270 271 (defun kml-hide-children-style () 272 (with-element "Style" 273 (with-element "ListStyle" 274 (with-element "listItemType" (text "checkHideChildren")) 275 (with-element "bgColor" (text "00ffffff"))))) 276 270 277 (defun kml-network-link (href &key rect lod name http-query 271 fly-to-view )278 fly-to-view hide-children) 272 279 (with-element "NetworkLink" 273 280 (when name (with-element "name" (text name))) 274 281 (when rect (kml-region rect lod)) 282 (when hide-children 283 (kml-hide-children-style)) 275 284 (when fly-to-view (with-element "flyToView" (text "1"))) 276 285 (kml-link href)))
