[udig-devel] Method to directly acquire a layer from WMS
Joe Dente
jdente at 21technologies.com
Mon Apr 21 15:13:29 PDT 2008
Hi,
I've been playing around with directly acquiring a layer from my WMS
server using the following code:
URL1 = new URL(
"http://localhost:8080/geoserver/wms?lService=WMS&Version=1.1.1&Request=
GetCapabilities" )
URL2 = new URL(
"http://localhost:8080/geoserver/wms?lService=WMS&Version=1.1.1&Request=
GetCapabilities#tiger:tiger_roads" )
CatalogPlugin catalog = CatalogPlugin.getDefault();
IServiceFactory factory = catalog.getServiceFactory();
IResolve resolve1 = factory.acquire(URL1);
IResolve resolve2 = factory.acquire(URL2);
According to the Geotools documentation, URL2 should resolve directly to
the tiger:tiger_roads layer. However, when I step through the code with
a debugger, resolve1 and resolve2 are both instances of WMSServiceImpl.
If I do resolve1.members(monitor) and resolve2.members(monitor), they
both return the same list of every layer deployed on my Geoserver. How
can I directly retrieve the tiger:tiger_roads layer using something
similar to URL2? I don't want to iterate through every layer looking for
the 1 layer I'm interested in.
Thanks,
Joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.refractions.net/pipermail/udig-devel/attachments/20080421/d75e4cc2/attachment.html
More information about the udig-devel
mailing list