InfoWindow and Panning

649
5
Jump to solution
01-17-2012 05:15 AM
MatthewZetterholm
New Contributor
Hello, everyone.

I am trying to use an InfoWindow as a container for some controls such as buttons and check boxes.

I'd like to be able to pan around the map underneath the InfoWindow without it moving.

My question is:  How do I get an InfoWindow to stay put in one spot on the screen as I pan around?

Thanks.
0 Kudos
1 Solution

Accepted Solutions
derekswingley1
Frequent Contributor
I misunderstood. If you just want to put something on the map, put a div (or other HTML element) inside the map div and position your element. The simple KML layer sample shows this. Check out the markup for the div with id="meta" and the associated CSS.

View solution in original post

0 Kudos
5 Replies
derekswingley1
Frequent Contributor
0 Kudos
MatthewZetterholm
New Contributor
Derek,

Thanks for the reply.

On the sample maps the pop-up moves with the map as it is panned, but I need it to remain in place.

What I am trying to do is have a container with controls sit on top of the map (but detached from it).

Perhaps InfoWindows (Pop-Ups) are the wrong approach, but I'm not sure how else to superimpose a container on the map.

Thanks.

--
Matt
0 Kudos
derekswingley1
Frequent Contributor
I misunderstood. If you just want to put something on the map, put a div (or other HTML element) inside the map div and position your element. The simple KML layer sample shows this. Check out the markup for the div with id="meta" and the associated CSS.
0 Kudos
MatthewZetterholm
New Contributor
That is what I was looking for.

Thanks for the help, Derek.

--
Matt
0 Kudos
derekswingley1
Frequent Contributor
Glad to help. Can you mark which post answered your question as an answer?
0 Kudos