[Mapbender-commits] r10126 - trunk/mapbender/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Fri May 17 01:21:46 PDT 2019
Author: armin11
Date: 2019-05-17 01:21:46 -0700 (Fri, 17 May 2019)
New Revision: 10126
Modified:
trunk/mapbender/http/javascripts/initWmcObj.php
Log:
Parse crs reference with crs class to extract identifier
Modified: trunk/mapbender/http/javascripts/initWmcObj.php
===================================================================
--- trunk/mapbender/http/javascripts/initWmcObj.php 2019-05-16 14:16:38 UTC (rev 10125)
+++ trunk/mapbender/http/javascripts/initWmcObj.php 2019-05-17 08:21:46 UTC (rev 10126)
@@ -16,6 +16,7 @@
require_once(dirname(__FILE__)."/../classes/class_connector.php");
require_once(dirname(__FILE__)."/../classes/class_owsConstraints.php");
require_once(dirname(__FILE__)."/../classes/class_cache.php");
+require_once(dirname(__FILE__)."/../classes/class_crs.php");
/*check if key param can be found in SESSION, otherwise take it from $_GET
*/
@@ -675,9 +676,13 @@
$e = new mb_notice("javascripts/initWmcObj.php: MultiPolygon found!");
$multiPolygon = $gml2->xpath('/FeatureCollection/featureMember/*/*/MultiPolygon');
$multiPolygonGml = $multiPolygon[0]->asXML();
- $e = new mb_notice("javascripts/initWmcObj.php: MultiPolygon: ".$multiPolygonGml);
+ //$e = new mb_exception("javascripts/initWmcObj.php: MultiPolygon: ".$multiPolygonGml);
$currentEpsg = Mapbender::session()->get("epsg");
- $e = new mb_notice("javascripts/initWmcObj.php: currentEpsg: ".$currentEpsg);
+ //use code not whole uri
+ $crs = new crs($currentEpsg);
+ $currentEpsg = $crs->identifierCode;
+ //$e = new mb_exception("javascripts/initWmcObj.php: currentEpsg code: ".$crs->identifierCode);
+ //
if ($currentEpsg !== '4326') {
$sql = "SELECT st_box(st_transform(st_geomfromgml($1),$2::INT)) AS geom";
$v = array($multiPolygonGml, $currentEpsg);
More information about the Mapbender_commits
mailing list