LegendItemSchema
constLegendItemSchema:ZodObject<{color:ZodString;icon:ZodOptional<ZodString>;label:ZodString;shape:ZodDefault<ZodEnum<["circle","square","line","icon"]>>; },"strip",ZodTypeAny, {color:string;icon?:string;label:string;shape:"circle"|"line"|"square"|"icon"; }, {color:string;icon?:string;label:string;shape?:"circle"|"line"|"square"|"icon"; }>
Defined in: packages/core/src/schemas/layer.schema.ts:433
Legend item for a layer.
Remarks
Section titled “Remarks”Defines how the layer appears in the map legend.
Shape Options:
circle- Circular symbolsquare- Square symbolline- Line symbolicon- Custom icon
Example
Section titled “Example”legend: color: "#ff0000" label: "Earthquakes" shape: circle