FWD: Problems with queryUsingPoint (PHP)...
teb
teb at mallit.fr.umn.edu
Mon Dec 4 12:56:22 PST 2000
------------- Begin Forwarded Message -------------
From: "Andy Waxman" <awaxman at speakeasy.org>
To: <mapserver-info at lists.gis.umn.edu>
Subject: Problems with queryUsingPoint (PHP)...
Date: Mon, 4 Dec 2000 15:30:14 -0500
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
I am using the PHP extension with php4.0.3 with the 11/1 nightly build of
3.3.0.12.
I am trying to write a simple identify tool which opens to a new window.
The problem is that browser complains with an empty page error when I try to
query the layer.
I don't even get "Hello World" dumps.
Has anyone heard from DMSolutions about their big contract for a new version
of the php module with extended functionality?
TIA,
Andy Waxman
awaxman at speakeasy.org
Here is the php code (theme,mapx and mapy are passed in as args)
<?
// Only Load the extension if needed.
if (!extension_loaded("php_mapscript.so"))
dl("php_mapscript.so");
$map = ms_newMapObj("gaar.map");
$aLayer = $map->getLayer($theme);
print("<html><head><title>Identify Results for ");
print($aLayer->description);
print("</title></head><body>\n");
print("Hello World<br>");
$pt = ms_newPointObj();
$pt->setXY($mapx,$mapy);
// Huge Tolerance to ensure something is hit.
$qrset = $aLayer->queryUsingPoint($pt, MS_MULTIPLE, 300);
if ($qrset==0)
print("No Results Found<br>");
else
print("Got Results<br>");
$qrset->free();
print("Hello World");
print("</body></html>");
?>
Here is my map file
MAP
NAME GAAR
SIZE 653 480
STATUS ON
EXTENT -144243.3545 1838671.0097 202145.6455 2093461.0097
UNITS METERS
SHAPEPATH /usr/local/ak_data/
WEB
IMAGEPATH "/usr/local/apache/htdocs/tmp/"
IMAGEURL "/tmp/"
END
LAYER
NAME "Landsat TM Mosaic"
DESCRIPTION "Landsat TM Mosaic"
STATUS ON
DATA data/imagery/gaar_tm_432.tif
TYPE RASTER
END
LAYER
NAME ima
DESCRIPTION "Intensive Mapping Areas"
STATUS ON
DATA data/themes/imabox
TYPE polygon
CLASSITEM 'box_id'
CLASS
NAME "Intensive Mapping Areas"
OUTLINECOLOR 0 0 0
END
QUERYITEM 'box_id'
QUERY
EXPRESSION /./ # Get all the items
TEMPLATE "null" # Not using a template
END
END
LEGEND
KEYSIZE 18 12
LABEL
TYPE BITMAP
SIZE MEDIUM
COLOR 0 0 89
END
STATUS ON
END
END
------------- End Forwarded Message -------------
More information about the MapServer-users
mailing list