Skip to main content

MapLookRule

How a vector tile layer picks the look of each of its features from one property. The engine evaluates it, because the features are in the tiles and the ui never sees them.

This is a type alias exported by @mapcairn/core, checked against version 0.2.0.

Signature​

import type { MapLookRule } from "@mapcairn/core";

type MapLookRule = {
readonly kind: "fixed";
readonly look: MapShapeLook;
} | {
readonly kind: "category";
readonly field: string;
readonly cases: readonly {
readonly value: string | number;
readonly look: MapShapeLook;
}[];
readonly fallback: MapShapeLook;
} | {
readonly kind: "steps";
readonly field: string;
readonly steps: readonly {
readonly min: number;
readonly look: MapShapeLook;
}[];
};

See also​

Source: packages/core/src/ports/map.ts:211