-
-
Notifications
You must be signed in to change notification settings - Fork 196
/
layer.go
34 lines (30 loc) · 992 Bytes
/
layer.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package atlas
import (
"github.com/go-spatial/geom"
"github.com/go-spatial/tegola/provider"
)
type Layer struct {
// optional. if not set, the ProviderLayerName will be used
Name string
ProviderLayerName string
MinZoom uint
MaxZoom uint
// instantiated provider
Provider provider.Tiler
// default tags to include when encoding the layer. provider tags take precedence
DefaultTags map[string]interface{}
GeomType geom.Geometry
// DontSimplify indicates wheather feature simplification should be applied.
// We use a negative in the name so the default is to simplify
DontSimplify bool
// DontClip indicates wheather feature clipping should be applied.
// We use a negative in the name so the default is to clip
DontClip bool
}
// MVTName will return the value that will be encoded in the Name field when the layer is encoded as MVT
func (l *Layer) MVTName() string {
if l.Name != "" {
return l.Name
}
return l.ProviderLayerName
}