gistda-sphere-react

Circle

Draw a circle on the map

<Circle
  center={{ lon: 100.5, lat: 13.75 }}
  radius={0.05}
  fillColor="rgba(0, 100, 255, 0.3)"
  lineColor="blue"
  lineWidth={2}
/>

Props

PropTypeRequiredDefaultDescription
centerLocationYes-Circle center coordinates
radiusnumberYes-Circle radius in degrees
refRef<CircleRef>No-Ref for imperative control
titlestringNo-Hover tooltip text
detailstringNo-Popup text when clicked
popupPopupOptionsNo-Popup configuration
visibleRangeRangeNoAll zoom levelsZoom range visibility
lineWidthnumberNo3Border width in pixels
lineColorstringNoPreset colorBorder color
fillColorstringNoPreset colorFill color
lineStyle"Solid" | "Dashed" | "Dot"No"Solid"Border style
clickablebooleanNofalseShow pointer cursor
draggablebooleanNofalseAllow dragging
zIndexnumberNo0Stacking order
onClick(circle: SphereCircle) => voidNo-Click handler
onDrag(circle: SphereCircle) => voidNo-Drag handler
onDrop(circle: SphereCircle) => voidNo-Drop handler

On this page