[OpenLayers-Users] problems with the overview map
Tim Schaub
noreply at geocartic.com
Wed Feb 14 12:25:38 EST 2007
Lars Schrader wrote:
> 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.
The numZoomLevels has to be set on the mapOptions property of the
control's options.
var options = {mapOptions: {numZoomLevels: 1}};
map.addControl(new OpenLayers.Control.OverviewMap(options));
This is also true of any other options that you want to set on the
overview map control's map. For example, instead of setting maxExtent
as a property of the control, it needs to be set as a property of the
control's map - this is done with the mapOptions property of the control.
This is a bit confusing without looking at an example. Take a look at
the examples on the wiki page
(http://trac.openlayers.org/wiki/Control/OverviewMap#Customprojectionsextentsetc.)
Write back if you still have trouble.
Tim
More information about the Users
mailing list