add new vector style property "graphicOpacity"

enabling mixing non-opaque vector geometries with opaque external graphics on the same vector layer
(closes #873)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@4114 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Éric Lemoine
2007-08-30 05:59:29 +00:00
parent 06d41662d7
commit 3e1f2e4305
5 changed files with 67 additions and 21 deletions
+6 -1
View File
@@ -210,7 +210,12 @@ OpenLayers.Renderer.VML = OpenLayers.Class(OpenLayers.Renderer.Elements, {
fill = this.createNode('v:fill', node.id + "_fill");
node.appendChild(fill);
}
if (style.fillOpacity) {
// if graphicOpacity is set use it in priority for external graphic
if (node._geometryClass == "OpenLayers.Geometry.Point" &&
style.externalGraphic &&
style.graphicOpacity) {
fill.setAttribute("opacity", style.graphicOpacity);
} else if (style.fillOpacity) {
fill.setAttribute("opacity", style.fillOpacity);
}
}