[Mapbender-commits] r9019 - trunk/mapbender/http/classes
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Tue Aug 5 01:40:26 PDT 2014
Author: armin11
Date: 2014-08-05 01:40:26 -0700 (Tue, 05 Aug 2014)
New Revision: 9019
Modified:
trunk/mapbender/http/classes/class_iso19139.php
Log:
Extract hardcoded extent of sdi area which is used to calculate the metadata extent previews into conf file
Modified: trunk/mapbender/http/classes/class_iso19139.php
===================================================================
--- trunk/mapbender/http/classes/class_iso19139.php 2014-08-04 13:13:59 UTC (rev 9018)
+++ trunk/mapbender/http/classes/class_iso19139.php 2014-08-05 08:40:26 UTC (rev 9019)
@@ -1577,6 +1577,42 @@
}
private function getExtentGraphic($layer_4326_box) {
+ $area_4326_box = explode(',',EXTENTSERVICEBBOX);
+ if ($layer_4326_box[0] <= $area_4326_box[0] || $layer_4326_box[2] >= $area_4326_box[2] || $layer_4326_box[1] <= $area_4326_box[1] || $layer_4326_box[3] >= $area_4326_box[3]) {
+ if ($layer_4326_box[0] < $area_4326_box[0]) {
+ $area_4326_box[0] = $layer_4326_box[0];
+ }
+ if ($layer_4326_box[2] > $area_4326_box[2]) {
+ $area_4326_box[2] = $layer_4326_box[2];
+ }
+ if ($layer_4326_box[1] < $area_4326_box[1]) {
+ $area_4326_box[1] = $layer_4326_box[1];
+ }
+ if ($layer_4326_box[3] > $area_4326_box[3]) {
+ $area_4326_box[3] = $layer_4326_box[3];
+ }
+
+ $d_x = $area_4326_box[2] - $area_4326_box[0];
+ $d_y = $area_4326_box[3] - $area_4326_box[1];
+
+ $new_minx = $area_4326_box[0] - 0.05*($d_x);
+ $new_maxx = $area_4326_box[2] + 0.05*($d_x);
+ $new_miny = $area_4326_box[1] - 0.05*($d_y);
+ $new_maxy = $area_4326_box[3] + 0.05*($d_y);
+
+ if ($new_minx < -180) $area_4326_box[0] = -180; else $area_4326_box[0] = $new_minx;
+ if ($new_maxx > 180) $area_4326_box[2] = 180; else $area_4326_box[2] = $new_maxx;
+ if ($new_miny < -90) $area_4326_box[1] = -90; else $area_4326_box[1] = $new_miny;
+ if ($new_maxy > 90) $area_4326_box[3] = 90; else $area_4326_box[3] = $new_maxy;
+ }
+ $getMapUrl = EXTENTSERVICEURL."VERSION=1.1.1&REQUEST=GetMap&SERVICE=WMS&LAYERS=".EXTENTSERVICELAYER."&STYLES=&SRS=EPSG:4326&BBOX=".$area_4326_box[0].",".$area_4326_box[1].",".$area_4326_box[2].",".$area_4326_box[3]."&WIDTH=120&HEIGHT=120&FORMAT=image/png&BGCOLOR=0xffffff&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_inimage&minx=".$layer_4326_box[0]."&miny=".$layer_4326_box[1]."&maxx=".$layer_4326_box[2]."&maxy=".$layer_4326_box[3];
+ return $getMapUrl;
+ }
+
+
+
+
+/* private function getExtentGraphic($layer_4326_box) {
$rlp_4326_box = array(6.05,48.9,8.6,50.96);
if ($layer_4326_box[0] <= $rlp_4326_box[0] || $layer_4326_box[2] >= $rlp_4326_box[2] || $layer_4326_box[1] <= $rlp_4326_box[1] || $layer_4326_box[3] >= $rlp_4326_box[3]) {
if ($layer_4326_box[0] < $rlp_4326_box[0]) {
@@ -1607,7 +1643,7 @@
}
$getMapUrl = EXTENTSERVICEURL."VERSION=1.1.1&REQUEST=GetMap&SERVICE=WMS&LAYERS=".EXTENTSERVICELAYER."&STYLES=&SRS=EPSG:4326&BBOX=".$rlp_4326_box[0].",".$rlp_4326_box[1].",".$rlp_4326_box[2].",".$rlp_4326_box[3]."&WIDTH=120&HEIGHT=120&FORMAT=image/png&BGCOLOR=0xffffff&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_inimage&minx=".$layer_4326_box[0]."&miny=".$layer_4326_box[1]."&maxx=".$layer_4326_box[2]."&maxy=".$layer_4326_box[3];
return $getMapUrl;
- }
+ }*/
public function insertToDB($resourceType, $resourceId){
More information about the Mapbender_commits
mailing list