It should deactivate other map controls, at least that is the behaviour I see in my application. Is your custom control added to the control array of your map? Just a guess...
Alex On Wed, Jan 19, 2011 at 2:35 PM, Brown, Adam <[email protected]> wrote: > This worked really well, thank you! > > I've noticed that the identify control will deactivate zoom, pan or whatever, > but it won't deactivate anything that resides in another panel. Is that by > design? Is there an easy way to make this happen or do I need to parse each > panel programmatically? > > Thanks! > > -----Original Message----- > From: Alexander Petkov [mailto:[email protected]] > Sent: Wednesday, January 12, 2011 6:23 PM > To: Brown, Adam > Cc: [email protected] > Subject: Re: [OpenLayers-Users] Creating a Custom Tool > > For custom tools I use the Identify control, not bundled with OpenLayers: > > http://dev.openlayers.org/sandbox/enjahova/openlayers/lib/OpenLayers/Control/Identify.js > > Example: > toolbar.addControl( > new OpenLayers.Control.Identify( > identify,{ > title: 'Point query: click on the map to retrieve > the value of the currently selected WFAS dataset.' > }),{ > iconCls: 'id', > toggleGroup: 'map' > } > ); > > identify is the name of the function holding your custom identify code. > > When activated, the control will activate and disable all others. As > far as style, thee control's button shows as pushed when active. > > The toolbar I used is a Mapfish toolbar widget. > > > Alex > > > On Wed, Jan 12, 2011 at 12:47 PM, Brown, Adam <[email protected]> wrote: >> Hi All, >> >> I’ve been trying to find a way to create a custom tool and add it to my >> custom navigation toolbar. I want to add an identify tool similar to the >> one found in ESRI’s ArcMap. The tool will select a feature and update a div >> with information from a .Vector layer. When the tool is activated, I want >> the panning and zooming tools to be turned off. Just like when panning is >> selected and you choose zoom, the panning tool gets turned off. I also >> wanted to know how to modify the CSS to add an “active” and “inactive” style >> for this tool. >> >> I already have the code to select the feature and display its information >> (and have tested it via radio button). I also have the –on and –off png for >> this tool. I am looking for help or a tutorial on how to define the control >> and add it to my navigation panel. >> >> Any help would be appreciated. Thanks! >> >> -Adam >> >> _______________________________________________ >> Users mailing list >> [email protected] >> http://lists.osgeo.org/mailman/listinfo/openlayers-users >> >> > _______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
