[Users] VectorLegend and render intents
Marc Jansen
jansen at terrestris.de
Tue Aug 24 09:02:39 CEST 2010
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. Is there a better approach? Is
it planned that future versions of the LegendPanel support different
renderIntents?
Regards and many thanks,
Marc
On 19.08.2010 08:45, Eric Lemoine wrote:
> On Mon, Aug 9, 2010 at 11:57 AM, Marc Jansen<jansen at terrestris.de> wrote:
>
>> Hi list,
>>
>> I have a vectorlayer with a stylemap that has different symbols for
>> selected and default features. Is it possible to get a VectorLegend for
>> both renderintents? I searched the docs but could not find an option. Is
>> there any advice you can share?
>>
>> Thanks in advance and best regards,
>>
> Hi Marc
>
> Sorry for the late response. I'm still on a
> after-vac-catch-up-with-everything phase!
>
> I think you can provide the VectorLegend with rules instead of a
> layer, and it could be rules of a "select" style. But I'm not if this
> is doable when used in a LegendPanel.
>
>
>
More information about the Users
mailing list