[Mapbender-commits] r3656 - in branches/print_dev/http/print: .
classes
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Mar 9 11:18:04 EDT 2009
Author: mschulz
Date: 2009-03-09 11:18:04 -0400 (Mon, 09 Mar 2009)
New Revision: 3656
Modified:
branches/print_dev/http/print/classes/mbMapDecorator.php
branches/print_dev/http/print/testConfigTemplate.json
Log:
added map extent coordinates
Modified: branches/print_dev/http/print/classes/mbMapDecorator.php
===================================================================
--- branches/print_dev/http/print/classes/mbMapDecorator.php 2009-03-09 14:43:21 UTC (rev 3655)
+++ branches/print_dev/http/print/classes/mbMapDecorator.php 2009-03-09 15:18:04 UTC (rev 3656)
@@ -65,6 +65,25 @@
$i = new weldMaps2PNG(implode("___",$array_urls), $this->filename);
$this->pdf->objPdf->Image($this->filename, $this->conf->x_ul, $this->conf->y_ul, $width, $height,'png');
+
+ /* show coordinates ... */
+ if ($this->conf->coords == 1) {
+ $coord = mb_split(",",$this->pdf->getMapExtent());
+
+ $myMinx = "R ".substr(round($coord[0]), 0, 4)." ".substr(round($coord[0]), 4, 3)."";
+ $myMiny = "H ".substr(round($coord[1]), 0, 4)." ".substr(round($coord[1]), 4, 3)."";
+ $myMaxx = "R ".substr(round($coord[2]), 0, 4)." ".substr(round($coord[2]), 4, 3)."";
+ $myMaxy = "H ".substr(round($coord[3]), 0, 4)." ".substr(round($coord[3]), 4, 3)."";
+
+ $this->pdf->objPdf->setTextColor(0, 0, 0);
+ $this->pdf->objPdf->setFont($this->conf->coords_font_family, "", $this->conf->coords_font_size);
+ #RotatedText($x, $y, $txt, $angle)
+ $this->pdf->objPdf->RotatedText($this->conf->x_ul - 2, $this->conf->y_ul + $height, $myMinx, 90);
+ $this->pdf->objPdf->Text($this->conf->x_ul, $this->conf->y_ul + $height + 5, $myMiny);
+ $this->pdf->objPdf->RotatedText($this->conf->x_ul + $width + 2, $this->conf->y_ul, $myMaxy, 270);
+ $this->pdf->objPdf->Text($this->conf->x_ul + $width - ($this->pdf->objPdf->GetStringWidth($myMaxx)), $this->conf->y_ul - 2, $myMaxx);
+
+ }
}
}
Modified: branches/print_dev/http/print/testConfigTemplate.json
===================================================================
--- branches/print_dev/http/print/testConfigTemplate.json 2009-03-09 14:43:21 UTC (rev 3655)
+++ branches/print_dev/http/print/testConfigTemplate.json 2009-03-09 15:18:04 UTC (rev 3656)
@@ -62,7 +62,10 @@
"x_ul" : 10.1,
"y_ul" : 15.2,
"width" : 280,
- "height" : 185
+ "height" : 185,
+ "coords" : 1,
+ "coords_font_family" : "Arial",
+ "coords_font_size" : 6
},
"messung" : {
"type" : "measure",
More information about the Mapbender_commits
mailing list