import { GeoJson } from "../types/geojson"; import axios from 'axios'; import { ReplayInitialInfo } from '../types/replay'; export const getGeoObjects = async (replayId: string) => { try { const response = await axios.get('http://localhost:8080/objects/replay?replayId=' + replayId); return response.data; } catch (error) { console.error('Error fetching geoobjects:', error); throw error; } } export const getInitialReplayInformation = async (replayId: string) => { try { const response = await axios.get('http://localhost:8080/objects/replayinit?replayId=' + replayId); console.log('Initial replay information:', response.data); return response.data; } catch (error) { console.error('Error fetching initial replay information:', error); throw error; } } export const getGeoObjectsInterval = async (replayId: string, min_timestamp: number, max_timestamp : number) => { try { const response = await axios.get('http://localhost:8080/objects/replay?replayId=' + replayId + '&start=' + min_timestamp + '&end=' + max_timestamp); return response.data; } catch (error) { console.error('Error fetching geoobjects:', error); throw error; } }