mirror of
https://github.com/umap-project/umap.git
synced 2025-04-30 12:12:36 +02:00
feat(sync): Avoid syncing remote datalayers' features
They will be synced on their own, and we dont want them to be present twice on the map.
This commit is contained in:
parent
b99c242648
commit
9cb87392c0
2 changed files with 3 additions and 1 deletions
|
@ -14,6 +14,9 @@ U.FeatureMixin = {
|
||||||
},
|
},
|
||||||
|
|
||||||
onCommit: function () {
|
onCommit: function () {
|
||||||
|
// When the layer is a remote layer, we don't want to sync the creation of the
|
||||||
|
// points via the websocket, as the other peers will get them themselves.
|
||||||
|
if (this.datalayer.isRemoteLayer()) return
|
||||||
const { subject, metadata, engine } = this.getSyncMetadata()
|
const { subject, metadata, engine } = this.getSyncMetadata()
|
||||||
engine.upsert(subject, metadata, this.toGeoJSON())
|
engine.upsert(subject, metadata, this.toGeoJSON())
|
||||||
},
|
},
|
||||||
|
|
|
@ -619,7 +619,6 @@ U.DataLayer = L.Evented.extend({
|
||||||
|
|
||||||
render: function (fields, builder) {
|
render: function (fields, builder) {
|
||||||
let impacts = U.Utils.getImpactsFromSchema(fields)
|
let impacts = U.Utils.getImpactsFromSchema(fields)
|
||||||
console.log('impacts', impacts)
|
|
||||||
|
|
||||||
for (let impact of impacts) {
|
for (let impact of impacts) {
|
||||||
switch (impact) {
|
switch (impact) {
|
||||||
|
|
Loading…
Reference in a new issue