I would like to create a static popup using openLayers 2.11 which is always in the lower-right corner of the screen and appears on map load. The idea behind this is to have a logo for my school always appear. I already have a marker layer setup. Maybe I am approaching this incorrectly.

I have tried using some of the examples on the OpenLayers website regarding anchored popups with no luck.

The contents of the popup are as follows:

    <div id="cube" style="width: 100%; height: 100%; background-color-#575757;">
    <link rel="stylesheet" type="text/css" href="css/cube.css">
    <div class="wrap">
<div class="cube">
    <div class="front">front</div>
    <div class="back">back</div>
    <div class="top">top</div>
    <div class="bottom">bottom</div>
    <div class="left">left</div>
    <div class="right">right</div>

1 Answer 1


If the position of logo is static and not feature-dependent, then you don't need a popup. You can use an ordinary div element positioned over the map (just make sure that the CSS z-index is high enough, more than 1000), or put the HTML content in markers layer 'attribution' property and add the following CSS rule:

.olControlAttribution {
    right: 0px;
    bottom: 0px;

to place the content in lower-right corner of the map.

  • Thank you for your response Michal! I have tried setting up another div for the content, however, I have been unable to get it positioned over the map div. Can you provide me with an example I could use? Any help is greatly appreciated. Mar 16, 2014 at 0:33
  • A quick-and-dirty example: jsfiddle.net/jL8bD This is a div with some content (image+text) placed in upper-right corner of the map. The z-index value of 1000 might be not enough for a more complex map with many layers, play with Firebug or Chrome Dev Tools to figure out a right z-index for your application. Mar 17, 2014 at 9:14
  • Michal's answer link is perfect! Thank you for solving my problem! Mar 24, 2014 at 19:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.