Select to view content in your preferred language

WMSLayer: What exactly triggers a WMS GetCapabilities request?

1103
1
06-15-2011 12:52 PM
YohanBienvenue1
New Contributor
Hey guys,

I'm currently looking into creating a custom WMSLayer component which gives me more control over the specific request parameters I want to set, by extending DynamicMapServiceLayer as seen in this thread: http://forums.esri.com/Thread.asp?c=158&f=2421&t=296210

At the same time I want my custom component to be compatible with the ESRI map component, so that I can use it more or else the same way. So I'm trying to mimic the original WMSLayer properties too.

It's currently working halfway, I can obtain maps from various WMS services if I specify the parameters I want, loadMapData() will properly trigger the GetMap WMS request, but I can't figure out how/where to trigger the GetCapabilities WMS request.

I've already set skipGetCapabilities to false

Do I simply need to manually make the request in my custom WMSLayer constructor?
I believe this needs to happen before the overriden DynamicMapServiceLayer::loadMapData() function is called.

I'd also like to implement the GetFeatureInfo request at some point.

Any hints/tips for me?

Thanks
Tags (2)
0 Kudos
1 Reply
DasaPaddock
Esri Regular Contributor
Yes, you can make the request as soon as you like and then call setLoaded(true) when you're ready for loadMapImage() to be called.
0 Kudos