Hi,
Of course you can use rules:
styles.addUniqueValueRules("default", "flag", {
"H": {strokeColor: "#000000", strokeWidth: 2},
"R": {strokeColor: "#222222", strokeWidth: 2},
...
http://openlayers.org/dev/examples/all-overlays.html
Arnd
-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Diego M.
Gesendet: Freitag, 17. Mai 2013 10:41
An: [email protected]
Betreff: [OpenLayers-Users] Different Styles Within Vector Layer
Is there any way to configure OpenLayers styling method? I have a vector
layer and I would like to style the features depending on a value of a flag
variables, so I can't use rules. Lets say I have two types of features:
houses and restaurants. houses flag is "H" and restaurants flag is "R". How
can I give them a different style within a vector layer?
--
View this message in context:
http://osgeo-org.1560.x6.nabble.com/Different-Styles-Within-Vector-Layer-tp5
053915.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users