Hello
I have a problem with controlling the visibility of layers.
If I use layerHandler.turnLayerOn the layers renders correctly on the
map but the bulbs in the OM LayersPanel does not render correctly. If I
use layer.setVisible the bulbs renders correct but the layers that
should be visible do not render anything?
String tmp = config.getVisibleLayers();
String[] visibleLayers = tmp != null ? tmp.split(" ")
: new String[] {};
for (Layer layer : layerHandler.getLayers()) {
boolean layerVisible = false;
for (String visibleLayerName : visibleLayers) {
String prettyName = Environment.get(visibleLayerName
+ ".prettyName");
if (layer.getName().equals(prettyName)) {
layerVisible = true;
break;
}
}
layer.setVisible(layerVisible); // bulbs ok but nothing
in layer
// layerHandler.turnLayerOn(layerVisible, layer); bulbs
wrong, layers ok
}
BR
Carsten
--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Wed Feb 29 2012 - 09:05:41 EST