<div dir="ltr">Hi Xavier<div><br></div><div style>thanks for your solution using other layers, I'll give it a try. </div><div style>I thought about it also at a first place but I was afraid of the performance overhead to have potentially 4 more layers (of about 1000 features each) to achieve that.</div>
<div style>After digging in the source code, another (more complicated) solution would have been to create a custom renderer which can create symbols compositions, </div><div style>for example in my case a svg renderer which could attach multiple child nodes to the feature node rendered. </div>
<div style>I havent yet figured how to do that, but maybe it could be a nice feature for openlayers and I may experiment with it if I have more time :)</div><div style>  </div><div style>Regards</div><div style>Yves</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/2/6 Xavier Mamano (jorix) <span dir="ltr"><<a href="mailto:xavier.mamano@gmail.com" target="_blank">xavier.mamano@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Yves,<br>
<br>
It's not pretty, but could create a slave layer as:<br>
<br>
var mySlaveLayer = new OpenLayers.Layer.Vector("slave", {<br>
   displayInLayerSwitcher: false,<br>
   style: myOtherStyle<br>
});<br>
myLayer.events.on({<br>
    'featuresadded': function(evt) {<br>
        mySlaveLayer.addFeatures(evt.features.slice());<br>
    },<br>
    'featuresremoved': function(evt) {<br>
        mySlaveLayer.removeFeatures(evt.features.slice());<br>
    },<br>
    'visibilitychanged': ....<br>
});<br>
<br>
with two layers be sufficient, the numbers can be labels.<br>
<br>
You have a few hours of work for adjust this...<br>
<br>
Regards,<br>
<br>
Xavier Mamano<br>
<br>
<br>
Yves G wrote<br>
<div class="im">> Hi there,<br>
> thanks for your input.<br>
><br>
> But if you look my image mockup of what I m trying to display , I want to<br>
> style the station along with some of its attributes (sort of symbols<br>
> composition, not just the point one) .<br>
> I'd be glad if you could update my example here<br>
> <a href="http://jsfiddle.net/jLEYS/3/" target="_blank">http://jsfiddle.net/jLEYS/3/</a> to<br>
> show me how I could achieve that using the StyleMap<br>
><br>
> Regards,<br>
> Yves<br>
><br>
><br>
><br>
</div>> 2013/2/5 Sergeant_york &lt;<br>
<br>
> electronicpanda@<br>
<br>
> &gt;<br>
<div><div class="h5">><br>
>> var style = new OpenLayers.Style({<br>
>>     externalGraphic: '${graphicFunction}',<br>
>>      graphicYOffset: '${graphicYOffsetFunction}',<br>
>>      graphicXOffset: '${graphicXOffsetFunction}',<br>
>>     /* etc... */<br>
>> }, {<br>
>>     context: {<br>
>>         graphicFunction: function(feature) {<br>
>>             if(feature.attributes.type=='bike') return '/bike.png';<br>
>>             else if(feature.attributes.type=='hospital') return<br>
>> '/hospital.png';<br>
>>             /*etc...*/<br>
>>         },<br>
>>         graphicYOffsetFunction: function(feature){<br>
>>             if(feature.attributes.type=='bike') return 10;<br>
>>             else if(feature.attributes.type=='hospital') return -10;<br>
>>             /*etc...*/<br>
>>         }, /*etc...*/<br>
>>     }<br>
>> });<br>
>><br>
>><br>
>><br>
>> --<br>
>> View this message in context:<br>
>> <a href="http://osgeo-org.1560.n6.nabble.com/Vector-layer-and-multiple-symbolizers-tp5032127p5032322.html" target="_blank">http://osgeo-org.1560.n6.nabble.com/Vector-layer-and-multiple-symbolizers-tp5032127p5032322.html</a><br>

>> Sent from the OpenLayers Users mailing list archive at Nabble.com.<br>
>> _______________________________________________<br>
>> Users mailing list<br>
>><br>
<br>
</div></div>> Users@.osgeo<br>
<br>
>> <a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
>><br>
><br>
> _______________________________________________<br>
> Users mailing list<br>
<br>
> Users@.osgeo<br>
<br>
> <a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://osgeo-org.1560.n6.nabble.com/Vector-layer-and-multiple-symbolizers-tp5032127p5032582.html" target="_blank">http://osgeo-org.1560.n6.nabble.com/Vector-layer-and-multiple-symbolizers-tp5032127p5032582.html</a><br>

<div class="HOEnZb"><div class="h5">Sent from the OpenLayers Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
</div></div></blockquote></div><br></div>