Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We are using ArcGIS Rest services on Openlayers. The layers are placed on the map correctly But how to identify a layer feature on mouse over or mouse click and get the details of the particular layer feature...? Is there any function in Openlayers library to do it..?

share|improve this question

There is nothing inbuilt in OpenLayers that can directly call the Identify Task on the ArcGIS Server's REST Endpoint.

If you are fairly comfortable with JavaScript, then there is some hope. You can refer to the AgsIdentifyTask.js code present in this sandbox:

There is a sample here, but I haven't been able to get it to work.

share|improve this answer
Thanks Devdatta, I checked the sample but its not working. I selected a layer and click on identify button(to activate control) and click(CTRL+click(as they mentioned)) on the layer. But nothing happened.. :( – Mufeed K Kasim Jun 26 '13 at 6:53
@MufeedKKasim I just linked to the sample, so that you can have a look at the source code. Have you added the source code of the control to your application? – Devdatta Tengshe Jun 26 '13 at 7:07

For those of you still looking for an Identify click event on ArcRest93 layers in OpenLayers 2.x, I have used the following to successfully handle click events for ArcRest93 layers.

I originally found the code in an OSDir thread by someone named giovanni (maybe Giovanni Allegri?).

Which itself refers to the code found in this pastebin.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.