Layer
A layer represents a distinct mapping layer as would be displayed in a typical web map application. Each layer can be accessed independently from other map layers. The main thing that needs to be configured for a layer is the provider described below.
The URLs of incoming requests follow a format like: /tiles/{layerName}/{z}/{x}/{y} the layer name can be one of two things: 1) the ID of the layer or 2) A string that matches a pattern. A pattern should include non-subsequent placeholder values wrapped in curly braces. Those placeholder values can be used in certain providers, such as the Proxy provider where they can be forwarded along to the upstream map layer. To understand how you can utilize patterns, see the NOAA Post-Storm example
When using a pattern you can include Regular Expressions to validate the values that match against the placeholder.
It is highly recommended that layer names be alphanumeric plus underscores. While other characters aren’t forbidden, several mechanisms (some caches and telemetry) replace potentially dangerous characters with underscores. This can lead to collisions if you have layer names that differ only by special characters.
Configuration options:
| Parameter | Description | Type | Required | Default |
|---|---|---|---|---|
id |
A url-safe identifier of the layer. Primarily used as the default path for incoming tile web requests |
string |
Yes |
None |
pattern |
A url-safe pattern with non-subsequent placeholders |
string |
No |
id |
paramValidator |
A mapping of regular expressions to use to validate the values that match against the placeholders. Each expression must match the full value (it’s automatically anchored to start and end). Specify a key of "*" to apply it to all values |
map[string]string |
No |
None |
provider |
The configuration that drives how tiles are generated |
Yes |
None |
|
client |
A Client configuration to use for this layer specifically that overrides the Client from the top-level of the configuration. See below for Client schema |
No |
None |
|
skipcache |
If true, skip reading and writing to cache |
bool |
No |
false |
skipanalytics |
If true, skip recording analytics events for this layer. Useful for internal or debugging layers you don’t want cluttering usage data |
bool |
No |
false |
Example:
layer:
id: my_layer
pattern: my_{name}_{version}
paramValidator:
"*": "^[a-zA-Z0-9]+$"
"version": "v[0-9]{1,3}"
skipCache: true
client:
userAgent: my_app/1.0
provider:
...