gistda-sphere-react

Dot

A simple point geometry on the map

<Dot
  position={{ lon: 100.49, lat: 13.76 }}
  lineWidth={12}
  lineColor="red"
  draggable
  onDrop={(dot, location) => console.log('Dropped at:', location)}
/>

Props

PropTypeRequiredDefaultDescription
positionLocationYes-Dot coordinates
refRef<DotRef>No-Ref for imperative control
titlestringNo-Hover tooltip text
detailstringNo-Popup text when clicked
visibleRangeRangeNoAll zoom levelsZoom range visibility
lineWidthnumberNo3Dot size in pixels
lineColorstringNoPreset colorDot color
clickablebooleanNofalseShow pointer cursor
draggablebooleanNofalseAllow dragging
zIndexnumberNo0Stacking order
onClick(dot: SphereDot) => voidNo-Click handler
onDrag(dot: SphereDot) => voidNo-Drag handler
onDrop(dot: SphereDot, location: Location) => voidNo-Drop handler

On this page