Mercurial > gemma
diff client/src/components/layers/layers.js @ 5159:e688e79a51e8
Use ImageLayer instead of TileLayer for FairwayMarks
Improves performance when using time slider.
author | Raimund Renkert <raimund@renkert.org> |
---|---|
date | Thu, 02 Apr 2020 16:12:24 +0200 |
parents | 2584fedb2e99 |
children | a17c2a0b8e44 |
line wrap: on
line diff
--- a/client/src/components/layers/layers.js Thu Apr 02 16:11:09 2020 +0200 +++ b/client/src/components/layers/layers.js Thu Apr 02 16:12:24 2020 +0200 @@ -742,11 +742,11 @@ source }); })(), - new TileLayer({ + new ImageLayer({ id: "FAIRWAYMARKS", label: "Fairway marks", visible: true, - source: new TileWMS({ + source: new ImageSource({ preload: 0, projection: "EPSG:3857", url: window.location.origin + "/api/internal/wms", @@ -756,7 +756,7 @@ TILED: true, TIME: store.state.application.refreshLayersTime.toISOString() }, - tileLoadFunction: function(tile, src) { + imageLoadFunction: function(tile, src) { HTTP.get(src, { headers: { "X-Gemma-Auth": localStorage.getItem("token")