我有经纬度&从数据库长显示标记基于纬度&长值使用android谷歌地图api v2.在原来的Android谷歌地图,我们显示基于标记在概念itemoverlay上。在v2中,我不知道如何显示标记。代码添加标记使用安卓谷歌地图v2
dbAdapter.open();
Cursor points = dbAdapter.clustercall(Btmlft_latitude, toprgt_latitude,
Btmlft_longitude, toprgt_longitude, gridsize1);
int c = points.getCount();
Log.d("count of points", "" + c);
if (points != null) {
if (points.moveToFirst()) {
do {
int latitude = (int) (points.getFloat(points
.getColumnIndex("LATITUDE")) * 1E6);
int longitude = (int) (points.getFloat(points
.getColumnIndex("LONGITUDE")) * 1E6);
mapView.addMarker(new MarkerOptions().position(
new LatLng(latitude, longitude)).icon(
BitmapDescriptorFactory.defaultMarker()));
} while (points.moveToNext());
}
}
points.close();
dbAdapter.close();
也就是说mycode.I是从数据库中获取纬度&长期价值,但如何根据纬度&长值映射添加标记。
我读了谷歌Android地图API v2.In那些只给静态加入标记的数据