AW: [OpenLayers-Users] addUniqueValueRules .. where to add exactly
Arnd Wippermann
arnd.wippermann at web.de
Sat Jan 28 09:29:19 EST 2012
You have to declare a size for the images
Either pointRadius
or
graphicWidth
graphicHeight
Arnd
-----Ursprüngliche Nachricht-----
Von: openlayers-users-bounces at lists.osgeo.org
[mailto:openlayers-users-bounces at lists.osgeo.org] Im Auftrag von Shadin
Gesendet: Samstag, 28. Januar 2012 13:03
An: openlayers-users at lists.osgeo.org
Betreff: [OpenLayers-Users] addUniqueValueRules .. where to add exactly
*Hi
I'm trying to apply a simple attribute based styles on my vector layer the
attribute is known as "type" in the database and has these values:
1,2,3,4
I try this :*
var styleMap = new OpenLayers.StyleMap({
"default": {
externalGraphic: "Link to pic 1",
fillOpacity: "${opacity}"
},
"select": {
cursor: "crosshair",
externalGraphic: "Link to pic 2"
},
});
var lookup = {
1: {externalGraphic: "Link to pic"},
2: {externalGraphic: "Link to pic"},
3: {externalGraphic: "Link to pic"},
4: {externalGraphic: "Link to pic"}
};
*Then, when I type this line:*
styleMap.addUniqueValueRules("default", "type", lookup);
*I got nothing on the map. just my base layer but when I commeted it, I got
the normal overlay layer with typical features without any styling.
am not sure about what wrong here. *
--
View this message in context:
http://osgeo-org.1560.n6.nabble.com/addUniqueValueRules-where-to-add-exactly
-tp4345767p4345767.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