Interface: ContourLabelOptions
Defined in: Contour.ts:223
Options for ContourLabels
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
density? | number | Label density. 2 makes the labels twice as dense, 0.5 makes them half as dense. Default 1 | Contour.ts:276 |
font_face? | string | Font face to use for the contour labels Default 'Trebuchet MS' | Contour.ts:234 |
font_size? | number | Font size in points to use for the contour labels Default 12 | Contour.ts:240 |
font_url_template? | string | URL 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? | boolean | Whether to draw the halo (outline) on the contour labels Default false | Contour.ts:270 |
halo_color? | string | Halo (outline) color for the contour labels Default '#000000' | Contour.ts:264 |
label_formatter? | (val) => string | Function 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? | number | Number of decimal places to use in the contour labels Default 0 | Contour.ts:228 |
text_color? | string | Text color for the contour labels Default '#000000' | Contour.ts:258 |