[OpenLayers-Users] Layer.Image not working as Overlay

Arnd Wippermann arnd.wippermann at web.de
Thu Jan 31 08:57:35 PST 2013


If you not included any baselayer to your map, add

        allOverlays:true,

to the map options.

Arnd

-----Ursprüngliche Nachricht-----
Von: openlayers-users-bounces at lists.osgeo.org
[mailto:openlayers-users-bounces at lists.osgeo.org] Im Auftrag von Marco
Scheuble
Gesendet: Donnerstag, 31. Januar 2013 14:53
An: openlayers-users at lists.osgeo.org
Betreff: [OpenLayers-Users] Layer.Image not working as Overlay

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-e
xtents-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-pla
n.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-tp503
1200.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
Users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users



More information about the Users mailing list