Hi Wojtek,
This is one of the methods I use to create styles for my map layers. I
use MySQL database to hold the features and their names. The "NAME"
attribute is the name of the feature. I would like to find some way to
hide/show the text labels depending on the zoom of the map. If the
user zooms the map out, the text labels should disappear (if there is
a lot of them, the image gets really messy). If he zooms in, they
should appear again. Can it be done by adding some rules here?
This can be done by setting the MinScaleDenominator and
MaxScaleDenominator of your existing rule. Both elements are optional
-- they define the lower and upper bounds of the scale for which your
symbolizer will be drawn.
For example:
rule.setMinScaleDenominator(1e6);
would only draw your labels when the scale of the map is greater than or
equal to 1:1,000,000.
Cheers,
Cory.
----
Cory Horner
Refractions Research Inc.
http://www.refractions.net
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users