From 27cbd979eaade03f095a65a4cfd47683d9d6f2b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexis=20M=C3=A9taireau?= Date: Tue, 30 Jan 2024 16:21:01 +0100 Subject: [PATCH] WIP --- umap/static/umap/js/umap.features.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/umap/static/umap/js/umap.features.js b/umap/static/umap/js/umap.features.js index 8e826131..833e2b8e 100644 --- a/umap/static/umap/js/umap.features.js +++ b/umap/static/umap/js/umap.features.js @@ -1,6 +1,15 @@ L.U.FeatureMixin = { staticOptions: { mainColor: 'color' }, + sync: function(properties){ + if ('latlng' in properties) + this._latlng + }, + + renderProperties: function(properties){ + + }, + initialize: function (map, latlng, options) { this.map = map if (typeof options === 'undefined') { @@ -562,6 +571,7 @@ L.U.Marker = L.Marker.extend({ function (e) { this.isDirty = true this.edit(e) + this.sync(["latlng"]) }, this )