[OpenLayers-Users] Lables for Polygons in OpenLayers

fend0009 fend0009 at umn.edu
Fri Jul 27 11:28:35 EDT 2007


 Hi list:
>
> I am a newbie to OpenLayers and trying to develop an application that will
> display names for economic development regions as in the example below.
>
> http://maps.socsci.umn.edu/~fend0009/2006/My2006/OpenLayers/OpenLayers.html
>
> I discovered that although I set the mindistance of labels to 200 pixels in
> the mapfile I still get duplicate labels for bigger regions. Does anyone
have
> a strategy to cope with this problem??? Any pointer will be highly
> appreciated.
>
> Jessica
>
> MAP
> NAME 'OpenLayers'
> EXTENT 125000 4785000 788000 5489000
> UNITS METERS
> SIZE 300 400
> .........
>
> LAYER
> NAME 'county'
> TYPE POLYGON
> STATUS OFF
> DATA '/home/fend0009/public_html/2006/My2006/OpenLayers/Data/county'
> CLASS
> NAME 'County Boundaries'
> STYLE
> COLOR 255 255 0
> OUTLINECOLOR 0 0 0
> END
> END
> TOLERANCE 0
> METADATA
> WMS_TITLE 'Minnesota County Boundaries'
> WMS_SRS 'epsg:26915'
> END
> END
>
> LAYER
> NAME 'regions'
> TYPE POLYGON
> STATUS OFF
> DATA
'/home/fend0009/public_html/2006/My2006/OpenLayers/Data/ED_Regions'
> LABELITEM 'EDR_2'
> CLASSITEM 'EDR'
> CLASS
> NAME 'Region 1'
> EXPRESSION ('[EDR]' eq 'Region 1')
> STYLE
> COLOR 189 158 120
> OUTLINECOLOR 0 0 0
> END
> LABEL
> SIZE MEDIUM
> COLOR 0 0 0
> OUTLINECOLOR 255 255 255
> MINDISTANCE 200
> PARTIALS FALSE
> END
> END
> CLASS
> NAME 'Region 2'
> EXPRESSION ('[EDR]' eq 'Region 2')
> STYLE
> COLOR 203 201 226
> OUTLINECOLOR 0 0 0
> END
> LABEL
> SIZE MEDIUM
> COLOR 0 0 0
> OUTLINECOLOR 255 255 255
> MINDISTANCE 200
> PARTIALS FALSE
> END
> END
> ...........
> METADATA
> WMS_TITLE 'Economic Development'
> WMS_SRS 'epsg:26915'
> END
> END 




More information about the Users mailing list