package com.atmob.map_google_android.googlemap;

import android.app.Activity;
import android.content.Context;
import android.view.View;
import android.widget.TextView;

import androidx.annotation.Nullable;

import java.util.Map;

import io.flutter.plugin.common.BinaryMessenger;
import io.flutter.plugin.common.MethodChannel;
import io.flutter.plugin.platform.PlatformView;

public class GoogleMapView implements PlatformView {

    private final String TAG = "GoogleMapView";

    private final Context context;
    private final Activity activity;

    private final BinaryMessenger messenger;

    private final int viewId;

    Map<String, Object> args;

    private MethodChannel channel;

    int adFuncId;

    private View mContainer = null;

    public GoogleMapView(Context context, Activity activity, BinaryMessenger messenger, int viewId, Map<String, Object> args) {
        this.context = context;
        this.activity = activity;
        this.messenger = messenger;
        this.viewId = viewId;
        this.args = args;
        initParams();
        initView();
    }

    void initView() {
        TextView textView = new TextView(context);
        textView.setText("谷歌地图 mapview");
        mContainer = textView;
    }


    void initParams() {

    }


    @Nullable
    @Override
    public View getView() {
        return mContainer;
    }


    @Override
    public void dispose() {
        channel.setMethodCallHandler(null);
    }


}
