Hi guys,

I'm have one layer that i want style according attributes (id and name) values.
Its a layer with many features and, for all, i want a different style.
My question is if its possible get attributes values in style. Something like that:

                                new OpenLayers.Rule({
title: feature.attribute.name <-----------------here
                                    symbolizer: {
                                            graphicWidth: 30,
                                            graphicHeight: 30,
                                            graphicYOffset: -26,
                                            graphicOpacity: 1,
externalGraphic: "../../img/simbologia_layers/pdi/" + feature.attribute.id + ".png" --------------here
                                            }
                                    }),

If not i have to write a rule for all my features in the layer?I can use a for loop but i can get the name....

Thanks
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to