如何使用Android map v2创建带有图标和按钮的自定义标记

时间:2016-05-29 16:06:44

标签: android google-maps

现在我的标准文字标记为:standart marker

如何使用图标和按钮创建自定义标记并关闭并调用,像这样

custom marker

现在我有了这段代码:

private void addMarker(Company company) {
    if(_map != null) {
        LatLng place = new LatLng(company.Latitude, company.Longitude);
        _map.addMarker(new MarkerOptions()
            .position(place)
            .title(company.Name)
            .snippet(String.format("%s %s", company.Phone, company.Address))
            .draggable(false)
            .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE))
            .flat(true));
        _map.moveCamera(CameraUpdateFactory.newLatLngZoom(place, 12));
    }
}

0 个答案:

没有答案
相关问题