Details
-
Type:
Bug
-
Status:
Analysis
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: UDIG 1.2.M4
-
Fix Version/s: UDIG 1.4.1
-
Component/s: application
-
Labels:None
-
Environment:Ubuntu 9.04
java version "1.6.0_10"
Java(TM) SE Runtime Environment (build 1.6.0_10-b33)
Java HotSpot(TM) Server VM (build 11.0-b15, mixed mode)
Description
http://www.nabble.com/Change-the-style-td24984034.html
Changing the style programmatically does not apply style on screen with current scaledenominator.
If change the style, and zoom in or out, the style has changed with new scale, but if you go back to previous scale, it still has it previous size in symbolizers.
I think it is something with org.geotools.renderer.style.SLDStyleFactory.createStyle, and more precisely its SymbolKey
hashCode & equals methods, because they are using only symbolizer internal pointer and scaleRange values
to compare should previous instance return.
There is plugin project as an attachment, run tst.project, include stuff/timezones.shp, and zoom to some level, push the "Button" to change the style and style should not
change, now zoom to level which you havent been (there is no style object in SLDStyleFactory.staticSymbolizers), and you should see
new style, now go back to previous and original style should be return from SLDStyleFactory.staticSymbolizer.
from Style, precisely its visit(FeatureTypeStyle) does not work correctly, the rules symbolizer are just pointers to
originals, so SymbolKey in SLDStyleFactory does not work.
Check the attachment Button1.java's reimplementation about DuplicatingStyleVisitor.visit(FeatureTypeStyle), at
least for me that works fine.