I am working on a Flutter application that requires me to add groundOverlays in google maps. I used google_maps_flutter, but method to add groundOverlay is not supported. Hence I tried to present google maps as PlatformViews. I was able to see the google maps loaded in iOS device, but in Android I am presented with a blank screen.
BlankScreen while presenting google map
Below is what I am doing in my view class.
init {
// Init MapView
mapView = MapView(context)
// textView = TextView(context)
// textView.textSize = 72f
// textView.setBackgroundColor(Color.rgb(200, 180, 150))
// textView.text = "Rendered on a native Android view (id: $id)"
methodChannel = MethodChannel(messenger, "google_maps_view/flutter_map_view_$id")
// Init methodCall Listener
methodChannel.setMethodCallHandler(this)
}
Commenting mapView and uncommenting code for textView, I am able to see the text view added to the platformView.
TextView presented as platform_view
While trying to render mapView I am getting the below error and presented with a blank screen.
I/PlatformViewsController( 5862): Hosting view in view hierarchy for platform view: 0
D/EGL_emulation( 5862): eglMakeCurrent: 0x71f665cc00: ver 3 0 (tinfo 0x71e1c33160)
D/eglCodecCommon( 5862): setVertexArrayObject: set vao to 0 (0) 1 0
D/EGL_emulation( 5862): eglMakeCurrent: 0x71f665cc00: ver 3 0 (tinfo 0x71e1c33160)
D/eglCodecCommon( 5862): setVertexArrayObject: set vao to 0 (0) 1 2
From the first line I understand that the platform view is presented successfully, but the map isn't loading. I am not understanding what D/EGL_emulation is and I am not sure where I am going wrong. Please advise