android google地图标记的多个代码段

android google地图标记的多个代码段,android,google-maps,Android,Google Maps,我的标记中可以有多个代码段吗?我需要使用它提供的附加信息。这是我当前的代码。我想在这里添加电话号码信息,并将数据设置为意图 //Adding marker on the GoogleMaps private void addMarker(LatLng latlng,final String location2, final String address2) { MarkerOptions markerOptions = new MarkerOptions(); markerOpt

我的标记中可以有多个代码段吗?我需要使用它提供的附加信息。这是我当前的代码。我想在这里添加电话号码信息,并将数据设置为意图

  //Adding marker on the GoogleMaps
  private void addMarker(LatLng latlng,final String location2, final String address2) {
  MarkerOptions markerOptions = new MarkerOptions();
  markerOptions.position(latlng);
  markerOptions.title(location2);
  markerOptions.icon(BitmapDescriptorFactory.fromResource(Store));
  markerOptions.snippet(address2);
  map.addMarker(markerOptions);

  map.setOnInfoWindowClickListener(new OnInfoWindowClickListener() {
      @Override
      public void onInfoWindowClick(Marker marker) {

        Toast.makeText(MainActivity.this, marker.getTitle(),1000).show();// display toast

        //Create Intent object
        Intent openNewActivity = new Intent(getApplicationContext(),Shop_Details.class);

        //Directly set data in intent object
        openNewActivity.putExtra("title", marker.getTitle());
        openNewActivity.putExtra("address", marker.getSnippet());

        startActivity(openNewActivity);

      }
  });

}
检查: