[OpenLayers-Users] Vector layer and multiple symbolizers
Sergeant_york
electronicpanda at gmail.com
Tue Feb 5 14:49:26 PST 2013
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.
More information about the Users
mailing list