[bknr-cvs] r2461 - branches/bos/projects/bos/web
ksprotte at common-lisp.net
ksprotte at common-lisp.net
Mon Feb 11 11:39:57 UTC 2008
Author: ksprotte
Date: Mon Feb 11 06:39:55 2008
New Revision: 2461
Modified:
branches/bos/projects/bos/web/tags.lisp
Log:
added new template var :geo-coord for save-profile and removed sqm-x sqm-y
not tested yet
Modified: branches/bos/projects/bos/web/tags.lisp
==============================================================================
--- branches/bos/projects/bos/web/tags.lisp (original)
+++ branches/bos/projects/bos/web/tags.lisp Mon Feb 11 06:39:55 2008
@@ -168,8 +168,11 @@
(setf (get-template-var :country) (sponsor-country sponsor))
(setf (get-template-var :infotext) (sponsor-info-text sponsor))
(setf (get-template-var :name) (user-full-name sponsor))
- (setf (get-template-var :sqm-x) (format nil "~,3f" (m2-utm-x (first (contract-m2s contract)))))
- (setf (get-template-var :sqm-y) (format nil "~,3f" (m2-utm-y (first (contract-m2s contract)))))
+ (setf (get-template-var :geo-coord) (multiple-value-bind (left top)
+ (contract-bounding-box contract)
+ (apply #'geometry:format-lon-lat nil
+ (geo-utm:utm-x-y-to-lon-lat (+ +nw-utm-x+ left)
+ (- +nw-utm-y+ top) +utm-zone+ t))))
(setf (get-template-var :numsqm)
(format nil "~D"
(apply #'+ (mapcar #'(lambda (contract) (length (contract-m2s contract))) (sponsor-contracts sponsor))))))
More information about the Bknr-cvs
mailing list