Skip to main content

FeedLayerDefinition

A layer of features from a feed: points with a point style (no kind), or polygons or lines with a shapes style. Name the style type to narrow it, such as FeedLayerDefinition<PointStyle>.

This is an interface exported by @mapcairn/sdk/browser, checked against version 0.2.0.

Signature​

import type { FeedLayerDefinition } from "@mapcairn/sdk/browser";

interface FeedLayerDefinition<S extends PointStyle | FeedShapeStyle = PointStyle | FeedShapeStyle> extends LayerDefinitionBase

Type parameters​

  • S? (PointStyle | FeedShapeStyle)

Properties​

card​

readonly card: CardSpec;

What a feature's card shows.

detail​

readonly detail?: DetailSource;

A second source fetched on request for one feature, such as its affected area.

emptyText​

readonly emptyText: DefinitionText;

Shown when the feed has no features, such as No volcano alerts right now.

list​

readonly list: ListSpec;

How the loaded features are listed.

saveFeatures​

readonly saveFeatures?: boolean;

Whether the person may save the features that are loaded as a GeoJSON or CSV file. Defaults to false: the provider's terms decide whether its data may be saved and redistributed, so a definition says so only after they have been read. Only a feed or query layer of features can be saved, and true on any other kind of layer is a validation problem.

source​

readonly source: FeedSource | QuerySource;

Where the features come from: a whole feed or a query over the view.

style​

readonly style: S;

How the features are drawn, and so what the legend says.

See also​