Select to view content in your preferred language

Using an existing graphic point to identify data

699
1
05-21-2012 11:06 AM
TanyaOwens
Frequent Contributor
Hello,

I am very new to using silverlight with c# and I am attempting to combine the address locator task and the Identify task. I want to use the graphic point created in searching for an address location to then identify data from an additional Dynamic map service layer with polygon data. Any guidance would be greatly appreciated.

Thanks!!
0 Kudos
1 Reply
vipulsoni
Regular Contributor
Hello,

I am very new to using silverlight with c# and I am attempting to combine the address locator task and the Identify task. I want to use the graphic point created in searching for an address location to then identify data from an additional Dynamic map service layer with polygon data. Any guidance would be greatly appreciated.

Thanks!!


Hi,

For your issues you need to pass the graphic point from the address location to the identify method. In this case the additional Dynamic map service layer with polygon data will be your identifytask service url.

Please have a look on this code it might point you in the right direction. In the below code pass the address location to the StartIdentify method as a mappoint.

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

            IdentifyTask identifyTask = new IdentifyTask(Service_URL);
            identifyTask.ExecuteCompleted += IdentifyTask_ExecuteCompleted;
            identifyTask.Failed += IdentifyTask_Failed;
            identifyTask.ExecuteAsync(identifyParams);

            ESRI.ArcGIS.Client.Graphic graphic = new ESRI.ArcGIS.Client.Graphic()
            {
                Geometry = clickPoint,
                Symbol = LayoutRoot.Resources["DefaultPictureSymbol"] as ESRI.ArcGIS.Client.Symbols.Symbol
            };
            //genmethods.ClearGraphik(Map, true, graphic);
        }
0 Kudos