How to replace blue dot with my icon on google maps v2 in android?

后端 未结 2 1318
隐瞒了意图╮
隐瞒了意图╮ 2021-01-13 18:52

I am trying to replace blue dot (which shown current location on maps) with my own icon on Google maps v2. I have tried below, none worked.

  • Android Maps API v2
2条回答
  •  盖世英雄少女心
    2021-01-13 19:12

    I think you pass your current location to LocationSource to be able to use the my-location button.

    You have to do that on your own. - set to false gmaps.getUiSettings().setMyLocationButtonEnabled(false);

    • create your own location button
    • if you get your current location, set a marker with your icon on that
    • if you click on your location button, move the camera and center it to the map

提交回复
热议问题