Skip to main content

Interface: ContourLabelOptions

Defined in: Contour.ts:223

Options for ContourLabels

Properties

PropertyTypeDescriptionDefined in
density?numberLabel density. 2 makes the labels twice as dense, 0.5 makes them half as dense. Default 1Contour.ts:276
font_face?stringFont face to use for the contour labels Default 'Trebuchet MS'Contour.ts:234
font_size?numberFont size in points to use for the contour labels Default 12Contour.ts:240
font_url_template?stringURL template to use in retrieving the font data for the labels. The default is to use the template from the map style.Contour.ts:245
halo?booleanWhether to draw the halo (outline) on the contour labels Default falseContour.ts:270
halo_color?stringHalo (outline) color for the contour labels Default '#000000'Contour.ts:264
label_formatter?(val) => stringFunction to format the labels from numbers to a string Example val => Math.round(val).toString() // Round a number before to the nearest integer before converting to a string Default val => val.toString()Contour.ts:252
n_decimal_places?numberNumber of decimal places to use in the contour labels Default 0Contour.ts:228
text_color?stringText color for the contour labels Default '#000000'Contour.ts:258