[OpenLayers-Users] Cant' get attribute value of a feature in a rule

noog13 gael at noog.fr
Mon Nov 25 04:18:23 PST 2013


helloi use this openlayer extension to create a cluster of markersi try to
create a rule to attribute a special extranet graphic where there is only
one pointi define a feature like thisvar f = new
OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point( lon, lat
).transform(new OpenLayers.Projection("EPSG:4326"),
map.getProjectionObject()),{"id_test":id_lieu,"cat":cat_id,"description":
"marker number " + i});  and i have this rule but i can't get ${cat} the
returned value is "undefined"thanks for your help              var oneRule =
new OpenLayers.Rule({			//	context:context,                filter: new
OpenLayers.Filter.Comparison({                    type:
OpenLayers.Filter.Comparison.EQUAL_TO,                     property:
"count",                    value: 1                }),               
symbolizer: {					 fillOpacity: 1,                    opacity : 1,                   
externalGraphic: "/drawable-hdpi/theme/Cat_ + "${cat}" + ".png",				
graphicHeight: 50, graphicWidth: 50, graphicXOffset:-25, graphicYOffset:-25               
}            });



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Cant-get-attribute-value-of-a-feature-in-a-rule-tp5090998.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20131125/e8e8d9ae/attachment.html>


More information about the Users mailing list