【问题标题】:How to make such a custom marker? osmdroid如何制作这样的自定义标记? osmdroid
【发布时间】:2017-08-26 18:03:40
【问题描述】:

如何制作这样的自定义标记?

【问题讨论】:

    标签: android osmdroid


    【解决方案1】:

    首先使用BitmapDescriptorFactory.fromResource(id goes here)

    然后使用

    向地图添加标记
    Marker marker = GoogleMap.addMarker(new MarkerOptions().position(latLng)
                                        .icon(BitmapDescriptorFactory.fromResource(id goes here));
    

    对于你可以使用的文本

    marker.setTitle(string);   //text on top
    marker.setSnippet(string); //text below the title
    

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-04-22
    • 2018-05-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多