[OpenLayers-Users] "Lower" Overlays Not Showing When Map Is
ZoomedOut
Arnd Wippermann
arnd.wippermann at web.de
Sat Jan 24 17:55:32 EST 2009
Hi,
I use this image layers options, when I add an image layer as overlay to my
map:
{'isBaseLayer': false, resolution : myBaseLayer.resolutions,
'maxResolution': myBaseLayer.resolutions[0]}
myBaseLayer have to add to the map before the other layers are added to get
the resolutions from myBaseLayer.
...
map.addLayer(world);
var eu = new OpenLayers.Layer.Image('Europe',
'maps/BlueMarble-Jan-Europe.png',
new OpenLayers.Bounds(-13, 33, 65, 72),
new OpenLayers.Size(0,0), //Size only needed if no resolutions declared
{'isBaseLayer': false, resolution : world.resolutions, 'maxResolution':
world.resolutions[0]}
);
...
Then your layers should be availible as the baselayer.
To add options to your layer you have to use { key0: value0, key1 : value1 }
One hint : reduce the image size, your images have 5MB! to get better
loading times.
Arnd Wippermann
-----Ursprüngliche Nachricht-----
Von: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org] Im
Auftrag von Iain Young
Gesendet: Samstag, 24. Januar 2009 19:26
An: users at openlayers.org
Betreff: [OpenLayers-Users] "Lower" Overlays Not Showing When Map Is
ZoomedOut
Hi All,
I have just started experimenting and playing with OpenLayers, so this may
well be a FAQ, or Newbie question, although I have tried searching, but to
no avail.
I have a scaled overall base layer, which is a PNG of the NASA Blue Marble
Image covering the entire world. I have higher res
(cropped/cut) versions for Europe, UK+Ireland, and the Southern United
Kingdom.
I've added the Europe, UK+Ireland, and Southern UK Maps as their own
"Overlay" Layers, with their correct bounds.
If I start at zoom level 0, then all 3 closer range maps are unavailable for
selection. Zooming to level 3 makes Europe available, another zoom level,
and UK+Ireland appears. Two more zoom levels, and Southern UK shows up.
I guess I expected this, as it's related to the bounds of the induvidual
maps. However, in order to get to the appropriate zoom level, the base layer
(and "lower" layers for that matter) end up very blocky.
How can I enable my "lower" layers to be rendered, while being zoomed out ?
I'm guessing the answer has to do with minResolution, maxResolution,
minZoomLevel, maxZoomLevel and friends, however, having fiddled with any and
all related option, I can't seem to change the behaviour.
Any help would be gratefully received, you can see what I mean
here: http://hal.g7iii.net/openlayers/ol-bluemarble.html
Best Regards
Iain
_______________________________________________
Users mailing list
Users at openlayers.org
http://openlayers.org/mailman/listinfo/users
More information about the Users
mailing list