Skip to content

Commit 30dac10

Browse files
authored
Merge pull request #191 from terranodo/issue-170
Issue 170
2 parents 68032d9 + a830e67 commit 30dac10

File tree

3 files changed

+98
-14
lines changed

3 files changed

+98
-14
lines changed

CHANGELOG.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
## 0.4.1 (2017-11-21)
2+
3+
- Fixed: regression in providers/postgis. EXECUTE_SQL environment debug was dropped.
4+
- Fixed: Filecache: concurrent map read and map write on Set() (#188)
5+
- Fixed: Filecache: invalid fileKey on cache init (Windows) (#178)
6+
- Fixed: Clean up context canceled log (#170)
7+
8+
## 0.4.0 (2017-11-11)
9+
10+
- Fixed: configurable max_connections param for PostGIS provider
11+
- Fixed: 504 returned when attempting to retrieve a tile at negative zoom (#163)
12+
- Fixed: Using WGS84 yields squishes tiles along Y-axis (#156)
13+
- Fixed: Capabilities endpoints not returning zoom range for all layers with the same name (#153)
14+
- Fixed: Default config.toml not found in (#157)
15+
- Fixed: Config validation fails when layers are overlapping but in different map configs (#158)
16+
- Fixed: PostGIS: hstore tags should not override column tags (#154)
17+
- Added: Filesystem cache (#96)
18+
- Added: Clipping & Make Valid (whew!) (#56)
19+
20+
## v0.4.0-beta (2017-10-09)
21+
22+
- Fixed: Panic when PostGIS tries to query a layer that does not exist (#78)
23+
- Fixed: Viewer not indicating colors correctly for polygons (#146)
24+
- Fixed: stacked scrollbars showing in the embedded viewer (#148)
25+
- Fixed: Invalid tilejson scheme (#149)
26+
- Added: Support for X-Forwarded-Proto (#135, @mojodna)
27+
- Added: Support for user defined layer names (#94)
28+
- Updated: MVTProvider interface to return LayerInfo (#131)
29+
30+
## v0.4.0-alpha (2017-08-21)
31+
32+
- Added: hstore support for PostGIS driver. (#71)
33+
- Added: experimental clipping support. (#56). To enable set the environment variable TEGOLA_CLIPPING=mvt
34+
- Added: !ZOOM! token support for PostGIS SQL statements. (#88)
35+
- Added: Support for debug=true query string param in /capabilities endpoints. (#99)
36+
- Added: Config validation for layer name collision. (#81)
37+
- Added: "center" property to map config (#84)
38+
- Added: "bounds" property to map config
39+
- Added: "attribution" property to map config
40+
- Added: Support numeric (decimal) types (#113)
41+
- Added: Configurable Webserver->HostName with fallbacks (#118)
42+
- Added: AddFeatures performance improvements (#121)
43+
44+
## v0.3.2 (2017-03-13)
45+
46+
- Changed: MVT version from 2.1 to 1 per issue (#102)
47+
48+
## v0.3.1 (2017-01-22)
49+
50+
- Enhanced the /capabilities endpoint with bounds, center,tiles and capabilities values.
51+
- Added: /capabilities/:map_name endpoint which returns TileJSON about a map.
52+
- Added: configuration values for map -> center and map -> bounds. These values will be included in the /capabilities and /capabilities/:map_name responses.
53+
- Fixed: bug where the HTTP port was not being read correctly from the config file.
54+
- Added: http(s) prefix to tile URLs returned the /capabilities endpoints
55+
56+
## v0.3.0 (2016-09-11)
57+
58+
- Support for fetching individual layers from a map (i.e. /maps/:map_name/:layer_name/:z/:x/:y)
59+
- Added a `/capabilities` endpoint with information about the tegola version, maps and map layers.
60+
- Fixed an issue where the TOML config parser was not reporting config syntax errors.
61+
62+
## v0.2.0 (2016-08-16)
63+
64+
- Fixed: issue with PostGIS driver not handling nil tag values.
65+
- Fixed: issue building PostGIS queries when tablename is used instead of sql in config file.
66+
- Fixed: issue when table field names could be Postgres keywords.
67+
- Added: concurrent layer fetching from data providers.
68+
- Added: remote config loading over http(s).
69+
70+
## v0.1.0 (2016-07-29)

server/handle_map_layer_zxy.go

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package server
22

33
import (
4+
"context"
45
"fmt"
56
"log"
67
"net/http"
@@ -167,14 +168,20 @@ func (req HandleMapLayerZXY) ServeHTTP(w http.ResponseWriter, r *http.Request) {
167168

168169
// fetch layer from data provider
169170
mvtLayer, err := l.Provider.MVTLayer(r.Context(), l.ProviderLayerName, tile, l.DefaultTags)
170-
if err == mvt.ErrCanceled {
171-
return
172-
}
173171
if err != nil {
174-
// TODO: should we return an error to the response or just log the error?
175-
// we can't just write to the response as the waitgroup is going to write to the respons as well
176-
log.Printf("Error Getting MVTLayer for tile Z: %v, X: %v, Y: %v: %v", tile.Z, tile.X, tile.Y, err)
177-
return
172+
switch err {
173+
case mvt.ErrCanceled:
174+
// TODO: add debug logs
175+
return
176+
case context.Canceled:
177+
// TODO: add debug logs
178+
return
179+
default:
180+
// TODO: should we return an error to the response or just log the error?
181+
// we can't just write to the response as the waitgroup is going to write to the response as well
182+
log.Printf("Error Getting MVTLayer for tile Z: %v, X: %v, Y: %v: %v", tile.Z, tile.X, tile.Y, err)
183+
return
184+
}
178185
}
179186

180187
// check if we have a layer name

server/handle_map_zxy.go

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package server
22

33
import (
4+
"context"
45
"fmt"
56
"log"
67
"net/http"
@@ -153,14 +154,20 @@ func (req HandleMapZXY) ServeHTTP(w http.ResponseWriter, r *http.Request) {
153154

154155
// fetch layer from data provider
155156
mvtLayer, err := l.Provider.MVTLayer(r.Context(), l.ProviderLayerName, tile, l.DefaultTags)
156-
if err == mvt.ErrCanceled {
157-
return
158-
}
159157
if err != nil {
160-
// TODO: should we return an error to the response or just log the error?
161-
// we can't just write to the response as the waitgroup is going to write to the response as well
162-
log.Printf("Error Getting MVTLayer for tile Z: %v, X: %v, Y: %v: %v", tile.Z, tile.X, tile.Y, err)
163-
return
158+
switch err {
159+
case mvt.ErrCanceled:
160+
// TODO: add debug logs
161+
return
162+
case context.Canceled:
163+
// TODO: add debug logs
164+
return
165+
default:
166+
// TODO: should we return an error to the response or just log the error?
167+
// we can't just write to the response as the waitgroup is going to write to the response as well
168+
log.Printf("Error Getting MVTLayer for tile Z: %v, X: %v, Y: %v: %v", tile.Z, tile.X, tile.Y, err)
169+
return
170+
}
164171
}
165172

166173
// check if we have a layer name

0 commit comments

Comments
 (0)