|
| 1 | +import { Coordinate } from '../util/parameters'; |
| 2 | + |
| 3 | +export default interface CircleProps { |
| 4 | + /** |
| 5 | + * The coordinate of the circle overlay’s center. |
| 6 | + * @see {@link https://developer.apple.com/documentation/mapkitjs/circleoverlay/coordinate} |
| 7 | + */ |
| 8 | + coordinate: Coordinate; |
| 9 | + |
| 10 | + /** |
| 11 | + * The radius of the circle overlay, in meters. |
| 12 | + * @see {@link https://developer.apple.com/documentation/mapkitjs/circleoverlay/radius} |
| 13 | + */ |
| 14 | + radius: number; |
| 15 | + |
| 16 | + /** |
| 17 | + * A Boolean value that determines whether the circle is visible. |
| 18 | + * @see {@link https://developer.apple.com/documentation/mapkitjs/overlay/visible} |
| 19 | + */ |
| 20 | + visible?: boolean; |
| 21 | + |
| 22 | + /** |
| 23 | + * A Boolean value that determines whether the circle responds to user interaction. |
| 24 | + * @see {@link https://developer.apple.com/documentation/mapkitjs/overlay/enabled} |
| 25 | + */ |
| 26 | + enabled?: boolean; |
| 27 | + |
| 28 | + /** |
| 29 | + * A Boolean value that determines whether the map displays the circle in a selected state. |
| 30 | + * @see {@link https://developer.apple.com/documentation/mapkitjs/overlay/selected} |
| 31 | + */ |
| 32 | + selected?: boolean; |
| 33 | + |
| 34 | + /** |
| 35 | + * Event fired when the circle is selected. |
| 36 | + */ |
| 37 | + onSelect?: () => void; |
| 38 | + |
| 39 | + /** |
| 40 | + * Event fired when the circle is deselected. |
| 41 | + */ |
| 42 | + onDeselect?: () => void; |
| 43 | + |
| 44 | + /** |
| 45 | + * The stroke color of the line. Accepts any valid CSS color value. |
| 46 | + * The default is `rgb(0, 122, 255)`. |
| 47 | + * Set this to `null` to remove the line stroke. |
| 48 | + * @see {@link https://developer.apple.com/documentation/mapkitjs/style/strokeColor} |
| 49 | + */ |
| 50 | + strokeColor?: string | null; |
| 51 | + |
| 52 | + /** |
| 53 | + * The opacity of the stroke as a number between 0 and 1. |
| 54 | + * The default value is `1`. |
| 55 | + * @see {@link https://developer.apple.com/documentation/mapkitjs/style/strokeOpacity} |
| 56 | + */ |
| 57 | + strokeOpacity?: number; |
| 58 | + |
| 59 | + /** |
| 60 | + * The line width of the stroke for overlays, in CSS pixels. |
| 61 | + * The default value is `1`. |
| 62 | + * @see {@link https://developer.apple.com/documentation/mapkitjs/style/lineWidth} |
| 63 | + */ |
| 64 | + lineWidth?: number; |
| 65 | + |
| 66 | + /** |
| 67 | + * An array defining the line’s dash pattern, where numbers represent line and |
| 68 | + * gap lengths in CSS pixels. For example, `[10, 5]` means draw for 10 pixels |
| 69 | + * and leave a 5‑pixel gap repeatedly. Set to `[]` for solid lines (default). |
| 70 | + * MapKit JS duplicates the array if it has an odd number of elements. |
| 71 | + * @see {@link https://developer.apple.com/documentation/mapkitjs/style/lineDash} |
| 72 | + */ |
| 73 | + lineDash?: number[]; |
| 74 | + |
| 75 | + /** |
| 76 | + * The number of CSS pixels to offset the start of the dash pattern. |
| 77 | + * Has no effect when `lineDash` is set to draw solid lines. |
| 78 | + * The default value is `0`. |
| 79 | + * @see {@link https://developer.apple.com/documentation/mapkitjs/style/lineDashOffset} |
| 80 | + */ |
| 81 | + lineDashOffset?: number; |
| 82 | + |
| 83 | + /** |
| 84 | + * The fill color used for the shape. Accepts any valid CSS color value. |
| 85 | + * The default is `rgb(0, 122, 255)`. |
| 86 | + * Set this to `null` for no fill. |
| 87 | + * @see {@link https://developer.apple.com/documentation/mapkitjs/style/fillColor} |
| 88 | + */ |
| 89 | + fillColor?: string | null; |
| 90 | + |
| 91 | + /** |
| 92 | + * The opacity to apply to the fill, as a number between 0 and 1. |
| 93 | + * The default value is `0.1`. |
| 94 | + * @see {@link https://developer.apple.com/documentation/mapkitjs/style/fillOpacity} |
| 95 | + */ |
| 96 | + fillOpacity?: number; |
| 97 | +} |
0 commit comments