Use revision id in data-layer tile request

This commit is contained in:
Tom Russell 2018-10-25 22:23:54 +01:00
parent 024d29ca2c
commit 1d7cf4c247

View File

@ -80,8 +80,10 @@ class ColouringMap extends Component {
like: 'likes', like: 'likes',
} }
const data_tileset = tileset_by_cat[cat]; const data_tileset = tileset_by_cat[cat];
// pick revision id to bust browser cache
const rev = this.props.building? this.props.building.revision_id : '';
const dataLayer = data_tileset? const dataLayer = data_tileset?
<TileLayer key={data_tileset} url={`/tiles/${data_tileset}/{z}/{x}/{y}.png`} /> <TileLayer key={data_tileset} url={`/tiles/${data_tileset}/{z}/{x}/{y}.png?rev=${rev}`} />
: null; : null;
// highlight // highlight