4

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!

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Apr 11, 2012 at 20:58
4
  • 1
    add the FeatureServer?f=pjson - example sampleserver3.arcgisonline.com/ArcGIS/rest/services/… Commented Apr 11, 2012 at 21:20
  • of course the service you need to be requesting is a feature service - sampleserver1.arcgisonline.com/ArcGIS/SDK/REST/index.html Commented Apr 11, 2012 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? Commented Apr 11, 2012 at 22:15
  • github.com/kevinsigwart/EsriOpenLayersClient Commented Feb 4, 2015 at 5:52

1 Answer 1

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...

answered May 22, 2012 at 15:12

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.