[OpenLayers-Users] Vector layer and multiple symbolizers

Sergeant_york electronicpanda at gmail.com
Tue Feb 5 14:36:07 PST 2013


Hello there,
You can easily do it, just bind a context function to external graphic.

First of all, your style will have external graphic for each type of point:
http://jsfiddle.net/winsent/ZkMzG/
you see that external graphic is set

Secondly, you will use context for style:
http://www.peterrobins.co.uk/it/olstyle.html
check using style context title

when you combine it, you can set external graphic up to your point's
attribute value like 

if(feature.attributes.type=='park')
    return 'something/something/park.png';
else if (feature.attributes.type=='hospital')
    return 'something/something/hospital.png';



--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Vector-layer-and-multiple-symbolizers-tp5032127p5032317.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list