Hi all,
I'm trying to show/hide layer in layerswitcher according to zoom level (I
have some layers with different level of simplification). Setting visibility
to layer itself works fine, but the layer switcher thing is really pain.
I've found this approach, but it doesn't work as it should. Some ideas?
if( zLevel > 7 && zLevel <= 10 )
{
current_country.setVisibility(false);
current_country2.setVisibility(false);
current_country4.setVisibility(false);
current_country5.setVisibility(false);
current_country.displayInLayerSwitcher = false;
current_country2.displayInLayerSwitcher = false;
current_country4.displayInLayerSwitcher = false;
current_country5.displayInLayerSwitcher = false;
current_country3.setVisibility(true);
current_country3.displayInLayerSwitcher = true;
}
Thanks!
Tomas
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/displayInLayerSwitcher-with-event-handler-tp5086953.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
Hi Tomas,
I think you should post the question in the OpenLayers related mailing lists.
This does not seem related to GeoServer.
Regards,
Mauro Bartolomeoli
···
2013/11/1 HerrFlick <tomas.mattern@anonymised.com>
Hi all,
I’m trying to show/hide layer in layerswitcher according to zoom level (I
have some layers with different level of simplification). Setting visibility
to layer itself works fine, but the layer switcher thing is really pain.
I’ve found this approach, but it doesn’t work as it should. Some ideas?
if( zLevel > 7 && zLevel <= 10 )
{
current_country.setVisibility(false);
current_country2.setVisibility(false);
current_country4.setVisibility(false);
current_country5.setVisibility(false);
current_country.displayInLayerSwitcher = false;
current_country2.displayInLayerSwitcher = false;
current_country4.displayInLayerSwitcher = false;
current_country5.displayInLayerSwitcher = false;
current_country3.setVisibility(true);
current_country3.displayInLayerSwitcher = true;
}
Thanks!
Tomas
–
View this message in context: http://osgeo-org.1560.x6.nabble.com/displayInLayerSwitcher-with-event-handler-tp5086953.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users