[OpenLayers-Dev] Style question

Tim Schaub tschaub at openplans.org
Thu Apr 10 10:11:54 EDT 2008


Functionality first, convenience second.  The feature.style property was 
convenient, but very limited in functionality.  The new stuff is getting 
very functional.  A feature.getSymbolizer method isn't that hard to 
imagine adding.

Tim

Eric Lemoine wrote:
> On Wed, Apr 9, 2008 at 4:31 PM, Andreas Hocevar
> <andreas.hocevar at gmail.com> wrote:
>> Eric,
>>
>>
>>
>>  Eric Lemoine wrote:
>>
>>> Hi. A style-related question: i've styled my vector layer using
>>> StyleMap, Style and Rule. Now i'm in a featureselected event callback
>>> and i'd like to get the current style (fillColor) of the selected
>>> feature. I'm afraid i can't as the current feature style isn't stored
>>> in the feature but only in the renderer deepness. Can someone confirm?
>>>
>>>
>>  No problem to get the current symbolizer:
>>
>>  var symbolizer = feature.layer.styleMap.createSymbolizer(feature,
>> feature.renderIntent);
> 
> Obviously! Thanks Andreas,
> 
> --
> Eric
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev
> 
> !DSPAM:4033,47fce970172191637810514!
> 




More information about the Dev mailing list