[OpenLayers-Users] Layer.Image not working as Overlay
Marco Scheuble
mail at marco-scheuble.de
Thu Jan 31 05:53:13 PST 2013
Hi community,
I want to generate an overlay from an image ( jpg, png ) with
OL.Layer.Image.
As a baselayer it works, but for some reason adding the property
"isBaseLayer: false"
an errormessage is thrown: "a.renderer is undefined OL 636"
As I read some threads in this board, it should work this way in principal.
For example thread
<http://osgeo-org.1560.n6.nabble.com/Image-Layer-unable-to-span-across-map-extents-td4657181.html>
Or am I wrong And I should try it another way?
cheers, Marco
code:
--------------------------------------------------------------------------------------
var options = {
maxExtent: new OpenLayers.Bounds( 699000, 227130, 716400, 237580 ),
scales: [ 200000, 100000, 50000, 25000, 17500, 10000, 5000, 3000, 2000,
1000, 500 ],
projection: "EPSG:21781",
units: 'm'
};
map = new OpenLayers.Map( 'Map', options );
...
var overlay = new OpenLayers.Layer.Image(
"Test",
"http://www.ritholtz.com/blog/wp-content/uploads/2010/02/Fusion-IQ-floor-plan.png",
new OpenLayers.Bounds( 707650, 232400, 707850, 232500),
new OpenLayers.Size( 1086, 513 ),
{
isBaseLayer: false,
//projection: new OpenLayers.Projection("EPSG:21781")
}
);
--------------------------------------------------------------------------------------
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Layer-Image-not-working-as-Overlay-tp5031200.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list