Hi all,I'm using Bing maps from WMS offered by OnTerra [1]. They serve one layer with three styles: Road, Aerial and AerialWithLabels. I am using JMapPane, WMSLayer and WebMapServer classes. I don't know how to do it with normal classes (geotools version 10.0). This is that I have done:
1.- I've created a StyledWMSCoverageReader class, derived from WMSCoverageReader. It has a field [String styleName] and a new constructor with the name of the layer style as parameter. This class overrides initMapRequest() method. This method change the line 'mapRequest.addLayer(layer);' by this other: mapRequest.addLayer(layer, styleName); I have also changed the original method initMapRequest to 'protected' in WMSCoverageReader. [2] 2.- I've added a new constructor to WMSLayer class with the styleName as parameter. It pass a StyledWMSCoverageReader to its parent GridReaderLayer. [3]
I have to change geotools source and compile my own version of gt-wms module. It could be omitted If WMSCoverageReader would be public and initMapRequest protected. In this case, I could create my own class StyledCoverageReader.
Is there a simpler manner to do it? Is the change to public of WMSCoverageReader a bad idea?
Thanks in advance Regards Santiago Higuera [1] http://www.onterrasystems.com/web-mapping-mapsavvy/ [2] http://pastebin.com/j7biCDjz [3] http://pastebin.com/yS7r0Hdr
------------------------------------------------------------------------------ CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments & Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________ GeoTools-GT2-Users mailing list GeoTools-GT2-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users