No red box in Overview Map

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

No red box in Overview Map

dnbphysicist
I have a very simple overview map:

var overviewBaseLayer = map.layers[0].clone();
overviewBaseLayer.setIsBaseLayer(true);
var overview = new OpenLayers.Control.OverviewMap({
    maximized:true,
    layers:[overviewBaseLayer]
});
map.addControl(overview);

(Cloning the layer and adding it manually was the only way I could get the overview map to construct without erroring on "this.baseLayer is null".)

So now the overview map shows up and follows the movements of the map, but no red box. Any ideas? I'm using OL 2.12 and it does this in both Firefox 17 and IE 8.

Thanks in advance!

_______________________________________________
Users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/openlayers-users
Reply | Threaded
Open this post in threaded view
|

Re: No red box in Overview Map

Julien-Samuel Lacroix
Hello,

Not sure if it helps, but last time I encountered something like, it was
because I didn't had the style.css file to my page. Edit the path of the
following include to reflect your installation:

         <link rel="stylesheet"
href="/openlayers/theme/default/style.css" type="text/css">


Does the OverviewMap example works?

Julien

On 13-09-04 08:11 AM, Rob Hyx wrote:

> I have a very simple overview map:
>
> var overviewBaseLayer = map.layers[0].clone();
> overviewBaseLayer.setIsBaseLayer(true);
> var overview = new OpenLayers.Control.OverviewMap({
>      maximized:true,
>      layers:[overviewBaseLayer]
> });
> map.addControl(overview);
>
> (Cloning the layer and adding it manually was the only way I could get
> the overview map to construct without erroring on "this.baseLayer is null".)
>
> So now the overview map shows up and follows the movements of the map,
> but no red box. Any ideas? I'm using OL 2.12 and it does this in both
> Firefox 17 and IE 8.
>
> Thanks in advance!
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>

--
Julien-Samuel Lacroix
Mapgears
http://www.mapgears.com/
_______________________________________________
Users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/openlayers-users
Reply | Threaded
Open this post in threaded view
|

Re: No red box in Overview Map

dnbphysicist
Thanks Julien. I actually fixed it and it ended up being something very similar. The style class for the red box was at a lower z-index than the base layer... Very odd.


On Wed, Sep 4, 2013 at 9:48 AM, Julien-Samuel Lacroix <[hidden email]> wrote:
Hello,

Not sure if it helps, but last time I encountered something like, it was because I didn't had the style.css file to my page. Edit the path of the following include to reflect your installation:

        <link rel="stylesheet" href="/openlayers/theme/default/style.css" type="text/css">


Does the OverviewMap example works?

Julien


On 13-09-04 08:11 AM, Rob Hyx wrote:
I have a very simple overview map:

var overviewBaseLayer = map.layers[0].clone();
overviewBaseLayer.setIsBaseLayer(true);
var overview = new OpenLayers.Control.OverviewMap({
     maximized:true,
     layers:[overviewBaseLayer]
});
map.addControl(overview);

(Cloning the layer and adding it manually was the only way I could get
the overview map to construct without erroring on "this.baseLayer is null".)

So now the overview map shows up and follows the movements of the map,
but no red box. Any ideas? I'm using OL 2.12 and it does this in both
Firefox 17 and IE 8.

Thanks in advance!


_______________________________________________
Users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/openlayers-users


--
Julien-Samuel Lacroix
Mapgears
http://www.mapgears.com/
_______________________________________________
Users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/openlayers-users



--
HYX

_______________________________________________
Users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/openlayers-users