[mapserver-users] getShape on a tiled layer

Nick Elliott nickfromengland at email.com
Thu Mar 21 11:22:27 EST 2002


Hey, I'm I'm problems using $layer->getShape($tileindex, $shapeindex) with a tiled layer.

I'm using MapScript, vs 3.5 and PHP

	$pLayer = $map->GetLayerByName($layername);
	$map->QueryByRect($region);
	$rCount = $pLayer->GetNumResults();
	$pLayer->open($map->shapepath);
	for($t = 0; $t < $rCount; $t++)
	{
		$pResult = $pLayer->GetResult($t);
		$pShape = $pLayer->GetShape($pResult->tileindex, $pResult->shapeindex);
		}
	$pLayer->close();


Basically, it looks like the script bails out with a:
 Fatal error: MapServer Error in msSearchDiskTree()

My MAP file layer is as follows:

LAYER
  NAME "ZipCodes"
  TYPE polyline
  #MAXSCALE 1000000
  LABELITEM "NAME"
  TILEINDEX "/usr/gisdata/zipcode_shape/ziptile"
  TILEITEM "Location"
  STATUS on 
  CLASS
    NAME "ZipCodes"
    OUTLINECOLOR 0 150 0
    TEMPLATE void
    COLOR 0 150 0
    LABEL
		POSITION CC
		SIZE medium
		COLOR 0 0 0
	END
  END
END # LAYER

Any ideas?
-- 

_______________________________________________
Sign-up for your own FREE Personalized E-mail at Email.com
http://www.email.com/?sr=signup

Win the Ultimate Hawaiian Experience from Travelocity.
http://ad.doubleclick.net/clk;4018363;6991039;n?http://svc.travelocity.com/promos/winhawaii/




More information about the mapserver-users mailing list