[mapserver-users] Label once per shape

T_Junky Robert.Vogt at RCIS.com
Tue May 13 08:08:36 PDT 2014


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.



More information about the MapServer-users mailing list