Daniel

Oracle Spatial layers are not working with attribute queries. The main 
reason is that I do not have access to any OS and this would be needed 
to test the correct functioning.

You can try to treat Ora layers like 'normal' (shape based) layers, you 
just need to customize the filter definition for them separately. Have a 
look at query.php and the function

q_execAttributeQuery()

here in the part below "// QUERY ON SHAPEFILE (ETC.) LAYER"  you have to 
differentiate additionally for Ora Spatial layers (should be connection 
type 8) and create a filter ($qStr) for them, using returnVar($var, 
$val, $datatype) with datatype "db" (available in latest dev versions of 
pmapper 2).

For more detailed questions I think it would be best to contact me off-list.

Another possibility would be to use attribute queries based on generic 
PHP functions (instead of Mapscript) as defined for PostGIS layers, but 
that would need more adaptations.

armin


Daniel Goetz wrote:
> Hi p.mapper-Community,
> 
> I am new to the object "p.mapper" and I have a question concerning "query by 
> attribute".
> 
> I have mapserver running on a local apache-web-server (I "installed" the ms4w 
> package). The data I want to map lie in a oracle spatial database.
> 
> I managed to display a map in p.mapper and I am able to zoom and pan. It's 
> even possible to get Information on a selected feature (polygon). A pop-up 
> window shows up with a table in it where information of the columns I 
> specified under METADATA in the LAYER-object of the mapfile are displayed. 
> really great.
> 
> Now I want to set up a "query by attributes". Therefor I did some changes in 
> the js_custom.php as decribed in the comment. But obviousely something went 
> wrong. In the search option field in the SearchFrame the cahnges I did in the 
> js_cusom.php appear but when I fill in a value to search for (and I am sure 
> that this value is really existing) I get a pop-up window displaying:" no 
> records found".
> 
> Perhaps I should describe what changes I did in the js_custom.php:
> 
> The Layer Name is: VIEW_RWG_TBS
> The column I want to search for is: TM_NR (it is a numeric field in the 
> database)
> 
> I changed the following line:
> 
> searchList['cities'] = new Array('<?php echo _p("City")?>', '#CITY_NAME', 
> '<?php echo _p("City") ?>','');
> 
> to the following:
> 
> searchList['VIEW_RWG_TBS'] = new Array('<?php echo _p("VIEW_RWG_TBS") ?>', 
> 'TM_NR', '<?php echo _p("VIEW_RWG_TBS") ?>','');
> 
> 
> I am not quiet sure whether there is something more to change. In the comment 
> of the js_custom.php I read :"* in the hidden input define for 'VALUE' the 
> layer name as it is in the map file and NAME="qlayer"". So I cahnged the 
> following line:
> 
> iStr += '<input type=hidden name="qlayer" value="' + searchItem + '">';
> 
> to the following:
> 
> iStr += '<input type=hidden name="qlayer" value="VIEW_RWG_TBS">';
> 
> 
> I even tried not to change things in the "input"-tag. With no result.
> 
> 
> But I realized when loading the p.mapper project via the index.phtml file 
> before the map is displayed an mapserver error message in the MapFrame 
> appears saying:"Warinig: Invalid argument supplied for foreach() in 
> c:/ms4w/apache/htdocs/pmapper/incphp/map.php on line 635."
> 
> So I assume I made something wrong. Could anybody imagine want I did wrong. 
> Would be very nice if somebody would give me a hint. Thank you so much for 
> your thoughts and ideas. Thank you in advance.
> 
> 
> regards
> 
> Daniel Goetz
> 
> 
> P.S. Might it be that there is a problem with pmapper and the oracle 
> connection?
> 
> 
> 

Reply via email to