Hi Bart thanks for the link. It did help me with another issue but I still can't seem to figure out how to add events to my query button:
var featureInfo = new OpenLayers.Control({ displayClass: "olControlFeatureInfo" }); I simply want to register an event handler when the button is pressed (activated). Also, I need to disable the pan and zoom functions at the same time and then enable them again if they are clicked on. My event handler is: var queryEventHandler = new OpenLayers.Handler.Click({ 'map': map }, { 'click': function(e) { doGetFeatureInfo(e); } }); queryEventHandler.activate(); I tried OpenLayers.Util.extend but had no luck with it. Any ideas? Thank you in advance!!! bartvde wrote: > > Hi, > > maybe the following sandbox is informative: > > http://dev.openlayers.org/sandbox/bartvde/wmsgetfeatureinfo/openlayers/examples/featureinfo-control.html > > the proxy is not setup correctly in the sandbox so it won't actually > work, but if you run it locally with a local proxy.cgi script it should > do the job. > > Best regards, > Bart > > Semantica wrote: >> Hi all, >> >> Does anyone have an example of adding a query button to a control panel? >> I >> want to add a button that when clicked toggles query mode (e.g. maps >> single-click event to a function that will do a getFeatureInfo). Clicking >> again will deactivate query mode. >> >> I have the getFeatureInfo working already but am unsure as to how to wire >> up >> the controls... >> >> Thank you in advance!!! >> > > > -- > Bart van den Eijnden > OSGIS, Open Source GIS > bart...@osgis.nl > http://www.osgis.nl > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/Query-Tool--tp1694415p1694929.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users