Can identify task perform on graphicslayer?

582
8
08-04-2011 06:26 PM
DanDong
New Contributor
Hi guys,

I know that identify task can perform on the layers in the map service by assign the layer's url, but I am just wondering whether it can also perform on a graphicslayer that I added in the xaml page.

The reason why I want to do this is that the user only wants some of the features in a layer to display. There is a combox used for choosing fiscal year, like 2011 or 2012. If the user choose 2011, then only the features belongs to the 2011 will display on the map. I am thinking to use a query task to implement this part. Then the query results will be added on a graphicslayer.

The other need is to perform identify task on the result features, which is the part that I am concerned. I am not sure whether the identify task could be performed on the graphicslayer.

Any thoughts or ideas are appreciated! Thanks advance!
0 Kudos
8 Replies
DominiqueBroux
Esri Frequent Contributor
The identify task is executed on the server in order to get infos which are generally not loaded at the client side.
In your case, it looks like you already loaded the graphics using a query task so instead of using an identify task, could you not just use a maptip or an info window?
0 Kudos
DanDong
New Contributor
Hey Dominique, thank you for your advice!

The query task is used to filter the features. After the features are filtered, the user still wants to use identify task. Because the identify task would perform on multiple map services, there is a datagrid to display the results.

If only one or two fields from a single one layer, I would like to use the map tip or infowindow, but they want to display all the results from different map service and each records will contain many fields....

I am going to tell the project manager this issue.
0 Kudos
DominiqueBroux
Esri Frequent Contributor
You can use the identify task on any map services even if this service is not included in your map.
So nothing should prevent you from identifying layers that you already loaded as graphics layers.
0 Kudos
DanDong
New Contributor
Hey Dominique, thank you for replying. I see your point. So following your suggestion, I use the query to filter some of the features in the layer and add these features into the graphicslayer. When the user uses the identify tool, he could also ID the original layer although this layer is not include in the map. Thank you again!
0 Kudos
HugoCardenas
New Contributor
I have been using select/identify on a graphics layer that I fill at run-time.  I populate grids and change the symbols as well.  I can click the graphic on screen and highlight the row in the datagrid.  I can click the row in the datagrid and highlight the graphic on screen.  All this without having a Feature Service.

Let me know if this is your case, so I can share the code.
Hugo.
0 Kudos
LorgioQuevedo
New Contributor
Hugo,
That's exactly what I'm trying to achieve with no luck, please share some code for that functionality.
Thanks!
0 Kudos
SANDEEPMEHNDIRATTA
New Contributor
I have been using select/identify on a graphics layer that I fill at run-time.  I populate grids and change the symbols as well.  I can click the graphic on screen and highlight the row in the datagrid.  I can click the row in the datagrid and highlight the graphic on screen.  All this without having a Feature Service.

Let me know if this is your case, so I can share the code.
Hugo.



Can you share the code
0 Kudos
AjayYadav
New Contributor
Can you share the code


Please share the code for "identify task perform on graphicslayer". I need it urgently.

Thanks in advance.

Ajay
0 Kudos