活动< - 首先,我想intent.putExtra(数据)...... 但它只放了一个标记...... 它没有(数据)很多标记??? 帮帮我,pllz ??
Marker marker = map.addMarker(new MarkerOptions().icon(BitmapDescriptorFactory.fromBitmap(bmp))
.position(new LatLng(dataLat,dataLong)).title(dataTitle)
.snippet(dataAddress));
allMarkersMap.put(marker, DetailActivity.class);
map.setOnInfoWindowClickListener(new OnInfoWindowClickListener() {
@Override
public void onInfoWindowClick(Marker marker) {
Class cls = allMarkersMap.get(marker);
// TODO Auto-generated method stub
Intent intent = new Intent(MainActivity.this,cls);
intent.putExtra("Title",dataTitle);
// Toast.makeText(getBaseContext(), phone + "-"+ dataTitle +"-"+ dataAddress + "-" , Toast.LENGTH_SHORT).show();
startActivity(intent);
活动< - 第二
Intent intent = getIntent();
tvtitle = (TextView)findViewById(R.id.tvTitle);
Bundle bundle = intent.getExtras();
String dataTitle = bundle.getString("Title");
((TextView)findViewById(R.id.tvTitle)).setText("Title: " + dataTitle);
// Toast.makeText(getBaseContext(),title, Toast.LENGTH_SHORT).show();
}