Gives a DISPLAYED layer what its offline store holds now.
🛑 A LAYER DECLARING offline.enabled READ ITS STORE ONCE, WHEN IT LOADED. A pull rewrote
the store afterwards and nothing told the layer: an entity the server had deleted left the
device and stayed drawn, an edited one kept its old drawing, until the next page load. The
pull calls this when it ends.
The collection goes the way a first load takes (_prepareLayerData), then through
applyOgcRefreshedData: the source AND the layer state, announced once
(geoleaf:layer:updated) — an open table and an active filter follow. The pending-sync
badge of an entity the layer still holds is kept (_carrySyncBadges).
Nothing is written, and false is returned, for a layer that is not loaded — it will read
the store when it loads —, for one that does not declare the local read, and when the store
answers nothing: no pull ever concluded, what is drawn came from the network, and it stays.
An EMPTY collection is an answer — a complete pull that returned nothing — and empties the
layer.
Parameters
layerId: string
The layer a pull has just written.
Returns Promise<boolean>
Whether the layer was given the store's collection.
Example
constgeojson = awaitimport("../index.js"); if (awaitgeojson.rereadOfflineLayer("sites")) console.info("la couche suit son magasin");
Gives a DISPLAYED layer what its offline store holds now.
🛑 A LAYER DECLARING
offline.enabledREAD ITS STORE ONCE, WHEN IT LOADED. A pull rewrote the store afterwards and nothing told the layer: an entity the server had deleted left the device and stayed drawn, an edited one kept its old drawing, until the next page load. The pull calls this when it ends.The collection goes the way a first load takes (_prepareLayerData), then through applyOgcRefreshedData: the source AND the layer state, announced once (
geoleaf:layer:updated) — an open table and an active filter follow. The pending-sync badge of an entity the layer still holds is kept (_carrySyncBadges).Nothing is written, and
falseis returned, for a layer that is not loaded — it will read the store when it loads —, for one that does not declare the local read, and when the store answers nothing: no pull ever concluded, what is drawn came from the network, and it stays. An EMPTY collection is an answer — a complete pull that returned nothing — and empties the layer.