我有一些纬度和logtitute我想这些发送到MapActivity是有可能我做了很多方法,但在Mapacitivity将数据发送至MapActivity
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_maps);
Intent intent = getIntent();
HashMap<String, String> hashMap = (HashMap<String, String>)intent.getSerializableExtra("map");
Log.v("HashMapTest", hashMap.get("key"));
// Obtain the SupportMapFragment and get notified when the map is ready to be used.
SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
.findFragmentById(R.id.map);
mapFragment.getMapAsync(this);
是什么问题?它不工作?你有什么异常吗? –
可能的重复:http://stackoverflow.com/questions/7578236/how-to-send-hashmap-value-to-another-activity-using-an-intent – dex