[Mapbender-commits] r5564 - trunk/mapbender/http/php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Sat Feb 20 09:50:52 EST 2010
Author: astrid_emde
Date: 2010-02-20 09:50:52 -0500 (Sat, 20 Feb 2010)
New Revision: 5564
Modified:
trunk/mapbender/http/php/mod_gazetteerMetadata_search.php
Log:
error in SQl ;
Modified: trunk/mapbender/http/php/mod_gazetteerMetadata_search.php
===================================================================
--- trunk/mapbender/http/php/mod_gazetteerMetadata_search.php 2010-02-20 14:50:29 UTC (rev 5563)
+++ trunk/mapbender/http/php/mod_gazetteerMetadata_search.php 2010-02-20 14:50:52 UTC (rev 5564)
@@ -53,8 +53,11 @@
$t = array();
$sql_wms = "SELECT DISTINCT layer.layer_id, wms.wms_title, " .
- "wms.wms_getcapabilities, wms.wms_version " .
+ "wms.wms_getcapabilities, wms.wms_version, " .
+ "e.minx, e.miny, e.maxx, e.maxy " .
"FROM wms LEFT JOIN layer ON wms.wms_id = layer.fkey_wms_id " .
+ "LEFT JOIN layer_epsg e ON layer.layer_id = e.fkey_layer_id " .
+ "AND e.epsg = '$srs' " .
"WHERE layer.layer_pos = 0 AND wms.wms_id IN (";
for($i=0; $i<count($mywms); $i++){
if ($i > 0) {$sql_wms .= ",";}
@@ -85,7 +88,13 @@
'wms_getcapabilities' => $row['wms_getcapabilities'],
'wms_version' => $row['wms_version'],
'layer_id' => $row['layer_id'],
- 'title' => $row['wms_title']
+ 'title' => $row['wms_title'],
+ 'extent' => array(
+ $row['minx'],
+ $row['miny'],
+ $row['maxx'],
+ $row['maxy']
+ )
));
}
}
@@ -94,11 +103,14 @@
$v = array();
$t = array();
$sql_layer = "SELECT DISTINCT l.layer_id, l.fkey_wms_id, l.layer_title, " .
- "l.layer_name, w.wms_getcapabilities, w.wms_version " .
+ "l.layer_name, w.wms_getcapabilities, w.wms_version, " .
+ "e.minx, e.miny, e.maxx, e.maxy " .
"FROM layer l LEFT JOIN layer_keyword lkw " .
"LEFT JOIN keyword kw ON kw.keyword_id = lkw.fkey_keyword_id " .
"ON l.layer_id = lkw.fkey_layer_id " .
"LEFT JOIN wms w ON l.fkey_wms_id = w.wms_id " .
+ "LEFT JOIN layer_epsg e ON l.layer_id = e.fkey_layer_id " .
+ "AND e.epsg = '$srs' " .
"WHERE l.layer_id IN (";
for($i = 0; $i < count($mylayer); $i++){
@@ -112,7 +124,7 @@
if($searchColumnsLayer == "") {
$sql_layer .= "layer_title ILIKE '%".$query."%' OR " .
"layer_name ILIKE '%".$query."%' OR " .
- "layer_abstract ILIKE '%".$query."%';";
+ "layer_abstract ILIKE '%".$query."%' ";
}
else{
$layerColumnArray = split(",", $searchColumnsLayer);
@@ -135,7 +147,13 @@
'wms_version' => $row['wms_version'],
'layer_name' => $row['layer_name'],
'layer_id' => $row['layer_id'],
- 'title' => $row['layer_title']
+ 'title' => $row['layer_title'],
+ 'extent' => array(
+ $row['minx'],
+ $row['miny'],
+ $row['maxx'],
+ $row['maxy']
+ )
));
}
}
More information about the Mapbender_commits
mailing list