From f44f3bc6fdab92e15f9a714e960fe7734b584e66 Mon Sep 17 00:00:00 2001 From: Florian Sommariva Date: Tue, 21 Dec 2021 17:52:49 +0100 Subject: [PATCH] Charge styles options to measurecontrol to keep the old style --- mapentity/static/mapentity/mapentity.map.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/mapentity/static/mapentity/mapentity.map.js b/mapentity/static/mapentity/mapentity.map.js index 05c18bb9e..df54b6433 100644 --- a/mapentity/static/mapentity/mapentity.map.js +++ b/mapentity/static/mapentity/mapentity.map.js @@ -135,7 +135,17 @@ $(window).on('entity:map', function (e, data) { } map.addControl(new L.Control.FullScreen()); - map.addControl(new L.Control.MeasureControl()); + map.addControl(new L.Control.MeasureControl({ + position: 'topleft', + handler: { + shapeOptions: { + color: '#f06eaa' + }, + icon: new L.DivIcon({ + iconSize: new L.Point(8, 8), + }), + } + })); });