我的项目有问题,我不知道如何在谷歌地图上使用数据库 mySql 中的纬度和经度数据显示多个标记。
这里使用数组列表的代码:
private class SitesOverlay extends ItemizedOverlay<OverlayItem> {
private List<OverlayItem> items=new ArrayList<OverlayItem>();
public SitesOverlay(Drawable marker) {
super(marker);
boundCenterBottom(marker);
//i want change this, calling the data from mysql automatically
items.add(new OverlayItem(getPoint(40.748963847316034,
-73.96807193756104),
"UN", "United Nations"));
items.add(new OverlayItem(getPoint(40.76866299974387,
-73.98268461227417),
"Lincoln Center",
"Home of Jazz at Lincoln Center"));
items.add(new OverlayItem(getPoint(40.765136435316755,
-73.97989511489868),
"Carnegie Hall",
"Where you go with practice, practice, practice"));
items.add(new OverlayItem(getPoint(40.70686417491799,
-74.01572942733765),
"The Downtown Club",
"Original home of the Heisman Trophy"));
populate();
}