在Google Maps v2上绘制画布

时间:2015-12-12 19:15:27

标签: android canvas google-maps-api-2 ondraw

如何使用Google Api V2在Android应用程序中的Google地图片段上绘制画布? 我会在谷歌地图上绘制一个矩形,但没有标记。 感谢。

1 个答案:

答案 0 :(得分:0)

您可以将标记与自定义图像一起使用:

mMap.addMarker(new MarkerOptions().position(new LatLng(0, 0)).title("Marker")
.icon(BitmapDescriptorFactory.fromResource(R.drawable.blue_point))
.snippet("Your " + "location is here"));

有关详细信息,请参阅此链接更改地图标记图标:http://kb4dev.com/article/android-google-map-integration-with-location-api