LabelCacheDefault - modifiable MIN_GOODNESS_FIT
-----------------------------------------------

                 Key: GEOT-2796
                 URL: http://jira.codehaus.org/browse/GEOT-2796
             Project: GeoTools
          Issue Type: Improvement
          Components: core render
    Affects Versions: 2.5.8
            Reporter: Kang Mann Ern
            Assignee: Andrea Aime
            Priority: Minor


LabelCacheDefault filters out labels based on goodness of fit by comparing 
against a predefined constant MIN_GOODNESS_FIT. This prevents some labels from 
showing, especially long labels with small geometry. It would be helpful if the 
MIN_GOODNESS_FIT value could be changed to a variable which is modifiable via 
TextSymbolizer options. For now, LabelCacheImpl can be used instead, as it 
allows configuration of the goodness of fit threshold via the "goodnessOfFit" 
option using TextSymbolizer:

TextSymbolizer textSym;
....
textSym.addToOptions("goodnessOfFit", some_double_value);

How to switch to LabelCacheImpl using StreamingRenderer:
For my own application, I am using StreamingRenderer which defaults to 
LabelCacheDefault as the LabelCache. To switch to LabelCacheImpl, pass in a 
renderer hint:

renderer = new StreamingRenderer();
Map hints = new HashMap();
hints.put(StreamingRenderer.LABEL_CACHE_KEY, new LabelCacheImpl());
renderer.setRendererHints(hints);

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to