Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

when I do this:

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

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
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

Your Answer


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.