Smart Component 14
Hole centerline.
Hole centerline follows the measured multi-point tee-to-flag route as an SVG path beneath every other Smart Component. CADDIE.100 resolves the route against the exact rendered artifact and returns only the visible path in image-pixel space. Geographic coordinates, source course coordinates, projection transforms, and the internal sidecar remain protected.
Usage
Add the hole centerline to a graphic.
Include the component in the initial mount call, reconcile it through view.setSmartComponents, or append it with view.addSmartComponent. Types may repeat. Give repeated instances stable id values to style, show, hide, move, reset, or remove one instance independently. The selected Smart Component type, instance ID, render receipt, and protected selection options such as yardages, grid spacing, coverage, measured origin, buffer distance, detail, limits, or targets are sent to the overlay service. Marker-image origins, images, presentation styles, supported labels, and movement remain local.
const view = await caddie.mount(container, graphicRequest, [
{
type: "hole-centerline",
style: {
strokeColor: "#FFFFFF",
strokeWidth: 3,
strokeStyle: "solid",
},
},
]);
view.setSmartComponentStyle({
type: "hole-centerline",
style: { strokeColor: "#A3FF12", strokeStyle: "dashed" },
});Defaults
Built-in presentation.
Component options
Configure behavior and presentation.
| Option | Type | Default | Description |
|---|---|---|---|
| type | "hole-centerline" | Required | Requests the visible measured tee-to-flag path for the exact Hole graphic. |
| id | string | Automatic | Optional stable 1–64 character instance ID using letters, numbers, underscores, or hyphens. Use IDs to independently control repeated Smart Components of the same type. |
| style.strokeColor | #RRGGBB | "#FFFFFF" | Visible path color. |
| style.strokeWidth | number | 3 | Non-scaling line width from 1 through 16 image pixels. |
| style.strokeStyle | "solid" | "dashed" | "dotted" | "dash-dot" | "solid" | Visible SVG stroke pattern. |
Behavior
Important implementation details.
- The SDK assigns Hole centerline z-index 0. Other drawings use z-index 1, markers use 2, legends use 3, and Hole number uses 100.
- Stroke color, width, and style update immediately in the local SVG without rebuilding the graphic or requesting the sidecar again.
- Because the path itself is the visible feature, the response necessarily includes that final SVG path in rendered-image pixels. It does not include longitude, latitude, source course coordinates, transforms, or source sidecar fields.
- The path is locked and cannot be made movable or reset like a point marker.