Show blue dots icon on current location Google Maps

前端 未结 3 534
無奈伤痛
無奈伤痛 2021-01-04 06:11

I\'m getting confused when my blue dot icon is dissapeared. The past is i can show the blue dot icon. But now it just zoom the camera on my current location without blue dot

相关标签:
3条回答
  • 2021-01-04 06:32

    Write the following -

                mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(myLoc, 15));
    

    Maximum zoom view can be upto 20.

    0 讨论(0)
  • 2021-01-04 06:36

    In Kotlin :

            map.isMyLocationEnabled = true
    

    NOT to be confused with :

    map.uiSettings.isMyLocationButtonEnabled = true

    I've used it in my project. And here is the result :

    For embeded view, check out Page 35, here

    0 讨论(0)
  • 2021-01-04 06:47

    You need to do as following:

    GoogleMap myMap;
    myMap.setMyLocationEnabled(true);
    

    You can get all sample project code on my github here and try yourself:)

    0 讨论(0)
提交回复
热议问题