[OpenLayers-Dev] overview map w/ Bing layer not working

crb jcbeaude at yahoo.com
Tue Oct 12 01:15:16 EDT 2010


I've read some of the other posts but it's not clear whether others have been
able to get an overview map with Bing layers to work (or not).  I get a blue
oview map, even when using the same map options as my base map and even when
using a cloned layer of my main map's base layer (index '0').  I noticed
that after I clone it my cloned layer has a class of "OpenLayers.Layer" but
my map's base layer has the class "OpenLayers.Layer.VirtualEarth".  Not sure
if it matters, but I also change the main map's extent only after adding the
overview map control, as all the examples do.


        var oviewLyr = map.layers[0].clone();
        oviewLyr.name = "overview";
        var oviewOpts = OpenLayers.Util.extend(mapOptions, {
            'layers': [oviewLyr]
        });
        var oviewMap = new OpenLayers.Control.OverviewMap(oviewOpts);
        map.addControl(oviewMap);
        . . .
        map.zoomToExtent(initialExtent, true);



The red-dotted square encompasses the entire oview map frame (i.e. it's not
a tiny red square as was recognized in other posts).  If I try dragging
within the oview map, my main map onmovestart and onmoveend events fire, but
the map doesn't move.

If I set overview map options with a 'layers' of [ sm.map.layers[0] ]
instead of [oviewLyr], then I see one tile of my main map's base layer, but
my main map is then blank.

The mapOptions for the main map had a bunch of controls set, but I disabled
them in the oview map, i.e. :

        var oviewOpts = OpenLayers.Util.extend(mapOptions, {
            'layers': [oviewLyr],
            'controls': []
        });


Any thoughts?

-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/overview-map-w-Bing-layer-not-working-tp5625490p5625490.html
Sent from the OpenLayers Dev mailing list archive at Nabble.com.


More information about the Dev mailing list