Mapscript - Sorting labels

Gribol gribol at FREE.FR
Sat Jun 11 03:17:24 EDT 2005


; Try sorting your shapefile in ascending order by population, instead of
; descending order. My experience with MapServer's labeling is that labels
; that are drawn later are given preference to those that were 
; drawn earlier.
; 
; If sorting your shapefile in ascending order doesn't help, you could try
; defining a number of ANNOTATION layers that are responsible for labeling
; cities within specified (and disjoint) population ranges. (e.g. layer1 to
; label cities where: POPULATION<10000; layer2 to label cities where:
; 10000<=POPULATION<20000; layer3 to label: 20000<=POPULATION<40000; etc.)
; Then arrange the layers in your mapfile so that layers for 
; annotating small
; cities are drawn first. The number of ANNOTATION layers you use 
; will depend
; on how tolerant you are for occasional labeling "mistakes" (where 
; a smaller
; city's label is drawn in preference to that of a larger city).
; 
; Hope this helps,
; -SM

Steven,

If I do an ascending sort on the shapefile, it's working.
MapServer's labeling is very strange !
Thank you for your help.

Marc
 



More information about the mapserver-users mailing list