[Mapserver-users] distance/radius search
nida Khan
nida at webstar.co.uk
Thu Mar 20 04:55:58 PST 2003
Sorry for confusion, when I said point search I meant, search for specefic
hotel by its name.
do you guys have any example for distance search??
this is how I'm doing my point/specific search
$poLayer = $gpoMap->getlayerbyname($layer_name);
//set the status of layer on
$HTTP_FORM_VARS["$layer_name"]="Y";
$poLayer->set("status", 1);
//look through all the classes
for ($c=0; $c < $poLayer->numclasses; $c++)
{
$class=$poLayer->getclass($c);
if ($class->name == "$layer_name")
{
//check for the value if match then colour it with red
$class->setExpression($value);
$class->set("color", $red);
}
}
Nida.
----- Original Message -----
From: <woodbri at swoodbridge.com>
To: <mapserver-users at lists.gis.umn.edu>; "nida Khan" <nida at webstar.co.uk>
Sent: Thursday, March 20, 2003 12:50 PM
Subject: Re: [Mapserver-users] distance/radius search
> Nida,
>
> All you have to do is a point query with the method set to SINGLE not
> MULTIPLE and it will return the closest within the TOLERANCE or none
> is there is none in the TOLERANCE. TOLERANCE can be set in pixels or
> map units in the LAYER.
>
> If you use MULTIPLE then you will get all results within TOLERANCE
> and you will have to calculate the distances to find the closest.
>
> -Steve W.
>
> On 20 Mar 2003 at 12:18, nida Khan wrote:
>
> > Hi Every1,
> >
> > I am just going through diffrent search approches in mapserver/php. I
> > just learned how to do point search .
> >
> > I cant find any document/example on the web for distance search.
> > I want to search on all the hotels near my house, so I have a postcode
> > and I have a list of hotels with their postcodes. so how do I find the
> > one nearest to my house???
> >
> > Any help is appreciated
> > Kind Regards
> > Nida.
> >
> >
>
More information about the MapServer-users
mailing list