Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Remove tile url and attributions #147

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions api/src/database/mongoDb/dbSchemas/mapLayersSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ export const OneMapLayerData = new mongoose.Schema(
featureId: String,
style: StyleSchema,
legend: [LegendSchema],
tileDataUrl: String,
tileAttributions: String,
},
{ _id: false },
);
Expand All @@ -122,8 +120,6 @@ export const MapLayerSchema = new mongoose.Schema({
layers: [LayerSchema],
layerOptions: LayerOptionsSchema,
style: mongoose.Schema.Types.Mixed,
tileDataUrl: String,
tileAttributions: String,
});

export const MapLayer = mongoose.model('MapLayer', MapLayerSchema, 'mapLayers');
Expand Down
7 changes: 2 additions & 5 deletions doc/data-structures/config-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ _or with geodata file provided in folder './initial-data-load/data/{COUNTRY}/geo
apiUrl: "urlInApiThatReturnsStoredGeodata"
```

for returning data from API, but not storing them in the database just use apiUrl. (for example for tile data)

## mapLayers.yml

This config file is one long array with settings for layers in map. As there are multiple types of layers (regions, points on map, any geometrical objects or even combination of them and tile layers) and also multiple sources of data for one layer, the structure of items in array may vary greatly.
Expand All @@ -139,11 +141,6 @@ This config file is one long array with settings for layers in map. As there are
- **dateText**: description of date, if it should be displayed,

**featureId**: property in Feature in geojson file under which the value for 'featureId' in attributes is stored,

**tileDataUrl**: url of map tile layer data source,

**tileAttributions**: attributions of the tile layer data source,

**metadata**: informations about data in layer, they are shown when you click on info button aside from map layer in layers menu

- **description**:,
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/ol/staticLayers/layerTypes/tiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ const tileLayer = (layerData) => {
featureId: layerData.featureId,
type: layerData.layerType,
source: new XYZ({
url: layerData.tileDataUrl,
attributions: layerData.tileAttributions,
url: layerData.geoDataUrl,
attributions: layerData.metadata && layerData.metadata.geoMetadata && layerData.metadata.geoMetadata.attributions,
}),
zIndex: 0,
layerOptions: layerData.layerOptions,
Expand Down
2 changes: 0 additions & 2 deletions initial-data-load/src/database/mongoDb/layers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ const oneMapLayerItem = async (data: MapLayerConfigItem) => {
style: data.style,
legend: data.legend,
layerOptions: data.layerOptions,
tileDataUrl: data.tileDataUrl,
tileAttributions: data.tileAttributions,
};
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ const OneMapLayerData = new mongoose.Schema(
featureId: String,
style: StyleSchema,
legend: [LegendSchema],
tileDataUrl: String,
tileAttributions: String,
},
{ _id: false },
);
Expand All @@ -100,8 +98,6 @@ const MapLayerSchema = new mongoose.Schema({
metadata: MetadataSchema,
timeseries: Boolean,
layerOptions: LayerOptionsSchema,
tileDataUrl: String,
tileAttributions: String,
});

export const MapLayer = mongoose.model('MapLayer', MapLayerSchema, 'mapLayers');
Expand Down
4 changes: 0 additions & 4 deletions initial-data-load/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,6 @@ export interface MapLayerConfigItem {
};
}>;
metadata: object;
tileDataUrl: string;
tileAttributions: string;
}

// MONGODB //
Expand Down Expand Up @@ -166,8 +164,6 @@ export interface MongoDbMapLayer {
};
}>;
metadata: object;
tileDataUrl: string;
tileAttributions: string;
}

export interface MongoDbRegionAttribute {
Expand Down