[OpenLayers-Users] Different Styles Within Vector Layer
Arnd Wippermann
arnd.wippermann at web.de
Fri May 17 08:39:33 PDT 2013
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: openlayers-users-bounces at lists.osgeo.org
[mailto:openlayers-users-bounces at lists.osgeo.org] Im Auftrag von Diego M.
Gesendet: Freitag, 17. Mai 2013 10:41
An: openlayers-users at lists.osgeo.org
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
Users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users
More information about the Users
mailing list