Skip to content
BillyGalbreath edited this page Aug 5, 2022 · 11 revisions

The circle marker is used to draw circles on the map.

API Components

  • center - the location on the map (Point)
  • radius - radius of the circle (double)
  • options* - options for drawing the circle (MarkerOptions)
    *if options are not provided (or set to null) then the following default options will be used:
    • stroke
      • weight: 3
      • color: -65536 (0xFFFF0000)
    • fill
      • type: EVENODD
      • color: 872349696 (0x33FF0000)
    • tooltip:
      • no tooltip is set by default

API Examples

Circle circle = new Circle(new Point(10, 10), 10.0D)
    .setOptions(new Options.Builder()
        .setStrokeWeight(3)
        .setStrokeColor(0xFF0000FF)
        .setFillType(Fill.Type.EVENODD)
        .setFillColor(0x330000FF)
        .setTooltipType(Tooltip.Type.CLICK)
        .setTooltipString("You clicked me!")
        .setTooltipOffset(Point.ZERO)
        .build()
    );

JSON Structure

Extended JSON:

[
  "circ",
  [
    [0, 0],
    10
  ],
  [
    [3, 4278190335],
    [1, 855638271],
    [0, "You clicked a circle!", [0, 0]]
  ]
]

Condensed JSON:

["circ",[[0,0],10],[[3,4278190335],[1,855638271],[0,"You clicked a circle!",[0,0]]]]
Clone this wiki locally