Draw local infrastructure on either globe from one retained dataset

This commit is contained in:
German Khokhlov committed 2026-11-03 03:28:26 +04:00
1 parent 868d061856
commit c1d829ef51
12 files changed
+900 -6

No files matched your search

+3 -3
View File
@@ -6,10 +6,10 @@ import { INFRASTRUCTURE_DATA_URLS } from '../sources/infrastructureData.js';
* @param {object} services Caller-owned context, overlay and render operations.
* @returns {object[]} Datacenters then dams, with stable standalone identities.
*/
export function createInfrastructureLayers(services) {
export function createInfrastructureLayers(services, createLayer = createLocalGeoJsonLayer) {
const datacentersUrl = INFRASTRUCTURE_DATA_URLS['local-datacenters'];
const damsUrl = INFRASTRUCTURE_DATA_URLS['local-dams'];
const datacenters = createLocalGeoJsonLayer(
const datacenters = createLayer(
{
id: 'local-datacenters',
url: datacentersUrl,
@@ -25,7 +25,7 @@ export function createInfrastructureLayers(services) {
services,
);
const dams = createLocalGeoJsonLayer(
const dams = createLayer(
{
id: 'local-dams',
url: damsUrl,