Difference between getInfoWindow() and getInfoContents() in Googlemaps v2 for Android

前端 未结 1 843
温柔的废话
温柔的废话 2021-02-07 10:59

Two questions:

  1. Whats the difference between public abstract View getInfoWindow (Marker marker) and public abstract View getInfoContents (Mar

1条回答
  •  南笙
    南笙 (楼主)
    2021-02-07 11:16

    MapsV2 showing info window

    In the above screenshot, I have used an InfoWindowAdapter, where I overrode getInfoContents(). My getInfoContents() method returned the icon and text that you see. My getInfoContents() did not provide the rectangular bubble that the icon and text is in. Also, my getInfoContents() did not provide the caret at the bottom of that bubble that points at the marker, the slight drop shadow behind the bubble, etc.

    So, you use getInfoContents() if you want that rectangular bubble, caret, drop shadow, etc. If you do not, and you want to provide the complete info window visual representation, use getInfoWindow().

    0 讨论(0)
提交回复
热议问题