Skip to content

measureElevationProfileConfigSchema

Déclaration
measureElevationProfileConfigSchema = defineWidgetConfig({
icon: {
lucide: 'ChartLine',
},
title: measureElevationProfileI18n['tab-title'],
onActivate: {
deactivate: {
classes: ['MeasureSurface', 'AdvancedSearch', 'Report', 'Export', 'Identify', 'AddData', 'Draw'],
},
},
inToolbar: inToolbarSchemaFrom({
type: 'button',
}),
i18n: i18nSchemaFrom({ ...measureI18n, ...measureElevationProfileI18n }),
config: z
.object({
polylineDrawSymbol: polylineSymbolSchema,
pointHoverSymbol: pointSymbolSchema,
highlightSymbol: polylineSymbolSchema.prefault({
width: 5,
color: defaultHighlightSymbolColor,
}),
dialogConfig: dialogWidgetConfigSchema.default({
id: 'MeasureElevationProfileDialog',
width: '80vw',
height: '40vh',
y: '60vh',
resizable: true,
center: true,
}),
metadataUrl: z
.url()
.default('https://geoportail.wallonie.be/catalogue/a004e570-99d6-4fe5-b83d-49b774409278.html'),
geoprocessor: z
.object({
sampleCount: z.number().positive().optional(),
sampleDistance: z.number().positive().optional(),
})
.prefault({}),
chart: z
.object({
borderColor: colorSchema.optional(),
backgroundColor: colorSchema.optional(),
hoverBackgroundColor: colorSchema.optional(),
hoverRadius: z.number().default(5),
maximumDataNumber: z.number().default(500),
animation: z.boolean().default(true),
})
.prefault({}),
})
.prefault({}),
})