[OpenLayers-Users] OverviewMap Rectangle Box.

Tim Schaub tschaub at opengeo.org
Fri Oct 31 15:50:58 EDT 2008


Hey-

Bijoy wrote:
> Hi All,
> 
> With some zoom level, the overview map rectangle box
> (overview_replacement.gif) squeezes to a small red cross, and this behavior
> is visible only when I zoom out from the map after I have zoomed in.
> My map has 8 zoom levels, and my OverviewMap options used as shown below:-
> 
> var options = {maxExtent: new OpenLayers.Bounds(65, 5, 105,
> 40),restrictedExtent: new OpenLayers.Bounds(65, 5, 105, 40),ymin:
> 5,minRatio: 8,maxRatio: 32,maxResolution: 0.07376328980479,resolutions:
> [0.07376328980479, 2.37946096144484E-02, 4.75892192288968E-03,
> 1.18973048072242E-03, 3.56919144216726E-04, 1.78459572108363E-04,
> 4.75892192288968E-05, 1.90356876915587E-05],tileSize: new
> OpenLayers.Size(256,256),tileOrigin: new OpenLayers.LonLat(65, 40),units:
> 'degrees'};
> var overview = new OpenLayers.Control.OverviewMap({mapOptions: options});
> 
> Can anyone suggest a solution to this?

This is a feature, not a bug :)

See the OverviewMap docs for the minRectSize property:

http://tinyurl.com/replace-ov-rect

- or -

http://dev.openlayers.org/apidocs/files/OpenLayers/Control/OverviewMap-js.html#OpenLayers.Control.OverviewMap.minRectSize

Tim

> 
> Thanks.
> <BIJOY>
> 


-- 
Tim Schaub
OpenGeo - http://opengeo.org
Expert service straight from the developers.



More information about the Users mailing list