我想问一下我在我的应用程序中使用谷歌地图开发的 android 应用程序。我已经在我的地图上制作了多个标记(1323 数据所以 1323 标记)。所以问题是:
我想制作搜索框以在我的地图上查找特定标记。我不知道如何找到。是否可以在标记中使用标题或片段找到
c = myDbHelper.query("Landslide", null, null, null, null,null, null);
if(c.moveToFirst()) {
do {
String loc = c.getString(3);
Double lat = c.getDouble(4);
Double lng = c.getDouble(5);
String date = c.getString(1);
//Integer death = c.getInt(6);
mMap.addMarker(new MarkerOptions()
.position(new LatLng(lat, lng))
.title(loc + "")
.snippet("Latitude:" + lat + " " + "Longitude:" + lng + " " + "Date:" + date + "")
.icon(BitmapDescriptorFactory.fromResource(R.drawable.red1)));
} while (c.moveToNext());
}
}
在此先感谢帮助我的人,问候, Hafizul Reza