Skip to content

Commit

Permalink
Merge pull request #191 from terranodo/issue-170
Browse files Browse the repository at this point in the history
Issue 170
  • Loading branch information
ARolek authored Nov 22, 2017
2 parents 68032d9 + a830e67 commit 30dac10
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 14 deletions.
70 changes: 70 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
## 0.4.1 (2017-11-21)

- Fixed: regression in providers/postgis. EXECUTE_SQL environment debug was dropped.
- Fixed: Filecache: concurrent map read and map write on Set() (#188)
- Fixed: Filecache: invalid fileKey on cache init (Windows) (#178)
- Fixed: Clean up context canceled log (#170)

## 0.4.0 (2017-11-11)

- Fixed: configurable max_connections param for PostGIS provider
- Fixed: 504 returned when attempting to retrieve a tile at negative zoom (#163)
- Fixed: Using WGS84 yields squishes tiles along Y-axis (#156)
- Fixed: Capabilities endpoints not returning zoom range for all layers with the same name (#153)
- Fixed: Default config.toml not found in (#157)
- Fixed: Config validation fails when layers are overlapping but in different map configs (#158)
- Fixed: PostGIS: hstore tags should not override column tags (#154)
- Added: Filesystem cache (#96)
- Added: Clipping & Make Valid (whew!) (#56)

## v0.4.0-beta (2017-10-09)

- Fixed: Panic when PostGIS tries to query a layer that does not exist (#78)
- Fixed: Viewer not indicating colors correctly for polygons (#146)
- Fixed: stacked scrollbars showing in the embedded viewer (#148)
- Fixed: Invalid tilejson scheme (#149)
- Added: Support for X-Forwarded-Proto (#135, @mojodna)
- Added: Support for user defined layer names (#94)
- Updated: MVTProvider interface to return LayerInfo (#131)

## v0.4.0-alpha (2017-08-21)

- Added: hstore support for PostGIS driver. (#71)
- Added: experimental clipping support. (#56). To enable set the environment variable TEGOLA_CLIPPING=mvt
- Added: !ZOOM! token support for PostGIS SQL statements. (#88)
- Added: Support for debug=true query string param in /capabilities endpoints. (#99)
- Added: Config validation for layer name collision. (#81)
- Added: "center" property to map config (#84)
- Added: "bounds" property to map config
- Added: "attribution" property to map config
- Added: Support numeric (decimal) types (#113)
- Added: Configurable Webserver->HostName with fallbacks (#118)
- Added: AddFeatures performance improvements (#121)

## v0.3.2 (2017-03-13)

- Changed: MVT version from 2.1 to 1 per issue (#102)

## v0.3.1 (2017-01-22)

- Enhanced the /capabilities endpoint with bounds, center,tiles and capabilities values.
- Added: /capabilities/:map_name endpoint which returns TileJSON about a map.
- Added: configuration values for map -> center and map -> bounds. These values will be included in the /capabilities and /capabilities/:map_name responses.
- Fixed: bug where the HTTP port was not being read correctly from the config file.
- Added: http(s) prefix to tile URLs returned the /capabilities endpoints

## v0.3.0 (2016-09-11)

- Support for fetching individual layers from a map (i.e. /maps/:map_name/:layer_name/:z/:x/:y)
- Added a `/capabilities` endpoint with information about the tegola version, maps and map layers.
- Fixed an issue where the TOML config parser was not reporting config syntax errors.

## v0.2.0 (2016-08-16)

- Fixed: issue with PostGIS driver not handling nil tag values.
- Fixed: issue building PostGIS queries when tablename is used instead of sql in config file.
- Fixed: issue when table field names could be Postgres keywords.
- Added: concurrent layer fetching from data providers.
- Added: remote config loading over http(s).

## v0.1.0 (2016-07-29)
21 changes: 14 additions & 7 deletions server/handle_map_layer_zxy.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package server

import (
"context"
"fmt"
"log"
"net/http"
Expand Down Expand Up @@ -167,14 +168,20 @@ func (req HandleMapLayerZXY) ServeHTTP(w http.ResponseWriter, r *http.Request) {

// fetch layer from data provider
mvtLayer, err := l.Provider.MVTLayer(r.Context(), l.ProviderLayerName, tile, l.DefaultTags)
if err == mvt.ErrCanceled {
return
}
if err != nil {
// TODO: should we return an error to the response or just log the error?
// we can't just write to the response as the waitgroup is going to write to the respons as well
log.Printf("Error Getting MVTLayer for tile Z: %v, X: %v, Y: %v: %v", tile.Z, tile.X, tile.Y, err)
return
switch err {
case mvt.ErrCanceled:
// TODO: add debug logs
return
case context.Canceled:
// TODO: add debug logs
return
default:
// TODO: should we return an error to the response or just log the error?
// we can't just write to the response as the waitgroup is going to write to the response as well
log.Printf("Error Getting MVTLayer for tile Z: %v, X: %v, Y: %v: %v", tile.Z, tile.X, tile.Y, err)
return
}
}

// check if we have a layer name
Expand Down
21 changes: 14 additions & 7 deletions server/handle_map_zxy.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package server

import (
"context"
"fmt"
"log"
"net/http"
Expand Down Expand Up @@ -153,14 +154,20 @@ func (req HandleMapZXY) ServeHTTP(w http.ResponseWriter, r *http.Request) {

// fetch layer from data provider
mvtLayer, err := l.Provider.MVTLayer(r.Context(), l.ProviderLayerName, tile, l.DefaultTags)
if err == mvt.ErrCanceled {
return
}
if err != nil {
// TODO: should we return an error to the response or just log the error?
// we can't just write to the response as the waitgroup is going to write to the response as well
log.Printf("Error Getting MVTLayer for tile Z: %v, X: %v, Y: %v: %v", tile.Z, tile.X, tile.Y, err)
return
switch err {
case mvt.ErrCanceled:
// TODO: add debug logs
return
case context.Canceled:
// TODO: add debug logs
return
default:
// TODO: should we return an error to the response or just log the error?
// we can't just write to the response as the waitgroup is going to write to the response as well
log.Printf("Error Getting MVTLayer for tile Z: %v, X: %v, Y: %v: %v", tile.Z, tile.X, tile.Y, err)
return
}
}

// check if we have a layer name
Expand Down

0 comments on commit 30dac10

Please sign in to comment.