Is there a way to put two WmsDynamicMapServiceLayer on top of eachother where both are transparent ?
Mohammad,
As I said - " create two instances of WmsDynamicMapServiceLayer",
create
WmsDynamicMapServiceLayer wmsLayer1 = new WmsDynamicMapServiceLayer(url, new String[] { "0"});
and WmsDynamicMapServiceLayer wmsLayer2 = new WmsDynamicMapServiceLayer(url, new String[] { "0"});
then set visibilty to those. As so far you override the first layer by the definiotion of the second one.
Regards,
Adam
Hi Adam,
I did that, but only 1 layer is displayed at a time.
String url = "first url";
WmsDynamicMapServiceLayer wmsLayer = new WmsDynamicMapServiceLayer(url, new String[] { "0"}); wmsLayer.setTransparent(true); wmsLayer.setImageFormat("png"); wmsLayer.setVisible(true); wmsLayer.setOpacity(0.99f); layers.add(wmsLayer);
url = "second url";
wmsLayer = new WmsDynamicMapServiceLayer(url, new String[] { "0"}); wmsLayer.setTransparent(true); wmsLayer.setImageFormat("png"); wmsLayer.setVisible(true); wmsLayer.setOpacity(0.99f); layers.add(wmsLayer);
When I comment the first layers.add(wmsLayer); then the second one is displayed on the map
When I comment the second layers.add(wmsLayer); then the first one is displayed on the map
When I want both to be displayed it does not happen
Is there a solution?
Mohammed,
why don't you create two instances of WmsDynamicMapServiceLayer pointing to differents wms service endpoints?
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.