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

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 ?

share|improve this question
up vote -1 down vote accepted

It would normally be something like
where you supply the domain and servicename.

share|improve this answer

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 or may be it is a complete getmap request,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)?

share|improve this answer

Q1. The wmsURL would probably be something like

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

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.