On Jun 4, 5:19 am, "[email protected]" <[email protected]> wrote:
> What I want is to overlay a white rectangle (with some text) on my map
> and have an event handler so when i click it, it disappears and
> reveals the map. How do i do this?
>
> i tried doing something really dodgy with a custom control rather than
> an overlay but this caused the map to center differently to how i
> wanted (it made it center way to the left of where it was supposed to
> center)

I've no idea how that should happen. What I've done in the past can be
seen at http://www.achurchnearyou.com/eastbourne-st-andrew/ -- click
"Find Us" to see the map. The white box at bottom right is a GControl
which is built up in Javascript with the function legend_control().

The code creates an HTML element (a table in this case, it could be a
lot simpler). Although I don't need to hide it, it could be given an
id so that it could be hidden with
  document.getElementById("myControlId").style.display="none"

I used a GControl so that infoWindows will avoid it. If all you want
is a simple message which doesn't actually need to be part of the map,
then ProbablyMike's CSS-driven div is by far the easiest way to go.

Andrew
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to