3

I have couple of questions.

  1. var wmsLayer = new esri.layers.WMSLayer(wmsURL); with this line of code i can display wms layer over any base Layer. Now From where I get wmsURL ? I have published my shapefile on GeoServer, but i dont know how i get the URL (wmsURL) to use as parameter in above line of code ?

  2. Now, Let's suppose I am successful to display wmsLayer. Now i want to query data against this wmsLayer. Like code below:

queryTask = new esri.tasks.QueryTask("wmsURL"); Can I use wmsURL as a parameter in QueryTask method ? From ArcGIS API reference, I come to know that the URL parameter of QueryTask method is the URL to the ArcGIS Server REST resource. But as u know i am using GeoServer, so how it could be fixed. Need some explanation ?

Devdatta Tengshe
41.8k37 gold badges147 silver badges267 bronze badges
asked Feb 12, 2011 at 16:34

3 Answers 3

2

You need to check the documentation for esri.layers.WMSLayer to see what sort of URL it requires. It might be a getcapabilities request so something like http://ian01.geog.psu.edu/geoserver/ows?service=wms&version=1.1.1&request=GetCapabilities or may be it is a complete getmap request http://ian01.geog.psu.edu/geoserver/wms?LAYERS=topp%3Astates&STYLES=&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=-139.84813671875,18.549615234375,-51.85286328125,55.778384765625&WIDTH=780&HEIGHT=330 or may be it is some subset of this (i.e. the program can fill in the sizes or format)?

answered Feb 12, 2011 at 17:59
2

Q1. The wmsURL would probably be something like http://www.myserver.com/geoserver203/wms

Q2. It's not possible to use the QueryTask to query a geoserver.

answered Mar 31, 2011 at 4:52
0

It would normally be something like http://mydomain.com/ArcGIS/services/mylayerservicename/MapServer/WMSServer
where you supply the domain and servicename.

answered Feb 12, 2011 at 17:00

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.