[Mapserver-users] Labeling lines from OGR

Matthew Haines mhaines94108 at hotmail.com
Tue Jan 20 23:47:48 EST 2004


I have a .tab file which I am currently accessing through OGR.  It contains 
lines like this:

OGRFeature(bklion):537
  Street (String) = FT HAMILTON
  FromLeft (Integer) = 105
  ToLeft (Integer) = 107
  FromRight (Integer) = 106
  ToRight (Integer) = 110
  ZipLeft (Integer) = 11209
  ZipRight (Integer) = 11209
  Style = PEN(w:1px,c:#c0c0c0,id:"mapinfo-pen-2.ogr-pen-0")
  LINESTRING (976686.133 162407.387,976203.783 161682.929)

When I add them to my .map file as a layer the lines draw nicely.  However I 
can't get the street ('FT HAMILTON' in this example) to draw.  What is the 
minimal stuff I can put in my layer to get these labelled?  Below is my 
current layer.  I have tried it with the STYLEITEM removed and also with the 
LABEL block removed, but no labels.

LAYER
	NAME "bk_streets"
	CONNECTIONTYPE OGR
	CONNECTION "data/streets/lion03C/bklion.tab"
	STATUS DEFAULT
	FORCE TRUE
	TYPE LINE
	STYLEITEM "AUTO"
	LABELITEM 'Street'
	CLASS
		COLOR 255 255 255
		LABEL
			COLOR 132 31 31
			SIZE 12
			TYPE TRUETYPE
			FONT arial
			POSITION CL
		END
	END
END

Thanks,

Matthew

_________________________________________________________________
There are now three new levels of MSN Hotmail Extra Storage!  Learn more. 
http://join.msn.com/?pgmarket=en-us&page=hotmail/es2&ST=1




More information about the mapserver-users mailing list