dockerize

This commit is contained in:
Will Freeman
2024-10-02 18:27:02 -05:00
parent ff0aff59f4
commit fd94bd3cee
18 changed files with 359 additions and 133 deletions
+32 -2
View File
@@ -1,14 +1,44 @@
import axios from "axios";
export interface BoundingBox {
export interface BoundingBoxLiteral {
minLat: number;
maxLat: number;
minLng: number;
maxLng: number;
}
export class BoundingBox implements BoundingBoxLiteral {
minLat: number;
maxLat: number;
minLng: number;
maxLng: number;
constructor({minLat, maxLat, minLng, maxLng}: BoundingBoxLiteral) {
this.minLat = minLat;
this.maxLat = maxLat;
this.minLng = minLng;
this.maxLng = maxLng;
}
updateFromOther(boundingBoxLiteral: BoundingBoxLiteral) {
this.minLat = boundingBoxLiteral.minLat;
this.maxLat = boundingBoxLiteral.maxLat;
this.minLng = boundingBoxLiteral.minLng;
this.maxLng = boundingBoxLiteral.maxLng;
}
isSubsetOf(other: BoundingBoxLiteral) {
return (
this.minLat >= other.minLat &&
this.maxLat <= other.maxLat &&
this.minLng >= other.minLng &&
this.maxLng <= other.maxLng
);
}
}
const apiService = axios.create({
baseURL: "http://localhost:8080",
baseURL: window.location.hostname === "localhost" ? "http://localhost:8080/api" : "/api",
headers: {
"Content-Type": "application/json",
},