[Mapbender-commits] r8949 - trunk/mapbender/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Jun 30 04:08:02 PDT 2014
Author: hwbllmnn
Date: 2014-06-30 04:08:02 -0700 (Mon, 30 Jun 2014)
New Revision: 8949
Modified:
trunk/mapbender/http/javascripts/initWmcObj.php
Log:
fixed php warning
Modified: trunk/mapbender/http/javascripts/initWmcObj.php
===================================================================
--- trunk/mapbender/http/javascripts/initWmcObj.php 2014-06-30 10:02:12 UTC (rev 8948)
+++ trunk/mapbender/http/javascripts/initWmcObj.php 2014-06-30 11:08:02 UTC (rev 8949)
@@ -1,7 +1,7 @@
<?php
//
// Load WMS via WMC
-//
+//
require_once dirname(__FILE__)."/../php/mb_validateSession.php";
require_once dirname(__FILE__)."/../classes/class_wmc.php";
require_once dirname(__FILE__)."/../classes/class_wmc_factory.php";
@@ -32,7 +32,7 @@
#exit;
}
fclose($h);
- }
+ }
}
function getWmcFromStorage($filename) {
@@ -67,16 +67,16 @@
$cache = new Cache();
if ($cache->isActive && $cache->cachedVariableExists($filename)) {
$wmc = $cache->cachedVariableFetch($filename);
- return $wmc;
+ return $wmc;
} else {
return false;
}
break;
- case "file":
+ case "file":
$wmc = file_get_contents($filename);
return $wmc;
break;
- default:
+ default:
$wmc = file_get_contents($filename);
return $wmc;
break;
@@ -182,7 +182,7 @@
// just make it work for a single Wmc
try {
$wmcGetApi = WmcFactory::createFromDb($input["id"]);
- //update urls from wmc with urls from database if id is given
+ //update urls from wmc with urls from database if id is given
$updatedWMC = $wmcGetApi->updateUrlsFromDb();
$wmcGetApi->createFromXml($updatedWMC);
//increment load count
@@ -383,14 +383,14 @@
$inputGeoRSSArray = $getApi->getGeoRSSFeeds();
$e = new mb_notice("initWmcObj.php: check GEORSS API");
if($inputGeoRSSArray){
- $wmc->generalExtensionArray['GEORSS'] = $inputGeoRSSArray;
+ $wmc->generalExtensionArray['GEORSS'] = $inputGeoRSSArray;
}
//
//KML
//
$inputKmlArray = $getApi->getKml();
if($inputKmlArray){
- $wmc->generalExtensionArray['KML'] = $inputKmlArray;
+ $wmc->generalExtensionArray['KML'] = $inputKmlArray;
}
//TODO test following
//workaround to have a fully merged WMC for loading
@@ -493,13 +493,13 @@
$constraints->type = "wms";
$constraints->returnDirect = false;
$touForWMS = $constraints->getDisclaimer();
- //add only those who have no special tou defined -
+ //add only those who have no special tou defined -
if ($touForWMS != 'free'){
$tou .= $touHeader.$touForWMS;
}
//set the tou to be accepted - TODO maybe do this after the button which deletes the message window - from a ajax request.
$classTou->set('wms',$WMS['id']);
- }
+ }
}
if ($tou != "") {
$tou = _mb("The configuration, which should be loaded, consists of different services which have the following terms of use:")."<br>".$tou;
@@ -541,7 +541,9 @@
//overwrite extent of wmc with information from GetApi if given
$e = new mb_notice("initWmcObj.php: check ZOOM API");
$zoom = $getApi->getZoom();
-$e = new mb_notice("initWmcObj.php: check ZOOM API: ".implode(',',$zoom));
+if(is_array($zoom)) {
+ $e = new mb_notice("initWmcObj.php: check ZOOM API: ".implode(',',$zoom));
+}
if (count($zoom) == 4 || count($zoom) == 5) {
$e = new mb_notice("initWmcObject.php: found EXTENT");
if (count($zoom) == 5){
@@ -549,7 +551,7 @@
$zoom[0],
$zoom[1],
$zoom[2],
- $zoom[3],
+ $zoom[3],
$epsg = $zoom[4]);
} else {
//get current epsg from wmc bounding box
@@ -559,7 +561,7 @@
$zoom[0],
$zoom[1],
$zoom[2],
- $zoom[3],
+ $zoom[3],
$epsg = $wmcGetApi->mainMap->getEpsg());
}
$wmcGetApi->mainMap->setExtent($bbox);
More information about the Mapbender_commits
mailing list