Map Markers with text in Google Maps Android API v2

后端 未结 6 1213
难免孤独
难免孤独 2020-11-30 05:19

I have came up with this post but it is for the deprecated Google Maps API

http://tech.truliablog.com/2012/02/23/custom-map-markers-for-android-google-maps/

6条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-30 05:40

    I know this question is old but I'll post my answer here in case it helps someone.

    None of the above solutions were working for me because

    • I already have custom icons for markers in my app

    • My app display potentially thousands of different marker titles so creating that many images in memory would be a performance problem

    • As the marker icons become bigger, the map becomes very quickly unreadable

    • I wanted the titles to show only if there is room, potentially hiding if not enough room to display

    I found no solution on the internet so I rolled up my sleeves and made this library which solves my problem, hopefully it will help others too:

    https://github.com/androidseb/android-google-maps-floating-marker-titles

    Here is a preview of how it works:

提交回复
热议问题