[mapserver-users] Scaling Image Symbol Offset

Andreas Albarello andreas.albarello at territoriumonline.com
Fri Jul 17 03:56:10 EDT 2009


David Martin wrote:
> As you can see I am sizing the output symbol which is a 20x20px PIXMAP 
> image – this is working great however the position of the image needs to 
> be OFFSET up by half the size of the image (to make the actual point be 
> the center of the image) – I have tried using OFFSET however when the 
> image size changes (based on SYMBOLSCALE)the offsets are wrong. Is there 
> a way to OFFSET image symbols based on the SYMBOLSCALE and MAX/MIN SIZES?

David,

unfortunately, OFFSET behaves exactly the way you are pointing out, that 
is, it doesn't scale because it's values are expressed in pixels no 
matter what SIZEUNITS or SYMBOLSCALE.

As to the task you would like to accomplish, though, what about making 
the image itself twice as tall and moving the symbol into the upper half 
of the image, thus having the center of your image located beneath the 
symbol itself? The image would still scale correctly and account for 
offsetting the symbol by itself.

Best regards,
-- 
--------------------------------------------------------------------
Andreas Albarello
Analysis & SW Development

Territorium Online srl/GmbH
Via Buozzi Str. 12
I 39100 Bolzano/Bozen

Phone:  +39 0471 068611
Fax:    +39 0471 068619

email: andreas.albarello at territoriumonline.com
web:   http://www.territoriumonline.com
--------------------------------------------------------------------


More information about the mapserver-users mailing list