Code example for SupportMapFragment

Methods: getActivity, getMap, onViewCreated

0
    private static final int EDIT_DETAILS_REQUEST = 1;
    private Dictionary<String, TagInfo> mMarkerDict;
 
    @Override 
    public void onViewCreated(View view, Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        mMarkerDict = new Hashtable<String, TagInfo>();
        getMap().setOnInfoWindowClickListener(this);
        addMarkersFromDatabase(); 
    } 
 
    private void addMarkersFromDatabase() { 
        DatabaseHelper db = DatabaseHelper.getInstance(getActivity());
        db.fetchTagInfoListAsync(this);
    } 
 
    @Override 
    public void onTagInfoListAvailable(List<TagInfo> list) {
        getMap().clear();
        LatLngBounds.Builder builder = new LatLngBounds.Builder();
        for (TagInfo tagInfo : list) {