Hi Mustafa,

The base url for a wms request to geoserver is like this
http://HOST/wms.  You should be able to choose what layers show, etc.
through properties or the constructor of the WMSLayer class.

At this point, I should say that I haven't actually used a Geoserver
WMS with ArcGIS JavaScript API ... I'm not totally sure that it will
work with a 3rd party WMS (i.e. Geoserver), though it should mostly
support it, since WMS is a standard.

However, it sounds like WMSLayer will not support feature query, since
it apparently uses a REST function that's not part of the WMS standard
(see my highlight here: http://diigo.com/0fa06).  Here is a post on
how someone was able to accomplish query functionality with a 3rd
party WMS:

http://hcapello.blogspot.com/2009/06/adding-3rd-party-wms-map-service-using.html

Hope that helps.

Ben

On Sat, Feb 12, 2011 at 11:26 AM, Mustafa646 <noorc...@gmail.com> wrote:
>
> Thanks for replying!
>
> 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 ?
>
>
>
> udelmaps wrote:
>>
>> Hi Mustafa,
>>
>> You can add it as a WMS layer using documentation here:
>>
>> http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/wmslayer.htm
>>
>>>From that page:
>>
>> This snippet requires setting up a proxy page
>>
>> var wmsLayer = new esri.layers.WMSLayer(wmsURL);
>> This snippet specifies the resourceInfo option which does not require
>> proxy page.
>>
>> var wmsLayer = new esri.layers.WMSLayer(wmsURL,
>>   {resourceInfo: resourceInfo,
>>   visibleLayers: ['1','2']
>>   }
>> );
>>
>>
>> ... not sure if this will automatically tile though.
>>
>> Ben
>>
>> On Fri, Feb 11, 2011 at 9:33 AM, Mustafa646 <noorc...@gmail.com> wrote:
>>>
>>> I am very new to GeoServer. I have published my shapefile on GeoServer.
>>> Now
>>> How can i access and use my published data with ArcGIS API. In "ArcGIS
>>> Samples", for querying data from ArcGIS Sample server, we use following
>>> line
>>> of code:
>>>
>>> queryTask = new
>>> esri.arcgis.gmaps.QueryTask("sampleserver1.arcgisonline.com/ArcGIS/rest/services/…);
>>>
>>> I need similar line of code to access my data from geo server. Can
>>> anybody
>>> send me the piece of code like that ?
>>> ...
>>> --
>>> View this message in context:
>>> http://old.nabble.com/How-to-use-GeoServer-published-data-with-ArcGIS-API-tp30901021p30901021.html
>>> Sent from the GeoServer - User mailing list archive at Nabble.com.
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
>>> Pinpoint memory and threading errors before they happen.
>>> Find and fix more than 250 security defects in the development cycle.
>>> Locate bottlenecks in serial and parallel code that limit performance.
>>> http://p.sf.net/sfu/intel-dev2devfeb
>>> _______________________________________________
>>> Geoserver-users mailing list
>>> Geoserver-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>>
>>
>>
>>
>> --
>> Ben Mearns
>> Research and Data Management Services, IT-Client Support & Services
>> University of Delaware
>> mea...@udel.edu : 302.831.1978
>>
>> ------------------------------------------------------------------------------
>> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
>> Pinpoint memory and threading errors before they happen.
>> Find and fix more than 250 security defects in the development cycle.
>> Locate bottlenecks in serial and parallel code that limit performance.
>> http://p.sf.net/sfu/intel-dev2devfeb
>> _______________________________________________
>> Geoserver-users mailing list
>> Geoserver-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>
>>
>
> --
> View this message in context: 
> http://old.nabble.com/How-to-use-GeoServer-published-data-with-ArcGIS-API-tp30901021p30909732.html
> Sent from the GeoServer - User mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
> Pinpoint memory and threading errors before they happen.
> Find and fix more than 250 security defects in the development cycle.
> Locate bottlenecks in serial and parallel code that limit performance.
> http://p.sf.net/sfu/intel-dev2devfeb
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>



-- 
Ben Mearns
Research and Data Management Services, IT-Client Support & Services
University of Delaware
mea...@udel.edu : 302.831.1978

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to