ConstInitialise the module GeoJSON.
Options accepted by GeoJSONCore.init().
Optionalmap?: unknownMap instance or adapter. Falls back to GeoLeaf.Core.getMap() when absent.
OptionaldefaultStyle?: Record<string, unknown> | GeoJSONStyleOptionaldefaultPointStyle?: Record<string, unknown>OptionalonEachFeature?: (feature: GeoJSONFeature, layer: unknown) => voidOptionalpointToLayer?: (feature: GeoJSONFeature, latlng: unknown) => unknownOptionalfitBoundsOnLoad?: booleanOptionalmaxZoomOnFit?: numberReturns a loaded layer's authored config object (the layer definition
stored on its runtime entry), or null when the layer is unknown.
Runtime read seam for capability plugins (e.g. @geoleaf-plugins/feature-info)
that need per-layer config at click/hover time. This is config passthrough
(plumbing), not rendering: the kernel exposes the already-loaded config,
the plugin interprets it. Reads the shared state directly (same source as
the POI config resolution) so it works regardless of layer-manager wiring.
GeoLeaf layer id.
Replaces the GeoJSON data of an existing layer in real time.
Updates both the MapLibre source (source.setData()) and the in-memory
state so that subsequent getLayerData() calls return the fresh data.
ID of the layer to update.
GeoJSON FeatureCollection (or any valid GeoJSON) to set.
Filters the features of every GeoJSON layer. Shows only features that pass the predicate.
The predicate runs in JS (so arbitrary logic — substring search, distance,
nested fields — is supported), but the resulting visible set is applied on
the GPU via map.setFilter on feature ids (no source re-tiling) for
non-clustered layers with unique properties.id; clustered / id-less
layers fall back to re-feeding the filtered data (RM-P1).
Fonction (feature, layerId) => boolean
Optionaloptions: { layerIds?: string | string[]; geometryType?: string } = {}Additional options
Resets the feature filter (shows all).
Optionaloptions: { layerIds?: string | string[]; geometryType?: string } = {}Same options as filterFeatures
Returns all loaded features. Reads directly from state.layers (featureCache removed in Sprint 1).
Optionaloptions: { geometryTypes?: string[]; layerIds?: string[] } = {}features GeoJSON enrichies de { _layerId }
Getters for direct state access (compatibility)