[OpenLayers-Users] Can't get overview map to work

Ian Turton ijturton at gmail.com
Thu Aug 19 14:20:38 EDT 2010


On Thu, Aug 19, 2010 at 2:00 PM, Planet)x <andrew.stewart at reddeer.ca> wrote:
>
> I am having issues getting an overmap to show anything besides an empty blue
> box with no layers. I have tried to look at the overviewmap example located
> here - http://openlayers.org/dev/examples/ but I am unable to get my map to
> even work with this example. Below is my code but when I run it all I see is
> my map and an overview map that is entirely blue and has nothing inside it,
> any help appreciated!
>

I can't be sure but aren't you missing this bit (copied from the example)

        var controlOptions = {
            mapOptions: OpenLayers.Util.extend(mapOptions, {
                maxResolution: 156543.0339,
                maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34,
                                     20037508.34, 20037508.34)
            }),
            layers: [jplOverview]
        }
        var overview2 = new OpenLayers.Control.OverviewMap(controlOptions);
        map2.addControl(overview2);

Ian

-- 
Ian Turton



More information about the Users mailing list