Jackey,<br><br>There certainly would be more to manage with separate
classes/layers for different scales, however a function could instead
return the raw source data, with additional appended column(s) for text
size/max size etc. calculated by the function and based on the supplied
scale.<br>
<br>Also, the function doesn't need to be written for every layer - if
you pass the name of the layer as an argument to the function call, the
function could construct and execute the SQL to return complete records
for the supplied area and supplied layer, with additional calculated
columns for the text size.<br>
<br>In this case you'd always be returning a set of RECORD values, and
the downside is PostgreSQL has to match the returned RECORD to a list of
columns you define as part of the select - along the lines of "<span style="font-family: courier new,monospace;">select * from myfunction()
as mytypedef(val1 int,val2 varchar)</span>", and with a wide table this
could make for wordy SQL.<br>
<br>The speed shouldn't be noticeably affected - the data source would
be selected by spatial selection on a data source, and a few operations
to calculate a scale shouldn't cost too much.<br><br>Might I ask for you
to also post replies back to the group?<br>
<br>Thanks,<br><br>Steve<br><br><br><br><div class="gmail_quote">On 14 April 2010 06:35, Jackey Cheung <span dir="ltr"><<a href="mailto:cheung.jackey@gmail.com">cheung.jackey@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Steve,<div><br></div><div>I think this is a possible solution. However, it'll involve much extra effort to implement, and the whole process will get complicated. To make it that way, we have to setup separate classes/layers for different scales, and then pass the scale as parameter to the database. As the map grows bigger, and more and more layers are added to it, people will get confused and lost. And I think, it'll be impact to map rendering too.</div>
<div><div></div><div class="h5">
<div><br></div><div><br><br><div class="gmail_quote">On Tue, Apr 13, 2010 at 7:07 PM, Steve Grey <span dir="ltr"><<a href="mailto:stevegrey78@gmail.com" target="_blank">stevegrey78@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Jackey,<br><br>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.<br>
<br>I have no idea if this might work!<br><font color="#888888"><br>Steve<br><br><br><br></font><div class="gmail_quote"><div><div></div><div>On 13 April 2010 09:45, Jackey Cheung <span dir="ltr"><<a href="mailto:cheung.jackey@gmail.com" target="_blank">cheung.jackey@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div></div><div><div><div></div><div><span style="font-family: arial,sans-serif; font-size: 13px; border-collapse: collapse;">Hi all,<div>
<br></div><div>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.</div>
<div><br></div><div>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.</div>
<div><br></div><div>Any suggestions?</div><div><br></div><div>P.S. I'm not using mapscript, just map file.</div></span>
</div></div><br></div></div><div>_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
<br></div></blockquote></div><br><div style="display: inline;"></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br><div style="visibility: hidden; display: inline;" id="avg_ls_inline_popup"></div><style type="text/css">#avg_ls_inline_popup { position:absolute; z-index:9999; padding: 0px 0px; margin-left: 0px; margin-top: 0px; width: 240px; overflow: hidden; word-wrap: break-word; color: black; font-size: 10px; text-align: left; line-height: 13px;}</style>