On Dec 12, 2007 8:37 AM, Walter Lorenzetti <[EMAIL PROTECTED]> wrote: > Eric Lemoine ha scritto: > >> > >> but sorry is possible to do that for "onClick" event? > >> > > > > I don't understand. Using the select feature control you should be > > able to select features by clicking on them. Don't you see your > > OpenLayers.Console.log message displayed when you click on features? > > > > -- > > Eric > > > > > Hi Eric,
Hi > sure with select feature control I can select, so when I do it > on my ma the feature graphic icon change to blue circle like a default > point vector layer select. > > So if is not possible onClick control event do you know how I can change > the graphic vector point layer select? You can pass a selectStyle option to the select feature control to specify how to style selected features. Alternatively, you can override the select() method to implement your own behavior on feature click. Something like this: new OpenLayers.Control.SelectFeature(gml, {select: function(feature) { OpenLayers.Console.log('do my own business here'); }}); Note that there's no garantee that doing this will work accross all OL versions as the select() method in SelectFeature isn't marked as APIMethod and may therefore change name in the future. Hope this helps, -- Eric _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users