[Mapserver-users] query on dynamic point data

Gijs Epping gijs at gijs.com
Fri Apr 16 07:43:33 EDT 2004


Hello,

We got a problem with querying on dynamic created points. The error we
get is:

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

I understand the error, we need to index the inserted data but we can't,
because index is readonly. 

Is there a way that we can give a point an number (index number) and
read it out.

  $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();




More information about the mapserver-users mailing list