MapView.onMapReady never called in Fragment for load Google Map in MapView

后端 未结 6 778
野性不改
野性不改 2021-01-05 09:59

I\'ll try to show a map in my Android application on a fragment named RoeteFragment. If I debug my code I see that the method onMapReady is never c

6条回答
  •  不知归路
    2021-01-05 10:46

    Try to use support map fragment. It will work in fragments also. https://developers.google.com/android/reference/com/google/android/gms/maps/SupportMapFragment#developer-guide

    For camera and zoom level check this -https://developers.google.com/maps/documentation/android-api/views#introduction

    Try this and if it help accept it as answer.

提交回复
热议问题