allow for setting opacity of alpha image divs. also give both Icon and Marker setOpacity() functions. added tests and modified examples/markers.html to show how to do it.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@1541 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-10-03 17:36:03 +00:00
parent 634588abf0
commit 348b0b388d
7 changed files with 90 additions and 10 deletions

View File

@@ -98,6 +98,15 @@ OpenLayers.Marker.prototype = {
}
},
/** Change the opacity of the marker by changin the opacity of
* its icon
*
* @param {float} opacity Specified as fraction (0.4, etc)
*/
setOpacity: function(opacity) {
this.icon.setOpacity(opacity);
},
/** Hide or show the icon
*
* @param {Boolean} display