package com.awesomeproject3;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.fragment.app.Fragment;

import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.MapView;
import com.google.android.gms.maps.OnMapReadyCallback;

public class GoogleFragment extends Fragment {


    private GoogleMap googleMap;
    private MapView mapView;


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {
        super.onCreateView(inflater, parent, savedInstanceState);
        // customView = new CustomView(this.getContext());
        View rootView = inflater.inflate(R.layout.google_map, parent, false);
        mapView = rootView.findViewById(R.id.map);
        mapView.onCreate(savedInstanceState);


        mapView.getMapAsync(new OnMapReadyCallback() {
            @Override
            public void onMapReady(GoogleMap map) {
                googleMap = map;
                // Customize and use the map here
            }
        });
//


        return rootView; // this CustomView could be any view that you want to render
    }


}
