diff --git a/src/loaders/externalLoader.js b/src/loaders/externalLoader.js index d529da207..1f826c15b 100644 --- a/src/loaders/externalLoader.js +++ b/src/loaders/externalLoader.js @@ -25,7 +25,7 @@ const externalLoader = async (layer) => { return { ...layer, layer: EXTERNAL_LAYER, - name: config.name, + name: config.name, // TODO - will be fixed by DHIS2-16088 legend, config, isLoaded: true, diff --git a/src/loaders/geoJsonUrlLoader.js b/src/loaders/geoJsonUrlLoader.js index ab563dd1a..a5e5540d7 100644 --- a/src/loaders/geoJsonUrlLoader.js +++ b/src/loaders/geoJsonUrlLoader.js @@ -31,7 +31,7 @@ const geoJsonUrlLoader = async (layer) => { return { ...layer, - name, + name: newConfig.name, // TODO - will be fixed by DHIS2-16088 legend, data: geoJson?.features, config: newConfig, diff --git a/src/util/external.js b/src/util/external.js index 6a6ab302d..636508133 100644 --- a/src/util/external.js +++ b/src/util/external.js @@ -14,13 +14,6 @@ const MAP_SERVICE_XYZ = 'XYZ' const MAP_SERVICE_VECTOR_STYLE = 'VECTOR_STYLE' const MAP_SERVICE_GEOJSON_URL = 'GEOJSON_URL' -export const supportedMapServices = [ - MAP_SERVICE_WMS, - MAP_SERVICE_TMS, - MAP_SERVICE_XYZ, - MAP_SERVICE_VECTOR_STYLE, -] - const mapServiceToTypeMap = { [MAP_SERVICE_WMS]: WMS_LAYER, [MAP_SERVICE_XYZ]: TILE_LAYER, @@ -29,6 +22,8 @@ const mapServiceToTypeMap = { [MAP_SERVICE_GEOJSON_URL]: GEOJSON_LAYER, } +export const supportedMapServices = Object.keys(mapServiceToTypeMap) + // Create external layer from a model export const createExternalLayer = (model, forBasemap) => ({ layer: