2
1

線を表示

googleMap.addPolyline(
        PolylineOptions()
            .color(R.color.red)
            .add(LatLng(35.689, 139.692), LatLng(35.666116, 139.758380))
            .width(20f)
    )
プロパティ 内容 その他
Points 線の頂点。線分は連続した点の間に描画される。 頂点数は最大16000まで。上限を超えた頂点は描画されない。
width 線の幅 カメラのズームとは無関係に、一定に保たれる。デフォルトは10。
color 線の色 デフォルトは黒(0xff000000)
visible 地図上に表示されているかどうか、trueなら表示 デフォルトはtrue
clickable オブジェクトをクリックしたときのイベントをハンドリングしたい場合は、このプロパティにtrue デフォルトはfalse
zIndex 描画する順番 デフォルトは0

円を表示

 googleMap.addCircle(
        CircleOptions()
            .center(LatLng(35.689, 139.692))
            .radius(1000.0)
            .strokeColor(R.color.black)
            .fillColor(R.color.red)
            .strokeWidth(5f)
            .visible(true)
            .clickable(true)
    )
プロパティ 内容 その他
center 緯度、経度で円の中心位置 nullの場合、IllegalArgumentExceptionのエラー
radius メートルで円の半径 0以下の場合、IllegalArgumentExceptionのエラー
StrokeWidth 円の輪郭線の幅 デフォルトは10
strokeColor 円の輪郭線 デフォルトは黒(0xff000000)
fillColor 円の塗りつぶし色 デフォルトは透明(0x00000000)
visible 地図上に表示されているかどうか、trueなら表示 デフォルトはtrue
clickable オブジェクトをクリックしたときのイベントをハンドリングしたい場合は、このプロパティにtrue デフォルトはfalse
zIndex 描画する順番 デフォルトは0

参考

2
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
2
1