[mapserver-users] Label once per shape

Lime, Steve D (MNIT) Steve.Lime at state.mn.us
Tue May 13 08:19:11 PDT 2014


Try adding this to the States layer:

  PROCESSING 'LABEL_NO_CLIP=1'

This tells MapServer to compute a label point before clipping the geometry. Basically it fixes the label point.

Steve

-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of T_Junky
Sent: Tuesday, May 13, 2014 10:09 AM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] Label once per shape

I am using MapServer and Openlayers to draw my maps.

The problem I am having is that a lot of my layers are tiled and I need to label just the shape displayed and not the tile(which is what's happening now)...

Here's an example of what's happening.

<http://osgeo-org.1560.x6.nabble.com/file/n5140026/MSLabelExample.jpg> 


My Map file looks like this...

MAP
  IMAGETYPE      PNG24
  CONFIG "PROJ_LIB" "C:/Program Files/MapServer/projlib/"
  EXTENT         -180 -90 180 90
  SIZE           256 256
  FONTSET "C:/Program Files/MapServer/content/fontset.txt"
  IMAGECOLOR     255 255 255
  TRANSPARENT ON
  PROJECTION 
     AUTO
  END
	LAYER
  		NAME "States"
  		TYPE POLYGON
  		STATUS ON
		LABELCACHE ON 
  		CONNECTIONTYPE PLUGIN
  		PLUGIN "msplugin_mssql2008.dll"
  		CONNECTION
"server=stbisqlr3.dvcorp.rcis.com,5208;uid=Mapping01D;pwd=9GreenSnap#4D;Initial
Catalog=NATIONALDB;Integrated Security=False"
  		DATA "shape(geography),ST_NAME_MC from NATIONALDB.sde.STATES USING INDEX S11_idx USING UNIQUE STATES_ID USING SRID=4269"
		LABELITEM    "ST_NAME_MC"
		CLASS
			STYLE			 
			 OUTLINECOLOR 000 153 000
			 WIDTH 3
			END
			 LABEL
				COLOR 000 153 000
				TYPE TRUETYPE
				FONT Arial 
				SIZE 12
				ANTIALIAS TRUE
				POSITION AUTO
				PARTIALS FALSE
				MINDISTANCE 2000
				MINSCALEDENOM 20.00
				
			END
		END		
    	PROJECTION 
     		 AUTO
    	END
  	END

END





--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Label-once-per-shape-tp5140026.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users




More information about the mapserver-users mailing list