package com.abbidot.tracker.ui.fragment.map.googlemap

import android.content.Context
import android.location.Location
import com.google.android.gms.maps.GoogleMap

/**
 *Created  by .yzq on 2024/4/23/023.
 * @link
 * @description:
 */
class PreviewFencesGoogleMapFragment : BaseGoogleMapFragment() {

    private lateinit var mMapLoadOk: () -> Unit

    companion object {
        @JvmStatic
        fun newInstance(context: Context, mapLoadOk: () -> Unit) =
            PreviewFencesGoogleMapFragment().apply {
                mContext = context
                mMapLoadOk = mapLoadOk
            }
    }

    override fun onMapLoadOk(googleMap: GoogleMap) {
        getLastLocation()
        //变量是否初始化
        if (::mMapLoadOk.isInitialized) mMapLoadOk()
    }

    override fun locationSuccess(location: Location?) {
    }
}