[Mapserver-dev] [PHP] set shape index (virtual shapes)

Gijs Epping gijs at gijs.com
Mon Apr 19 11:20:46 EDT 2004


Hello,

I hope you guy's can help me, on the regular list nobody could help me.

I am creating virtual points with the following snippet:

  $point_lookup = array(146626, 511696);

  $line = ms_newLineObj();
  $line->addXY($point_lookup[0], $point_lookup[1]);

  $shp =ms_newShapeObj(MS_SHAPE_LINE);
  $shp->add($line);

  $layerObj = $gpoMap->getLayerByName('virtpoint');
  $layerObj->addFeature($shp);


I want to query without any dbf file but that shouldn't be a problem if
I could set the index of the shape file with the following

$shp->set(index, 2);

But the index is only readable, but if I don't do this I get the
following error:

[MapServer Error]: msLayerGetShape(): Cannot retrieve inline shapes
randomly.



How can I solve this because it should be possible to set the index
right???? 

The point is created by the way, that works perfect.

Thanks in advance for any info about this problem.
Gijs Epping




More information about the mapserver-dev mailing list