Select to view content in your preferred language

Shift Zoom Functionality Disappearing After Draw Event

394
1
09-01-2010 06:35 AM
TylerWaring
Frequent Contributor
Greetings everyone, 
The shift zoom functionality is disappearing after using setMapAction().  Here is a scaled back version of a search tool that I am having a problem with. I must be missing something simple. Any ideas?
Thanks,
Tyler Waring


private function activateSearchTool(value:String):void
{
var status:String;
var btn:Image;
trace(value)
switch (value)
{
  case Draw.MAPPOINT:
  {
   setMapNavigation("pan", "Move Map");
   status = "Search by Point";
   setMapAction(value, status, searchDrawEnd);
   btnSearchMapPoint.source = mapPointSourceActive;
                                            btnSearchMapPoint.toolTip = strStatusMapPointDeactivate;
       map.panEnabled = false;
  }
}
}

private function deactivateSearchTool(value:String):void
{
var status:String;
var btn:Image;
trace(value)
switch (value)
{
  case Draw.MAPPOINT:
  {
   status = "Move Map";
       setMapNavigation("pan", status);
   btnSearchMapPoint.source = mapPointSource;
      btnSearchMapPoint.toolTip = strStatusMapPoint
   //status = strStatusPoint;
       map.panEnabled = true;
  }
                }
}
Tags (2)
0 Kudos
1 Reply
TylerWaring
Frequent Contributor
Greetings Folks,
          This code is from an old tool. Rather than use setMapAction this entire issue can be sidestepped by using a button toolbar. There is a great example on the ESRI samples site that shows you how to create and implement the button toolbar.  http://resources.esri.com/help/9.3/arcgisserver/apis/flex/samples/index.html. Though I'm still not sure why I can't get my shift zoom functionality back as the tool was originally designed using setMapAction.
Thanks,  Tyler
0 Kudos