HI,
When the Map is in Edit mode for point select (EditOverlay.TrackMode = TrackMode.Point), and one RIGHT clicks, the standard browser context menu is shown AND the feature is selected.
I want to disable this behavior.
Please help.
Thanks,
Chris
      
    HI,
When the Map is in Edit mode for point select (EditOverlay.TrackMode = TrackMode.Point), and one RIGHT clicks, the standard browser context menu is shown AND the feature is selected.
I want to disable this behavior.
Please help.
Thanks,
Chris
Hi Chris,
Please try defining the Map control in aspx file using the code as following:
            <cc1:Map ID="Map1" runat="server" Width="800px" Height="600px"  oncontextmenu="return false;">
            </cc1:Map>
Thanks,
Johnny
Hi Chris,
Please try defining the Map control in aspx file using the code as following:
            <cc1:Map ID="Map1" runat="server" Width="800" Height="600"  oncontextmenu="return false;">
            </cc1:Map>
Thanks,
Johnny
Johnny, 
  
  Your response does not address the issue! 
  
 This will disable contextmenu usage completely. I only want to disable contextmenu(s) when in the above mentioned mode of operation. I need context menus active in the normal mode. 
  
 Chris
Hi Chris,
 
Sorry for the inconvenience, following the sample code, would you please try it:
 
1. Create JS functions SetTrackMode and SetContextmenu.
    
        var TrackMode = "Normal";
        function SetContextmenu() {
            if (TrackMode == "Point") {
                return false;
            }
        }
        function SetTrackMode(mode) {
            TrackMode = mode;
        }
2. Call SetContextmenu method in the Map1 oncontextmenu event.
   
 cc1:Map ID="Map1" runat="server" Width="100%" Height="100%" oncontextmenu="return SetContextmenu()"
3. Call SetTrackMode method in the OnClientClick to set the TrackMode.
  asp:ImageButton ID="buttonDrawPoint" runat="server" ToolTip="Draw Point" ImageUrl="~/theme/default/samplepic/point28.png"
            OnClientClick="Map1.SetDrawMode('Point');SetTrackMode('Point');return false; "
 
Hope it helps
 
Johnny