[OpenLayers-Users] Making popup display above controls?

Erik Uzureau erik.uzureau at metacarta.com
Mon Jul 16 23:45:16 EDT 2007


On 7/16/07, Glen Stampoultzis <gstamp at gmail.com> wrote:
> On 17/07/07, Erik Uzureau <erik.uzureau at metacarta.com> wrote:
> > In Map.js, you will find:
> >
> >     Z_INDEX_BASE: { BaseLayer: 100, Overlay: 325, Popup: 750, Control: 1000 },
> >
> > which is how the z index of the different layers, popups, and controls
> > are determined.
> >
> > I *believe* that if you do something like
> >
> > OpenLayers.Map.Z_INDEX_BASE.Popup = 2000;
> >
> > that should fix it.
> >
> > ...sure, you're overwriting a defined constant.... but hey.. that's
> > what JS is all about.
> >
> > Erik
>
> Thanks Eric, this doesn't seem to do it.  The issue seems to be that
> the controls don't have the same parent div as the popup/layer divs so
> the z-order doesn't help.  I'm guessing the controls would have to be
> specifically placed inside the "OpenLayers_Container" div for this to
> work.
>
> Regards,
>
> Glen

so it is, so it is.... hmm.... can't think of an answer for you right
off the bat. I tried the suggestion I gave you and the whole layer
floated over the controls. not good. I'm not sure this can actually be
done.

Since the popups by default live in the container and the controls
live parallel to the container... it might not be possible:

<html>
  <body>
    <div id="a" style="position: absolute; z-index:100; top: 20px;
left: 20px; height: 100px; width:100px; background-color: red"></div>
    <div id="b" style="position: absolute; z-index: 50; top: 0px;
left: 0px; height: 500px; width:500px; background-color: blue">
        <div id="c" style="position: absolute; z-index: 150; top:
50px; left: 50px; height: 100px; width:100px; background-color:
yellow"></div>
    </div>
  </body>
</html>

Sorry... maybe someone else has an idea?
---E


> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>



More information about the Users mailing list