[OpenLayers-Users] Vector layer and multiple symbolizers
Yves Gillet
ygillet at gmail.com
Tue Feb 5 23:27:21 PST 2013
Hi there,
thanks for your input.
But if you look my image mockup of what I m trying to display , I want to
style the station along with some of its attributes (sort of symbols
composition, not just the point one) .
I'd be glad if you could update my example here http://jsfiddle.net/jLEYS/3/ to
show me how I could achieve that using the StyleMap
Regards,
Yves
2013/2/5 Sergeant_york <electronicpanda at gmail.com>
> var style = new OpenLayers.Style({
> externalGraphic: '${graphicFunction}',
> graphicYOffset: '${graphicYOffsetFunction}',
> graphicXOffset: '${graphicXOffsetFunction}',
> /* etc... */
> }, {
> context: {
> graphicFunction: function(feature) {
> if(feature.attributes.type=='bike') return '/bike.png';
> else if(feature.attributes.type=='hospital') return
> '/hospital.png';
> /*etc...*/
> },
> graphicYOffsetFunction: function(feature){
> if(feature.attributes.type=='bike') return 10;
> else if(feature.attributes.type=='hospital') return -10;
> /*etc...*/
> }, /*etc...*/
> }
> });
>
>
>
> --
> View this message in context:
> http://osgeo-org.1560.n6.nabble.com/Vector-layer-and-multiple-symbolizers-tp5032127p5032322.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20130206/1d4e0abe/attachment.html>
More information about the Users
mailing list