Google Maps Android API v2 - Interactive InfoWindow (like in original android google maps)

前端 未结 7 1666
眼角桃花
眼角桃花 2020-11-22 01:41

I am trying to a make custom InfoWindow after a click on a marker with the new Google Maps API v2. I want it to look like in the original maps application by Go

7条回答
  •  忘了有多久
    2020-11-22 02:38

    Here's my take on the problem. I create AbsoluteLayout overlay which contains Info Window (a regular view with every bit of interactivity and drawing capabilities). Then I start Handler which synchronizes the info window's position with position of point on the map every 16 ms. Sounds crazy, but actually works.

    Demo video: https://www.youtube.com/watch?v=bT9RpH4p9mU (take into account that performance is decreased because of emulator and video recording running simultaneously).

    Code of the demo: https://github.com/deville/info-window-demo

    An article providing details (in Russian): http://habrahabr.ru/post/213415/

提交回复
热议问题