[mapserver-users] Label size proportion to geometry size

Steve Grey stevegrey78 at gmail.com
Tue Apr 13 07:07:41 EDT 2010


Jackey,

If it can't be achieved in Map Server settings, it might be possible to
accomplish if your data is in PostGIS and you can get your data from a
database function rather than a table/view as your data source.  In that
case, and if appropriate arguments can be sent to a PostGIS function, the
dynamic part can be taken care of as part of the select.  You'll then have
to optimise the speed/structure in the PostGIS side.

I have no idea if this might work!

Steve



On 13 April 2010 09:45, Jackey Cheung <cheung.jackey at gmail.com> wrote:

> Hi all,
>
> Say, I have two polygon in the same layer, and they are at the same logical
> group/level on the map. Means that both feature should be drawn and labeled
> at the same scale. However, one polygon is much larger than (say 10 times
> larger) than the other. Currently, I let MapServer to handle the scaling
> automatically, so that in a display scale, the label of the larger one looks
> too small while the larger one looks gigantic.
>
> My thought is straight forward: tie the font size to the size of the
> polygon. However, since the label must be scaled with respect to the map
> display scale, it has to be dynamic; further, since they belongs to the same
> logical group, they'll eventually be in the same size when zoomed in enough.
> My first thought is to bind the MINSIZE to a data attribute, so that they
> start with different font sizes and eventually scaled to the same MAXSIZE.
> But the MINSIZE/MAXSIZE cannot be used in this way.
>
> Any suggestions?
>
> P.S. I'm not using mapscript, just map file.
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20100413/d8cb0666/attachment.html


More information about the mapserver-users mailing list