Anthone
Anthone

Reputation: 2290

Android map v2 set position infoWindow

I update my project from Android google map v1 to map v2. But I have a serious problem, I have to set the entire infoWindow on the screen without changing the position of the map (Only if the window can't enter in the screen).

I make a custom InfoWindowAdapter, but how can I set the position of infoWindow ? Or do something to make the infoWindow center on the screen, without moving the map to center the infoWindow.

What I want when we clic on the overlay (without moving map) enter image description here

If I don't arrive to solve this probleme, I have to return to map v1 :(

I hope, I arrive to explain my problem.

Anthony

Upvotes: 0

Views: 2033

Answers (1)

MaciejGórski
MaciejGórski

Reputation: 22232

If you want to put something in the center of the screen, try using plain old Views on top of the map inside FrameLayout.

If you really want to reposition the info window, you may want to learn about setInfoWindowAnchor, but some calculations will be required to make it work properly.

Upvotes: 1

Related Questions