[OpenLayers-Users] Layer.Image not working as Overlay
Arnd Wippermann
arnd.wippermann at web.de
Fri Feb 1 09:21:01 PST 2013
Hi,
That's what I do, to show the floorplan
function init()
{
mapOptions = {
//allOverlays:true,
"controls":[
new OpenLayers.Control.Navigation(),
new OpenLayers.Control.PanZoomBar(),
new OpenLayers.Control.LayerSwitcher()
],
projection:"EPSG:21781",
scales: [ 200000, 100000, 50000, 25000, 17500, 10000, 5000, 3000,
2000, 1000, 500 ],
maxExtent: new OpenLayers.Bounds(699000,227130,716400,237580),
maxZoomLevel:11,
numZoomLevels:11,
units:"m",
center: new
OpenLayers.LonLat(lon=707751.653645,lat=232444.48785022),
zoom:8
}
map = new OpenLayers.Map("map", mapOptions);
var baseLyr = new OpenLayers.Layer("Fake BaseLayer");
baseLyr.isBaseLayer=true;
lyr1 = new OpenLayers.Layer.Image("Image Overlay",
"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(0,0),
{
projection:"EPSG:21781",
isBaseLayer:false,
visibility:true
}
);
map.addLayers([baseLyr,lyr1]);
map.setCenter(mapOptions["center"], mapOptions["zoom"]);
}
good luck,
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: Freitag, 1. Februar 2013 08:48
An: openlayers-users at lists.osgeo.org
Betreff: Re: [OpenLayers-Users] Layer.Image not working as Overlay
Hi Arnd,
thanks for your reply.
I have defined some baselayers. So this is not an option for me.
for example this one:
var orthophoto = new OpenLayers.Layer.WMS(
"otrhophoto", "wmsurl", {
LAYERS: 'RJ_Ortho',
format: 'image/jpeg'
}, {
isBaseLayer: true,
transitionEffect: 'resize'
}
);
cheers, Marco
--
View this message in context:
http://osgeo-org.1560.n6.nabble.com/Layer-Image-not-working-as-Overlay-tp503
1200p5031416.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