anymap-ts 0.9.0 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/anymap_ts/static/deckgl.js +1 -1
- package/anymap_ts/static/leaflet.js +1 -1
- package/anymap_ts/static/mapbox.css +1 -1
- package/anymap_ts/static/mapbox.js +26608 -408
- package/anymap_ts/static/maplibre.js +1 -1
- package/anymap_ts/static/openlayers.js +7 -7
- package/package.json +1 -1
- package/src/core/BaseMapRenderer.ts +3 -24
- package/src/mapbox/MapboxRenderer.ts +2006 -80
- package/src/mapbox/index.ts +2 -0
package/package.json
CHANGED
|
@@ -214,30 +214,9 @@ export abstract class BaseMapRenderer<TMap> {
|
|
|
214
214
|
this.executeMethod('addLayer', [], layerConfig as unknown as Record<string, unknown>);
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
-
//
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
// Get layer IDs from restored layers for layer control
|
|
221
|
-
const layerIds = Object.keys(layers);
|
|
222
|
-
|
|
223
|
-
for (const [controlId, controlConfig] of Object.entries(controls)) {
|
|
224
|
-
const config = controlConfig as { type: string; position: string; options?: Record<string, unknown> };
|
|
225
|
-
// Dispatch to correct method based on control type
|
|
226
|
-
if (config.type === 'layer-control') {
|
|
227
|
-
// Pass restored layer IDs so they show separately (not grouped in Background)
|
|
228
|
-
this.executeMethod('addLayerControl', [], {
|
|
229
|
-
position: config.position,
|
|
230
|
-
layers: layerIds,
|
|
231
|
-
...config.options
|
|
232
|
-
});
|
|
233
|
-
} else if (config.type === 'draw-control') {
|
|
234
|
-
this.executeMethod('addDrawControl', [], { position: config.position, ...config.options });
|
|
235
|
-
} else if (config.type === 'control-grid') {
|
|
236
|
-
this.executeMethod('addControlGrid', [], { position: config.position, ...config.options });
|
|
237
|
-
} else {
|
|
238
|
-
this.executeMethod('addControl', [config.type], { position: config.position, ...config.options });
|
|
239
|
-
}
|
|
240
|
-
}
|
|
217
|
+
// Controls are NOT restored here because they are already present in
|
|
218
|
+
// _js_calls and will be replayed by processPendingCalls(). Restoring
|
|
219
|
+
// them from _controls AND replaying the calls caused duplicate controls.
|
|
241
220
|
}
|
|
242
221
|
|
|
243
222
|
/**
|