Creating new divs on the map

24 views
Skip to first unread message

az az

unread,
Nov 4, 2011, 5:51:31 AM11/4/11
to google-map...@googlegroups.com
This should be simple I hope.
I have map here:

how can I create more divs on it, like the adsense for maps divs. I want to put some of my images in some extra divs so I should have the ability to use them as normal html.
Is it possible?
Thanks

JD Gauchat

unread,
Nov 4, 2011, 9:34:27 AM11/4/11
to google-map...@googlegroups.com
If what you want is to put the map inside a div and then have other divs shown over it you have to use these CSS properties:

position: relative;
position: absolute;

and place the div that's going over, inside the first one. For example, I use a construction like this:

<div style="position: relative;">
  <div style="position: absolute">here goes the map</div>
  <div style="position: absolute; z-index: 10">
      here goes the error message that's going to show up over the map
  </div>
</div>

Martin™

unread,
Nov 4, 2011, 8:30:39 PM11/4/11
to Google Maps JavaScript API v3
Reply all
Reply to author
Forward
0 new messages