Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

when I do this:

    var options = {
        autoPan : true,
        size : new OpenLayers.Size(300, 200),
        layers : this.map.layers,
        mapOptions : {
            allOverlays : true
        }
    };
    var ov = new OpenLayers.Control.OverviewMap(options);

    this.map.addControl(ov);

my layers are only shown in the overview window. The layers disappear from the main screen.

Any suggestions how to fix it?

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

You need to add a clone of the map layer to the overview control rather than the layer itself.

The OpenLayers overview map example has a bit more information in the page source:

A clone of the above layer that we will use as overview for map2. We need to clone jpl before the it gets added to a map, so the clone can have its own maxExtent and maxResolution instead of getting these settings initialized from map1.

share|improve this answer
    
Thank you! This solved my problem. –  Achaja Apr 25 '13 at 13:58
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.