[Mapserver-users] Unique? Was: mapscript - queryByPoint help, simple Q
woodbri at swoodbridge.com
woodbri at swoodbridge.com
Fri Aug 29 14:37:18 PDT 2003
poff,
Do you have TOLERANCE set to a value, if it defaults to 0.0 then it
is going to be pretty hard to selecet a point.
-Steve
On 29 Aug 2003 at 14:08, poff wrote:
> Hello
>
> I know everyone is busy - and thanks a lot for your help.
>
> Only, does _no-one_ use querbypoint with php mapscript?
>
> It's a great feature if I could get it working, and definitely
> something to go in Wiki someday!
>
> Thanks
>
> P
>
> On Thu, Aug 28, 2003 at 11:40:42PM +0200, poff wrote:
> > > The problem is probably in your map file.
> > > TEMPLATE belongs in the LAYER not the CLASS.
> >
> > Thanks, I changed this and no change to the outcome.
> >
> > However, I added the TEMPLATE tag to all of the layers and then
> > suddenly, on the last layer:
> >
> > Warning: MapServer Error in msOpenSHPFile(): No (NULL) filename
> > provided
> >
> > This is using $mapObj->query...
> >
> > With the $uLayer->query it just says no records.
> >
> > Then when I changed $uLayer to the last one they both give the NULL
> > error.
> >
> > I'll go bald with all this hair pulling out!
> >
> > Thanks,
> >
> > P
> >
> > >
> > >
> > > On Thu, 2003-08-28 at 19:15, poff wrote:
> > > > Hello again
> > > >
> > > > I've tried all the list suggestions with the followig code, but
> > > > am _still_ getting "No Records Found".
> > > >
> > > > If anyone could suggest or point out what I'm doing wrong I'd be
> > > > greatly indebted to them!
> > > >
> > > > Here it goes:
> > > >
> > > > ...
> > > > $map = ms_newMapObj($mapfile);
> > > >
> > > > $uLayer = $map->getLayerByName("Points");
> > > > $uLayer->set("status",1);
> > > >
> > > > $image=$map->draw();
> > > >
> > > > while () {
> > > >
> > > > $oPoint = ms_newPointObj();
> > > > $oPoint->setXY($geoData['px'], $geoData['py']);
> > > >
> > > > $line = ms_newLineObj();
> > > > $line->add($oPoint);
> > > >
> > > > $shp=ms_newShapeObj(MS_SHAPE_POINT);
> > > > $shp->add($line);
> > > > $shp->{text}=$geoData['place_name'];
> > > > $shp->{index}=$i;
> > > >
> > > > $uLayer->addFeature($shp);
> > > >
> > > > $oPoint->draw($map, $uLayer, $image, 0,
> > > > $geoData['place_name']);
> > > >
> > > > }
> > > >
> > > > $my_point = ms_newpointObj();
> > > > $my_point->setXY($_REQUEST["mapa_x"],$_REQUEST["mapa_y"]);
> > > >
> > > > $map->queryByPoint($my_point, MS_SINGLE, 20);
> > > >
> > > > $uLayer->queryByPoint($my_point,MS_SINGLE,-10); // for good
> > > > measure ...
> > > >
> > > > And the mapfile:
> > > >
> > > > ...
> > > > LAYER
> > > > NAME "Points"
> > > > STATUS ON
> > > > TYPE POINT
> > > > LABELCACHE FALSE
> > > > CLASS
> > > > NAME "User Marker"
> > > > SYMBOL "marker"
> > > > TEMPLATE "dummy"
> > > > LABEL
> > > > ...
> > > > END
> > > > END
> > > > END
> > > > ...
> > > >
> > > > I'm pretty stumped! I tried by $map-> and $Layer-> queryByPoint
> > > > to no great joy.
> > > >
> > > > Thanks in advance,
> > > >
> > > > P
> > > >
> > > > --
> > > > poff at sixbit.org
> > > > SDF Public Access UNIX System - http://sdf.lonestar.org
> > > >
> > > > Please do not carbon copy replies to me
> > > > _______________________________________________
> > > > Mapserver-users mailing list
> > > > Mapserver-users at lists.gis.umn.edu
> > > > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> > > >
> > >
> > >
> > > _______________________________________________
> > > Mapserver-users mailing list
> > > Mapserver-users at lists.gis.umn.edu
> > > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> >
> > --
> > poff at sixbit.org
> > SDF Public Access UNIX System - http://sdf.lonestar.org
> >
> > Please do not carbon copy replies to me
> > _______________________________________________
> > Mapserver-users mailing list
> > Mapserver-users at lists.gis.umn.edu
> > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
> --
> poff at sixbit.org
> SDF Public Access UNIX System - http://sdf.lonestar.org
>
> Please do not carbon copy replies to me
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
More information about the MapServer-users
mailing list