Skip to content

Commit 12e905b

Browse files
author
Gaël UTARD
committed
Disable leaflet animations on vector tiles when zooming
1 parent c9e18ef commit 12e905b

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

geotrek/settings/base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,7 @@ def api_bbox(bbox, buffer):
433433

434434
# Let this be defined at instance-level
435435
LEAFLET_CONFIG = {
436+
# 'ANIMATE': False,
436437
'SRID': 3857,
437438
'TILES': [
438439
('OpenTopoMap', 'https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png', 'Données: © Contributeurs OpenStreetMap, SRTM | Affichage: © OpenTopoMap (CC-BY-SA)'),

mapentity/static/mapentity/leaflet-objectslayer.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ L.ObjectsLayer = L.GeoJSONTileLayer.extend({
5858
L.Util.setOptions(this, options);
5959
this.options.styles = L.Util.extend({}, this.options.styles);
6060
this.options.styles['default'] = L.Util.extend({}, this.options.style);
61+
this.options.updateWhenZooming = false; // Better perfs
6162

6263
L.GeoJSONTileLayer.prototype.initialize.call(this, url, this.options);
6364

0 commit comments

Comments
 (0)