[Mapserver-users] query on dynamic point data
Gijs Epping
gijs at gijs.com
Fri Apr 16 07:02:38 PDT 2004
> -----Oorspronkelijk bericht-----
> Van: Eric Bridger [mailto:eric at gomoos.org]
> Verzonden: vrijdag 16 april 2004 15:30
> Aan: Gijs Epping
> CC: 'Mapserver List'
> Onderwerp: RE: [Mapserver-users] query on dynamic point data
>
> On Fri, 2004-04-16 at 09:17, Gijs Epping wrote:
>
> > >
> > > $layer = ms_newlayerObj($gpoMap);
> > > $layer->set("name", "pnts");
> > > $layer->set("type", MS_LAYER_POINT);
> > > $layer->group='standaard';
> > > $layer->set("status", MS_ON);
> > >
> > > $class = ms_newClassObj($layer);
> > > $class->set("template", "blabla.html");
> > > $style = ms_newStyleObj($class);
> > > $style->color->setRGB(0,0,0);
> > > $style->set("symbolname", "star");
> > > $style->set("size", 10);
> > >
> > >
> > >
> > > $point_lookup1 = array(146626, 511696);
> > > $layerObj = $gpoMap->getLayerByName(pnts);
> > > $line = ms_newLineObj();
> > > $shp =ms_newShapeObj(MS_SHAPE_POINT);
> > >
> > >
> > > $point = ms_newPointObj();
> > > $point->setXY($point_lookup1[0], $point_lookup1[1]);
> > > $line->add($point);
> > > $shp->add($line);
> > >
> > >
> > > $layerObj->addFeature($shp);
> > >
> > > $gpoMap->draw();
> >
> > In mapserver3.6 I use very similiar code but with the addition of:
> > $shp->{index} = $id
> >
> > $id must be numeric. This $id is returned by the query.
> >
> >
> >
> > Do you use this with perl or with php because we are using php and
we
> > don't get anything back.
> >
> > This is what I get back from $oRes = $oLayer->getResult($iRes);:
> >
> > stdClass Object ( [shapeindex] => -1 [tileindex] => -1 [classindex]
=> 0
> > )
> >
>
> This was in perl mapscript 3.6. There is a detailed example, with
> comments here:
>
http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PerlMapScriptExamples35ex19
>
> The other difference I notice is that I used $point->draw() to draw
the
> points, not $map->draw().
>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
Thanks for the help but it is still not working in php I can not set the
shapeindex it is read only, so i have to find a other way to solve this
problem.
Thanks again
Gijs
More information about the MapServer-users
mailing list