Ciao Walter For some reason I haven't discovered yet I can see some messages in my mail box but not on the forum. I changed a little bit the example select-feature-openpopup.html so I have duplicated the polygonLayer (polygon and polygon1) so I can prove that you can actually toggle between two draw and select controls for the two layers as you like.
As far as I understood you need to write two controls ( so I did: drawControls and drawControls1 ), one for each the two layers then you want two onFeatureSelect events, right? Different for each layer and than you need to write two handlers ( same for unselect ). I think, but your code is not enough, so I suppose the problem you are having is when you toggle between controls, in my examples I wrote two functions: toggleControl and toggleControl1 but you may need just one which is more clever, be carefull when you deactivate controls, your routine you need to deactivate all the controls and activate just one. Have a look at the code, hope this help. Ciao Rosario -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Walter Lorenzetti Sent: 17 December 2007 15:28 To: Maillist Openlayers users Subject: [OpenLayers-Users] New control problem Hi list, I've a problem with OpenLayers.Control.SelectFeature I've 3 gml in a array ( users[] ) and for every layers I add on map a new control.SelectFeature for to show a popup control[i] = new OpenLayers.Control.SelectFeature(users[i],{onSelect: openPopup,selectStyle: style[i]}); map.addControl(control[i]); control[i].activate(); but when every layers are visibile only for the last layer activated I can obtain the popup on feature select but not for the other 2 layers Do I some mistake? thanks in advance Walter -- Please no .doc, .xls, .ppt, .dwg: https://www.faunalia.it/dokuwiki/doku.php?id=public:OpenFormats Walter Lorenzetti email+jabber: [EMAIL PROTECTED] www.faunalia.it Cell: (+39) 347-6597931 Tel+Fax: (+39) 0587-213742 Piazza Garibaldi 5 - 56025 Pontedera (PI), Italy _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you are not the addressee, any disclosure, reproduction, copying, distribution, or other dissemination or use of this communication is strictly prohibited. If you have received this transmission in error please notify the sender immediately and then delete this email. Any representations or commitments expressed in this email are subject to contract. This message has been scanned for viruses and dangerous content. However, it is essential that the recipient also checks this message using commercially available mail scanning and anti-virus software. IPL Information Processing Limited accepts no liability for any loss or damage resulting from any virus or other dangerous content in this message. IPL Information Processing Limited is registered in England and Wales under company registration number 1418818. Registration took place at Cardiff on 10 May 1979. IPL Information Processing Limited's registered office and normal place of business is Eveleigh House, Grove Street, Bath, BA1 5LR, United Kingdom. IPL is also registered for Value Added Tax (VAT) under registration number GB 601 2931 83.
OpenLayers Draw Feature Example
It is possible to use the onSelect/onUnselect hooks on the SelectFeature to do fun things -- like open a popup.
_______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
