[Mapserver-users] more (known issue: no results with QueryByPoint(Mapserver 3.7 PHP mapscript))
Vincent Schut
schut at sarvision.com
Thu May 22 00:42:12 PDT 2003
Ehm... I think MS_FAILURE = 1 and MS_SUCCES = 0...
try this in your php script:
echo "ms_failure: ".MS_FAILURE."<br>";
echo "ms_success: ".MS_SUCCESS."<br>";
Result:
ms_failure1
ms_success0
:-)
Cheers,
Vincent Schut
On Wednesday 21 May 2003 17:01, Michael Härtel wrote:
> Thanks to all for the answers.
>
> according to the contributions i changed my map file to this (i added a
> class even hough i dont want to show it in th map but it seems to be
> turned on and therefor switched to visible status to be queried):
>
> LAYER #wrs2
>
> NAME "WRS-2_frame"
> PROJECTION
> proj=longlat
> ellps=WGS84
> datum=WGS84
> no_defs
> END
>
> DATA "wrs2/wrs2"
> STATUS ON
> TYPE POLYGON
>
> CLASS #all frames
> NAME "WRS-2 frames"
> #COLOR 200 200 200
> OUTLINECOLOR 255 0 0
> STATUS ON
> END # country border
>
> TOLERANCEUNITS kilometers
> TOLERANCE 5
> DUMP TRUE
>
> HEADER "H:\_webroot_\mapserv_header.html"
> TEMPLATE "H:\_webroot_\mapserv_query_template.html"
> FOOTER "H:\_webroot_\mapserv_footer.html"
>
> END # layer wrs2
>
> in the PHTML File i use these lines to perform the query:
>
> $query=$querylayer->QueryByPoint($my_point_geo,MS_MULTIPLE,-1);
>
> $my_point_geo is a point object with geographic coordinates:
>
> (object(point)(4) { ["_handle_"]=> resource(49) of type (Unknown)
> ["x"]=> float(18.454166666666) ["y"]=> float(31.758333333335) ["m"]=>)
>
> target_layer is "->getlayerbyname('WRS-2 frame')";
>
> AND: SOMETHING CHANGED:
> The message "Warning: MapServer Error in msQueryByPoint(): No matching
> record(s) found" does not appear anymore (success!)
>
> BUT: $query is an integer, that ALWAYS is "0"! i think $query should
> return "MS_SUCCESS" (1) if some objects in the shape file were found but
> it doesn't!
>
> So i think my situation has not really changed :(
>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
--
______________________________________
Vincent Schut
Sarvision B.V.
Wageningen, The Netherlands
www.sarvision.com
More information about the MapServer-users
mailing list