Select to view content in your preferred language

Identify from interactive SDK

1351
11
09-28-2010 11:02 AM
DavidAshton
Frequent Contributor
I'm using the identify from the interactive SDK
http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#Identify
It works good but I would like to change when it fires.  Instead of using the left mouse click I was wondering if it is possible to use double click, right mouse click, or team it up with an activitatoin button. My endusers are missing firing identifies on a regular basis. Can someone help with this?


        private void QueryPoint_MouseClick(object sender, ESRI.ArcGIS.Client.Map.MouseEventArgs e)
        {
            ESRI.ArcGIS.Client.Geometry.MapPoint clickPoint = e.MapPoint;

            ESRI.ArcGIS.Client.Tasks.IdentifyParameters identifyParams = new IdentifyParameters()
            {
                Geometry = clickPoint,
                MapExtent = MyMap.Extent,
                Width = (int)MyMap.ActualWidth,
                Height = (int)MyMap.ActualHeight,
                LayerOption = LayerOption.visible
            };

0 Kudos
11 Replies
AliMirzabeigi
Emerging Contributor
By defaut the toggle button has two states: checked and unchecked. The code snippet I gave you for toggle button approach considers users switching between the default map mouse down behavior (when the button is not checked) and the identify mode (when it's checked) therefore; when you toggle (check) that button the identify works otherwise it won't. If you want to use the identify as your default behavior you can set IsChecked property of your ToggleButton to TRUE, i.e.:
<ToggleButton x:Name="btnidentificar" Content="Identify" Width="50" Height="50" Margin="5"
                    IsChecked="True" VerticalAlignment="Top" ToolTipService.ToolTip="Identificador" />
0 Kudos
NancyHernandez
Emerging Contributor
thanks!!!, I did this and it works!!:D

 if (btnidentificar.IsChecked.Value == false)
           return;    


Thanks for your help!!!  😉
0 Kudos