Ok, this is going to sound like a weird one (Label POSITION Scaling)

Bob Basques bob.basques at CI.STPAUL.MN.US
Wed Dec 28 15:01:31 PST 2005


No special symbols, just circles for points:

The attached image shows what I get for output.

My Mapfile:

MAP
	NAME ORACLE_TEST
	SIZE 600 600
	EXTENT 540000 135000 600000 175000

#	SIZE 800 650
#	EXTENT 593133.398829 170094.734526 593893.148973 170712.010326

	STATUS ON

	DEBUG ON

	##UNITS FEET

	IMAGETYPE PNG
	SYMBOLSET address.symbols

	TRANSPARENT TRUE

  QUERYMAP
    STATUS ON
    STYLE SELECTED
  END


  WEB
	QUERYFORMAT "text/xml"
    IMAGEPATH "/var/www/html/tmp/"
    IMAGEURL "/tmp/"
    TEMPLATE '../../imagemap/monuments_template.html'
  END
LAYER
	NAME "Address2"
	STATUS DEFAULT
	CONNECTIONTYPE OGR
	CONNECTION "OCI:gismo/********@geo"
	DATA "ADDRESS_OGR_VIEW"
	TYPE POINT
	LABELITEM 'HOUSENUMBER'
	CLASS
      		OUTLINECOLOR 0 0 0
      		LABEL
        		FORCE TRUE
        		COLOR 255 255 0
        		OUTLINECOLOR 0 0 0
        		SIZE LARGE
        		#WRAP ' '
        		POSITION ur
        		OFFSET 8 8
      		END
        END
	MAXSCALE 16000
END
LAYER
	NAME "Address2"
	STATUS DEFAULT
	CONNECTIONTYPE OGR
	CONNECTION "OCI:gismo/********@geo"
	DATA "ADDRESS_OGR_VIEW"
	TYPE POINT
	LABELITEM 'STATUS'
	CLASS
      		OUTLINECOLOR 0 0 0
      		LABEL
        		FORCE TRUE
        		COLOR 255 255 0
        		OUTLINECOLOR 0 0 0 
        		SIZE LARGE
        		#WRAP ' '
        		POSITION ll
        		OFFSET 0 0
      		END
        END
	MAXSCALE 16000
END

LAYER
	NAME "Address2"
	STATUS DEFAULT

	# OGR SET
	
	CONNECTIONTYPE OGR
	
	CONNECTION "OCI:gismo/*********@geo"
	
	DATA "ADDRESS_OGR_VIEW"
	TYPE POINT
	CLASSITEM 'TYPE'
    	CLASS
		EXPRESSION /Primary/
		COLOR 0 0 0
      		SIZE 21
      		SYMBOL 'circle'	
		OVERLAYCOLOR 0 255 0
      		OVERLAYSIZE 15
      		OVERLAYSYMBOL 'circle'
    	END
    	CLASS
		EXPRESSION /Secondary/
     		COLOR 0 0 0
      		SIZE 35
      		SYMBOL '3point'
      		OVERLAYCOLOR 255 255 0
      		OVERLAYSIZE 19
      		OVERLAYSYMBOL '3point'
    	END
    	CLASS
     		EXPRESSION /Other/
     		COLOR 0 0 0
      		SIZE 35
      		SYMBOL 'star'
      		OVERLAYCOLOR 255 255 0
      		OVERLAYSIZE 19
      		OVERLAYSYMBOL 'star'
    	END
	CLASS
		EXPRESSION /Unofficial-Alias/
		COLOR 0 0 0
		SIZE 21
		SYMBOL 'triangle'
		OVERLAYCOLOR 255 0 0
      		OVERLAYSIZE 12
      		OVERLAYSYMBOL 'triangle'
	END
	CLASS
		EXPRESSION /Landlocked/
		COLOR 0 0 0
		SIZE 21
		SYMBOL 'diamond'
		OVERLAYCOLOR 205 0 0
      		OVERLAYSIZE 12
      		OVERLAYSYMBOL 'diamond'
	END

	HEADER	'/pearl/DB/SAINT_PAUL/PUBLIC_WORKS/ADDRESS/address_header.xml'
	TEMPLATE	'/pearl/DB/SAINT_PAUL/PUBLIC_WORKS/ADDRESS/address_record.xml'
	FOOTER	'/pearl/DB/SAINT_PAUL/PUBLIC_WORKS/ADDRESS/address_footer.xml'
	MAXSCALE 16000
END ##LAYER



END




bobb


Steve Lime wrote:

>There looks to be a bug someplace. *argh*
>
>  See http://maps.dnr.state.mn.us/cgi-bin/mapserv48?map=/usr/local/www/docs_maps/testing/placement/test.map&mode=map
>
>You shouldn't need to manually compute any offset. The code is written to take into account
>the symbol size when computing label position. The labels are offset by 1/2 the marker size. (The
>user defined offset is applied after that.) I can only guess that there is something busted in the
>size computation function. I'll check on that.
>
>Steve
>
>  
>
>>>>Bob Basques <bob.basques at CI.STPAUL.MN.US> 12/28/05 2:15 PM >>>
>>>>        
>>>>
>All,
>
>Why isn't there a way to define how far out the Label POSITION value 
>should be, what is the value anyway?
>
>Couldn't a label SCALE value work for something like this?  For example, 
>I' working with a fairly large Symbol and the Labels are drawing over 
>the top of the symbols.  I'm trying to align one symbol to the upper 
>right, with left justification, and another at the lower Left with right 
>justification.  I tried with the OFFSET parameter, but the negative 
>numbers seems to be giving MapServer heartache.  So I tried it with the 
>POSTION paramter and while it works as it should, the Labels are still 
>ending up on top of the Symbols.
>
>With a (pixel) SCALING applied to the POSITION parameter, all would be 
>well in my own little universe.
>
>I guess this might be an enhancement request.  I did a couple of 
>searches in Bugzilla and didn't see anything related to this.
>
>Possibly with a way to enter the negative number I can get the OFFSET 
>parameter to help with placement, as using it along side of POSITION 
>works fine with positive numbers.  :c)
>
>bobb
>
>
>  
>



More information about the MapServer-users mailing list