On 02/28/2012 10:42 AM, M.E.Dodd wrote:
Thanks for the suggestion, I tried putting the opacity value here:
var osm = new OpenLayers.Layer.OSM(
"OpenStreetMap",
"http://tile.openstreetmap.org/${z}/${x}/${y}.png",opacity:0.5
{
In the openstreetmaps .html but that made the map vanish altogether so I
removed the 'opacity:0.5' and osm map reappeared again. Do I need to stick it
somewhere else in the .html file?
It is a property which you should add in the 'options'-object (I'm
talking OpenLayers lingua now, have a look at OpenLayers.org):
So, change this in osm.html:
var osm = new OpenLayers.Layer.OSM(
"OpenStreetMap",
"http://tile.openstreetmap.org/${z}/${x}/${y}.png",
{
eventListeners: {
"loadstart": layerLoadStart,
"loadend": layerLoadEnd
}
}
);
Into this:
var osm = new OpenLayers.Layer.OSM(
"OpenStreetMap",
"http://tile.openstreetmap.org/${z}/${x}/${y}.png",
{
eventListeners: {
"loadstart": layerLoadStart,
"loadend": layerLoadEnd
}
,opacity:0.5
}
);
This should work :-)
Regards,
Richard Duivenvoorde
_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-user