Add caching to geojson source

This commit is contained in:
pietervdvn 2022-06-13 03:17:10 +02:00
parent 7c6e292013
commit 859a694723

View file

@ -79,7 +79,7 @@ export default class GeoJsonSource implements FeatureSourceForLayer, Tiled {
private LoadJSONFrom(url: string) {
const eventSource = this.features;
const self = this;
Utils.downloadJson(url)
Utils.downloadJsonCached(url, 60 * 60)
.then(json => {
self.state.setData("loaded")
if (json.features === undefined || json.features === null) {