Code example for Marker

Methods: getId

0
        return getMap().addMarker(options);
    } 
 
    @Override 
    public void onInfoWindowClick(Marker marker) {
        TagInfo tagInfo = mMarkerDict.get(marker.getId());
        Intent intent = new Intent(getActivity(), DetailsActivity.class);
        intent.putExtra("taginfo", tagInfo);
        startActivityForResult(intent, EDIT_DETAILS_REQUEST);
    } 
 
    @Override 
    public void onActivityResult(int requestCode, int resultCode, final Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        if (resultCode == Activity.RESULT_OK) {
            if (requestCode == EDIT_DETAILS_REQUEST) {
                TagInfo tagInfo = data.getParcelableExtra("taginfo");
                final DatabaseHelper db = DatabaseHelper.getInstance(getActivity());
                db.updateTagInfoAsync(tagInfo, this);
            } 
        }