On Tue, Nov 9, 2010 at 1:50 PM, x_tls_x <[email protected]> wrote: > > Hi list, > Hi friends, > > i've got a sytleMap: > var style = new OpenLayers.StyleMap({ > "default": { > pointRadius: 30, > externalGraphic: "${image}" > }, > > and i use new OpenLayers.Control.DrawFeature(layer, > OpenLayers.Handler.Point). How can i set the image attribute on draw > feature? If i try eventListeners: {"featuresadded": function(obj) > {obj.feature.attribute.image="n2.png";} it doesnt work. I have no idea why > not. > > Anyone an idea?
What about "featureadded" instead of "featuresadded" ? Also, I think you should use "beforefeatureadded", if this way you won't need to redraw the feature, which, I guess, you'd need if you use "featureadded". -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : [email protected] http://www.camptocamp.com _______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
