|
|
@@ -70,6 +70,8 @@ class Route_UrlAction_WmsGenerate extends RouteBase {
|
|
|
$filesToCopy=array($files[0]);
|
|
|
$missingFiles=array();
|
|
|
foreach ($DataSources as $DataSource) {
|
|
|
+ $DataSourceArr=explode('|',$DataSource);
|
|
|
+ $DataSource=$dataSourceArr[0];
|
|
|
$file=basename($DataSource,".shp");
|
|
|
foreach ($suffixes as $suffix) {
|
|
|
if(is_file($destFolderPath."/".$file.$suffix)) $filesToCopy[]=$file.$suffix;
|
|
|
@@ -349,7 +351,11 @@ openOnFocus: false
|
|
|
$extents=array();
|
|
|
$mapLayers=$xml->xpath('/qgis/projectlayers/maplayer');
|
|
|
foreach ($mapLayers as $mapLayer) {
|
|
|
- $mapLayer->datasource=$destFolderPath.'/.wms/'.basename($mapLayer->datasource);
|
|
|
+ $dataSourceArr=explode('|',$mapLayer->datasource);
|
|
|
+ $dataSourceArr[0]=$destFolderPath.'/.wms/'.basename($dataSourceArr[0]);
|
|
|
+ $dataSource=implode('|',$dataSourceArr);
|
|
|
+ $mapLayer->datasource=$dataSource;
|
|
|
+ //$mapLayer->datasource=$destFolderPath.'/.wms/'.basename($mapLayer->datasource);
|
|
|
$bash='
|
|
|
tmp=`mktemp -d`
|
|
|
/opt/local/bin/ogr2ogr -s_srs EPSG:'.$mapLayer->srs->spatialrefsys->srid.' -t_srs EPSG:4236 "$tmp/tmp.shp" "'.$mapLayer->datasource.'" >/dev/null 2>&1
|