|
|
@@ -73,13 +73,15 @@ class Route_UrlAction_WmsGenerate extends RouteBase {
|
|
|
$DataSourceArr=explode('|',$DataSource);
|
|
|
$DataSource=$DataSourceArr[0];
|
|
|
$pathinfo = pathinfo($DataSource);
|
|
|
- if (in_array($pathinfo['extension'], array("tif","tiff","TIF","TIFF"))) {
|
|
|
- $filesToCopy[] = basename($DataSource);
|
|
|
- } else {
|
|
|
- $file=basename($DataSource,".shp");
|
|
|
- foreach ($suffixes as $suffix) {
|
|
|
- if(is_file($destFolderPath."/".$file.$suffix)) $filesToCopy[]=$file.$suffix;
|
|
|
- else $missingFiles[]=$file.$suffix;
|
|
|
+ if (!preg_match('/.*http.*/', $DataSource)) {
|
|
|
+ if (in_array($pathinfo['extension'], array("tif","tiff","TIF","TIFF"))) {
|
|
|
+ $filesToCopy[] = basename($DataSource);
|
|
|
+ } else {
|
|
|
+ $file=basename($DataSource,".shp");
|
|
|
+ foreach ($suffixes as $suffix) {
|
|
|
+ if(is_file($destFolderPath."/".$file.$suffix)) $filesToCopy[]=$file.$suffix;
|
|
|
+ else $missingFiles[]=$file.$suffix;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -357,9 +359,11 @@ openOnFocus: false
|
|
|
$mapLayers=$xml->xpath('/qgis/projectlayers/maplayer');
|
|
|
foreach ($mapLayers as $mapLayer) {
|
|
|
$dataSourceArr=explode('|',$mapLayer->datasource);
|
|
|
- $dataSourceArr[0]=$destFolderPath.'/.wms/'.basename($dataSourceArr[0]);
|
|
|
- $dataSource=implode('|',$dataSourceArr);
|
|
|
- $mapLayer->datasource=$dataSource;
|
|
|
+ if (!preg_match('/.*http.*/', $dataSourceArr[0])) {
|
|
|
+ $dataSourceArr[0]=$destFolderPath.'/.wms/'.basename($dataSourceArr[0]);
|
|
|
+ $dataSource=implode('|',$dataSourceArr);
|
|
|
+ $mapLayer->datasource=$dataSource;
|
|
|
+ }
|
|
|
//$mapLayer->datasource=$destFolderPath.'/.wms/'.basename($mapLayer->datasource);
|
|
|
$bash='
|
|
|
tmp=`mktemp -d`
|