I understand how to set opactity to a map layer in OSM but how do you get the opacity?
Perhaps something like
layer.getOpacity()
OpenLayers.Util.getElement('opacity').value = layer.???
I have tried different combinations without success.
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.
Sign up to join this communityI understand how to set opactity to a map layer in OSM but how do you get the opacity?
Perhaps something like
layer.getOpacity()
OpenLayers.Util.getElement('opacity').value = layer.???
I have tried different combinations without success.
In OpenLayers 2, opacity is a property, no need to use a function to get it :
OpenLayers.Util.getElement('opacity').value = layer.opacity;
cf http://dev.openlayers.org/docs/files/OpenLayers/Layer-js.html