Skip to content

Commit 9e778d4

Browse files
committed
made min_zoom and max_zoom optional. if not provided the layer is always rendered
1 parent 0848a3c commit 9e778d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ type layers []Layer
1616
// FilterByZoom returns layers that that are to be rendered between a min and max zoom
1717
func (ls layers) FilterByZoom(zoom int) (filteredLayers []Layer) {
1818
for _, l := range ls {
19-
if l.MinZoom <= zoom && l.MaxZoom >= zoom {
19+
if (l.MinZoom <= zoom || l.MinZoom == 0) && (l.MaxZoom >= zoom || l.MaxZoom == 0) {
2020
filteredLayers = append(filteredLayers, l)
2121
}
2222
}

0 commit comments

Comments
 (0)