Discussion:
[MapProxy] tile source error handling and WMS requests
Travis Kirstine
2018-08-23 19:28:15 UTC
Permalink
I have my config as follow in which my source TMS have a 404 error defined
(transparent / no cache). The TMS sources each have a corresponding cache
defined with no caching. A composite cache containing both TMS sources is
also defined. If I make a WMS request to the composite layer and one of
the source TMS layers returns a 500 service unavailable MapProxy will still
generate a image. Is there a way to return a error 404 or other from
MapProxy instead of the image.


sources:
layer2_tms:
type: tile
url: 'http://localhost:88/mapcache/tms/1.0.0/***@gmaps/%(tms_path)s.xxx
'
grid: spherical_mercator
transparent: true
on_error:
404:
response: transparent
cache: false
layer1_tms:
type: tile
url: 'http://localhost:88/mapcache/tms/1.0.0/***@gmaps/%(tms_path)s.xxx
'
grid: spherical_mercator
transparent: true
on_error:
404:
response: transparent
cache: false

caches:
layer2_cache:
grids: [spherical_mercator]
sources: [layer2_tms]
meta_buffer: 0
meta_size: [1,1]
disable_storage: true
layer1_cache:
grids: [spherical_mercator]
sources: [layer1_tms]
meta_buffer: 0
meta_size: [1,1]
disable_storage: true
composite_cache:
grids: [spherical_mercator]
sources: [layer2_tms, layer2_tms]
meta_buffer: 0
meta_size: [1,1]
format: mixed
request_format: image/png
cache:
type: riak
nodes:
- host: riak.foobar.com
bucket: composite

layers:
- name: composite
title: 'composite'
sources: [composite_cache]





layers:

Loading...