Hi all.
I´m havin some problems with labes on my map. I´m trying to implement a
"street search" in my app. The search by name works well, and when user
makes the search, I display a map with the matching streets in a different
colour.
But I´ve a problem with labels.
Streets are labelled, but labels only appear at a determined scale
(correct). But when I do the search, I want to display the labels of the
resulting street, whatever the scale/zoom, because some streets could be
very little in map (at big scale)
I´ve tried using the setMinScaleDenominator/setMaxScaleDenominator methods
in rules. But it seems that labels aren´t affected...
There´s the part of my code where I define the rule of the selected streets´
labels (simple)
TextSymbolizer txtSelected = styleFactory.createTextSymbolizer();
txtSelected.getOptions().put("followLine", "true");
txtSelected.getOptions().put("group", "true");
txtSelected.setLabel(ex);
txtSelected.setFont(styleBuilder.createFont("Arial", false, true,
12));
txtSelected.setHalo(styleBuilder.createHalo(Color.RED, 1));
Rule ruleTextSelected = styleFactory.createRule();
ruleTextSelected.setMinScaleDenominator(1e5);
//ruleTextSelected.setMaxScaleDenominator(1e300);
ruleTextSelected.symbolizers().add(txtSelected);
ruleTextSelected.setFilter(CQL.toFilter("NOM_VIA LIKE '" + name +
"'"));
Labels of selected streets are displayed in red correctly, but only when
zoom is near.
I figured that part would be easy...but I´m going crazy...
Help please!!
Alberto Silva López.
Researcher and Software Developer @ University of A Coruña (UDC).
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users