[mapserver-users] Scaling Image Symbol Offset

Steve Lime Steve.Lime at dnr.state.mn.us
Thu Aug 13 10:39:54 EDT 2009


Hi David: There is no connection between offset and symbol size. The offset is independent and given
as a constant value in pixels (although it is scaled). Sounds like you need to change it dynamically based
on your image size and that can't be done as things sit now. Can you fix your image size or is it and I'm
missing something.

Steve

>>> On 7/16/2009 at 3:51 AM, in message
<9C37154DC7C8074FBC34214363755B7C33087F at ITB-SVR-01.itbeyond.local>, "David
Martin" <David at itbeyond.com.au> wrote:
> I am developing a new application and am rendering around a load of
> graphic symbol layers using a Map file layer such as
> 
> LAYER
> 
>     NAME        cape_headland_point
> 
>     STATUS      ON
> 
>     GROUP       all
> 
>     DATA        'ExplorOz/Places/Cape,Headland,Point'
> 
>     TYPE        POINT
> 
>     SYMBOLSCALE 1000000
> 
>     CLASS
> 
>         STYLE
> 
>             SYMBOL [POIImage]
> 
>             MAXSIZE 15
> 
>             MINSIZE 4
> 
>             SIZE 8
> 
>         END
> 
>     END
> 
>     METADATA
> 
>           "wms_title"         "Capes, Headlands & Points"
> 
>       END
> 
>     PROJECTION
> 
>         "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs"
> 
>     END
> 
> END
> 
> 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?
> 
> Regards
> 
> David



More information about the mapserver-users mailing list