[OpenLayers-Users] Query Tool?

bartvde at osgis.nl bartvde at osgis.nl
Wed Dec 24 01:03:58 EST 2008


Hi Joost,

is this not because your map also has the default Navigation Control?
Since you have separate buttons for pan/zoom etc. I think you should not
use the Navigation Control.

So instead instantiate your map with an empty controls array:

var mapOptions = {controls: []};

Then you also don't need to use the following line of your code:
map.removeControl (map.controls [1]);

Hope this helps.

Best regards,
Bart

>
> Hi Bart,
>
> So I am about 80 percent there now:
>
> http://dev.openlayers.org/sandbox/jvanulden/openlayers/examples/extended-layerswitcher.html
>
> The only thing to so now is disable the drag handler on the map when the
> user selects the query tool. Any idea on how I can achieve this???
>
>
>
> 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
>> bartvde at osgis.nl
>> http://www.osgis.nl
>>
>> _______________________________________________
>> Users mailing list
>> Users at openlayers.org
>> http://openlayers.org/mailman/listinfo/users
>>
>>
>
> --
> View this message in context:
> http://n2.nabble.com/Query-Tool--tp1694415p1695373.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>





More information about the Users mailing list