1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

MarkerOptionsでマーカーの色を変える方法

Posted at

MarkerOptions#iconBitmapDescriptorを渡します。

実装は以下のようになります。

val latLng = LatLng(0.0, 0.0)

val bitmapDescriptor = BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE)

MarkerOptions().position(latLng).icon(bitmapDescriptor)

色の種類

BitmapDescriptorFactoryには以下の色があります。

HUE_RED

Screenshot_1614955788.png

HUE_ORANGE

Screenshot_1614955926.png

HUE_YELLOW

Screenshot_1614954070.png

HUE_GREEN

Screenshot_1614954104.png

HUE_CYAN

Screenshot_1614954144.png

HUE_AZURE

Screenshot_1614954211.png

HUE_BLUE

Screenshot_1614954237.png

HUE_VIOLET

Screenshot_1614954268.png

HUE_MAGENTA

Screenshot_1614954290.png

HUE_ROSE

Screenshot_1614954315.png

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?