Publication minimap implemented

This commit is contained in:
Porras-Bernardez 2024-05-24 13:47:28 +02:00
parent ccf4e238f3
commit 9968b1e466
6 changed files with 108 additions and 43 deletions

View file

@ -264,6 +264,19 @@ export class DbDataset {
return "";
}
}
/* Provides the bounds of the publication for the Leaflet minimap */
public get Bounds(): L.LatLngBoundsLiteral | string {
if (this.coverage != undefined) {
return [
[Number(this.coverage.y_min), Number(this.coverage.x_min)], // Southwest corner
[Number(this.coverage.y_max), Number(this.coverage.x_max)] // Northeast corner
];
} else {
return "";
}
}
}
type Nullable<T> = T | undefined;