我们如何在新的 Google Maps Android API v2 中向标记添加对象?因此,如果我们点击
InfoWindow
,我们可以对该对象执行某些操作吗?public void addSpotOnMap(Spot spot) {
getMap().addMarker(new MarkerOptions()
.position(new LatLng(spot.getParseGeoPoint().getLatitude(), spot.getParseGeoPoint().getLongitude()))
.title(spot.getName())
.snippet(spot.getCategory())
.draggable(false));
}
这段代码设置了对象的位置、标题和简介。但是如果我点击 InfoWindow
,我希望能够跳转到关于这个特定景点对象的另一个活动。