[OpenLayers-Users] problems with the overview map
Lars Schrader
lars.schrader at web.de
Wed Feb 14 08:05:37 EST 2007
Hello,
I`ve got a problem with the OverviewMap. I have read some postings from the
list and the entry in the wiki, but I can´t find a solution for my problem.
What I want to have is a OverviewMap, which always shows the complete area of
interest (the complete WMS-Layer). No Zoom-In and no Zoom-Out. Only the red
rectangle should change his position.
I have send the non-default options from the main map to the constructor of
the overview.
I thought, that the entry 'numZoomLevels: 1' can solve the problem with the
'No Zoom-In and no Zoom-Out', but it doesn´t work.
How can I define a Bounding Box for the OverviewMap, which always shows the
complete view of the OverviewMap-Layer (that´s the maxExtent-Entry in the
code)?
Hope anybody can help me.
Greetings, Lars
var optionsOverview = {div: $('overviewdiv')
, projection: "EPSG:31467"
, units: 'm'
, maxExtent:new
OpenLayers.Bounds(3344905,5685539,3663844,5970992)
, resolutions: [35,30,25,20,12,9,6,4,2,1]
, layers:[overviewMap.clone()]
, 'size': new OpenLayers.Size(300,300)
//, minRatio: 8
//, maxRatio: 32
, numZoomLevels: 1
};
var ovControl = new
OpenLayers.Control.OverviewMap(optionsOverview);
ovControl.isSuitableOverview = function() {
return false;
};
map.addControl(ovControl);
More information about the Users
mailing list