diff --git a/front-end/src/app/pages/my-offline-data/my-offline-data.component.ts b/front-end/src/app/pages/my-offline-data/my-offline-data.component.ts index de4cf06..6bbcbd9 100644 --- a/front-end/src/app/pages/my-offline-data/my-offline-data.component.ts +++ b/front-end/src/app/pages/my-offline-data/my-offline-data.component.ts @@ -120,8 +120,8 @@ export class MyOfflineDataComponent { const maxZoom = 9; const bounds = L.default.latLngBounds([ - { lat: 45.933960441921585, lng: 7.053222656250001 }, - { lat: 44.47299117260252, lng: 5.921630859375001 }, + { lat: area.bbox[0][0], lng: area.bbox[0][1] }, + { lat: area.bbox[1][0], lng: area.bbox[1][1] }, ]); const offlineLayer = tileLayerOffline(url, { attribution }); await this.offlineService.writeOrUpdateTilesInStore( @@ -162,8 +162,8 @@ export class MyOfflineDataComponent { const maxZoom = 9; const bounds = L.default.latLngBounds([ - { lat: 45.933960441921585, lng: 7.053222656250001 }, - { lat: 44.47299117260252, lng: 5.921630859375001 }, + { lat: area.bbox[0][0], lng: area.bbox[0][1] }, + { lat: area.bbox[1][0], lng: area.bbox[1][1] }, ]); const offlineLayer = tileLayerOffline(url, { attribution }); await this.offlineService.removeTilesInStore( diff --git a/front-end/src/data/areas.json b/front-end/src/data/areas.json index da4ae3d..7b5fe36 100644 --- a/front-end/src/data/areas.json +++ b/front-end/src/data/areas.json @@ -3,36 +3,54 @@ "id": 1, "name": "Zone A", "description": "tooltip", - "bbox": "" + "bbox": [ + [45.933960441921585, 7.053222656250001], + [44.47299117260252, 5.921630859375001] + ] }, { "id": 2, "name": "Zone B", "tooltip": "tooltip", - "bbox": "" + "bbox": [ + [45.933960441921585, 7.053222656250001], + [44.47299117260252, 5.921630859375001] + ] }, { "id": 3, "name": "Zone C", "tooltip": "tooltip", - "bbox": "" + "bbox": [ + [45.933960441921585, 7.053222656250001], + [44.47299117260252, 5.921630859375001] + ] }, { "id": 4, "name": "Zone D", "tooltip": "tooltip", - "bbox": "" + "bbox": [ + [45.933960441921585, 7.053222656250001], + [44.47299117260252, 5.921630859375001] + ] }, { "id": 5, "name": "Zone E", "tooltip": "tooltip", - "bbox": "" + "bbox": [ + [45.933960441921585, 7.053222656250001], + [44.47299117260252, 5.921630859375001] + ] }, { "id": 6, "name": "Zone F", "tooltip": "tooltip", - "bbox": "" + "bbox": [ + [45.933960441921585, 7.053222656250001], + [44.47299117260252, 5.921630859375001] + ] } ]