<div dir="ltr">Hi,<div><br></div><div>here is an example of what I have and it works right away:</div><div><br></div><div><div> var blue_unit = new OpenLayers.Layer.Vector("Blue Unit (VIMS)", {</div><div> protocol: new OpenLayers.Protocol.HTTP({</div>
<div> url: "Mapping/blue_unit.gml",</div><div> format: new OpenLayers.Format.GML()</div><div> }),</div><div> strategies: [new OpenLayers.Strategy.Fixed()],</div>
<div> visibility: true,</div><div> //wrapDateLine: true,</div><div> style: {fillColor: "#0066cc",fillOpacity:0.4 , strokeWidth: 1, strokeColor: "#0066cc", strokeOpacity: 1 },</div>
<div> projection: map.displayProjection,</div><div> });</div></div><div><br></div><div style><br></div><div style><br></div><div style>i.e., Strokes are opaque but the filling of the polygon is transparent at 60%.</div>
<div style><br></div><div style>a.</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jun 21, 2013 at 11:05 AM, juansre <span dir="ltr"><<a href="mailto:juansre@gmail.com" target="_blank">juansre@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi.<br>
I'm having problems setting the transparency for my local kml file.<br>
This is the code i'm using:<br>
<br>
map.addLayer(new OpenLayers.Layer.Vector("comarcas",<br>
{<br>
protocol: new OpenLayers.Protocol.HTTP({<br>
url: "comarcas.kml",<br>
format: new OpenLayers.Format.KML({<br>
extractStyles: true,<br>
extractAttributes: true,<br>
transparent: true<br>
})<br>
<br>
<br>
I've also probed with:<br>
setOpacity: 0.5<br>
<br>
But nothing seems to work, and I don't know what i'm doing wrong.<br>
Thanks for your help!!<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://osgeo-org.1560.x6.nabble.com/KML-set-transparency-tp5061515.html" target="_blank">http://osgeo-org.1560.x6.nabble.com/KML-set-transparency-tp5061515.html</a><br>
Sent from the OpenLayers Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
<br>
</blockquote></div><br></div>