[Users] VectorLegend and render intents
Eric Lemoine
eric.lemoine at camptocamp.com
Tue Aug 24 10:05:32 CEST 2010
On Tue, Aug 24, 2010 at 9:02 AM, Marc Jansen <jansen at terrestris.de> wrote:
> Hi Eric,
>
> thanks for your response... and indeed that is a working approach: I
> just added a dummy rule with a filter that is false for every feature of
> my dataset and the legend-entry showsd up:
>
> //...
> new OpenLayers.Rule({
> name: '...selected',
> // setting a filter that is never going to be fulfilled to
> // get a legend entry
> filter: new OpenLayers.Filter.Comparison({
> type: OpenLayers.Filter.Comparison.EQUAL_TO,
> property: "id",
> value: -1
> }),
> symbolizer: {
> strokeColor: '#22bbff',
> strokeWidth: 5,
> strokeOpacity: 1,
> fillColor: '#22bbff',
> fillOpacity: 0.4,
> pointRadius: 6
> }
> })
>
> But this really seems like a hack to me.
Inconvenient would be a proper term :-)
You probably know it but for the symbolizer you can provide
OpenLayers.Feature.Vector.style["select"].
> Is there a better approach?
Not that I know.
> Is
> it planned that future versions of the LegendPanel support different
> renderIntents?
Not that I know. But the other people know this panel more than me...
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com
More information about the Users
mailing list