Select to view content in your preferred language

How to identify the object on which is made a click

3614
3
Jump to solution
12-04-2014 04:22 AM
AnatoliiTerentiev
Deactivated User

Dear Gurus!

I have next xaml:

<esri:Map x:Name="Map">
    <esri:ArcGISDynamicMapServiceLayer ID="BaseLayer" 
                            Url="http://localhost:6080/ArcGIS/rest/services/streetRK/MapServer" />
    <esri:FeatureLayer    ID="bridges"                                  
                            Url="http://localhost:6080/ArcGIS/rest/services/streetRK/MapServer/2" 
                                  MouseEnter="FeatureLayer_MouseEnter" >
    </esri:FeatureLayer>
    <esri:GraphicsLayer ID="MyGraphicsLayer" MouseLeftButtonUp="GraphicsLayer_MouseLeftButtonUp" />
</esri:Map>

There many feature layers in BaseLayer.
I need to know on wich object is made click. If click is made on GraphicLayer - there is no problem.
When I click on some feature (on some sublayer) of the BaseLayer, as it seems to me, the only way is to create some featureLayer,
then I will can to know feature, on wich click is made.
1. Is it true?  
2. Can I change featureLayer by change in code behind url of "bridges" feature layer? I would not want to create all possible layers in the xaml?

3. Is it right way?
0 Kudos
1 Solution

Accepted Solutions
DominiqueBroux
Esri Frequent Contributor

I just noticed that your post was for the WPF API and not for .Net API so we might be more interested by the WPF/SL Identify sample.

View solution in original post

3 Replies
DominiqueBroux
Esri Frequent Contributor

No you don't need to create feature layers to get infos about features.

You can use an Identify task that is executed at server side and returns info about the features under the specified geometry.

There is a sample here: arcgis-runtime-samples-dotnet/IdentifySample.xaml.cs at master · Esri/arcgis-runtime-samples-dotnet ...

DominiqueBroux
Esri Frequent Contributor

I just noticed that your post was for the WPF API and not for .Net API so we might be more interested by the WPF/SL Identify sample.

AnatoliiTerentiev
Deactivated User

Yes, sorry. What I must to do now?

P.S.I'll see the second example. The first link does not open.

0 Kudos