Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am using the OpenLayers JavaScript API within a web application. I am displaying non-base layers hosted on an ArcGIS server. When I load the ArcGIS layers, I load them using OpenLayers.Layer.ArcGIS93Rest and by specifying the export service URL. The layer loads perfectly. However, when the user clicks on a feature, I want to be able to display a popup showing information about the feature that the user clicked on. Can anyone explain the best way to retrieve feature information?

Thanks in advance!

share|improve this question
1  
add the FeatureServer?f=pjson - example sampleserver3.arcgisonline.com/ArcGIS/rest/services/… –  Mapperz Apr 11 '12 at 21:20
    
of course the service you need to be requesting is a feature service - sampleserver1.arcgisonline.com/ArcGIS/SDK/REST/index.html –  Mapperz Apr 11 '12 at 21:28
    
The layer that I'm requesting is via a map service, and the ArcGIS server hosting the layer unfortunately doesn't support a feature service. The map service supported interfaces are Rest, Soap and WMS, and the supported operations are Export Map, Identify, Find and Generate KML. The only supported interface on the layer is Rest and the only supported operation is Query. What's my best alternative? –  Sara Apr 11 '12 at 22:15
add comment

1 Answer 1

rest will solve your problems with only parsing it then adding to map. the following link has a query with geometry which return to results json.

filter geometry is -125.4,35.2,-118.7,43.8 

http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer/1/query?text=&geometry=-125.4%2C35.2%2C-118.7%2C43.8&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&relationParam=&objectIds=&where=&time=&returnCountOnly=false&returnIdsOnly=false&returnGeometry=true&maxAllowableOffset=&outSR=&outFields=&f=pjson

you can get more information here ArcGIS Server REST API. and you can also get another info here ArcGIS Server REST API, OpenLayers

i hope it helps you...

share|improve this answer
add comment

Your Answer

 
discard

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.