diff --git a/server/json_databases/geojson/nav_path.json b/server/json_databases/geojson/nav_path.json index afeeddc..1f5a139 100644 --- a/server/json_databases/geojson/nav_path.json +++ b/server/json_databases/geojson/nav_path.json @@ -1 +1 @@ -{"type": "FeatureCollection", "features": [{"type": "Feature", "geometry": {"type": "LineString", "coordinates": [[-95.08160677610833, 29.564802807347508], [-95.08150458035765, 29.564804390394595], [-95.08140354413766, 29.564807110489348], [-95.08133966110125, 29.564846265573188], [-95.08131348977675, 29.564888469011976]]}, "properties": {"name": "Rover Path"}}]} \ No newline at end of file +{"type": "FeatureCollection", "features": [{"type": "Feature", "geometry": {"type": "LineString", "coordinates": [[-95.0815737733052, 29.564990707422616], [-95.08157175938487, 29.564884505749244], [-95.08154769442301, 29.564801568620513], [-95.08144097914406, 29.564805181063072], [-95.08134861439733, 29.564818385035885], [-95.08131356209536, 29.564887911378513]]}, "properties": {"name": "Rover Path"}}]} \ No newline at end of file diff --git a/server/server.py b/server/server.py index 2f24538..c706562 100644 --- a/server/server.py +++ b/server/server.py @@ -428,7 +428,7 @@ def find_point_by_id(file_path, point_id): @app.post("/get_shortest_path") async def get_shortest_path(point_request: PointIDRequest): - geojson_files = [BOUNDARY_LINES_FILE, DEFAULT_PINS_FILE, GEOLOGICAL_SITES_FILE, USER_PINS_FILE, ROVER_LOCATION_FILE] + geojson_files = [BOUNDARY_LINES_FILE, DEFAULT_PINS_FILE, GEOLOGICAL_SITES_FILE, USER_PINS_FILE, CURRENT_LOCATIONS_FILE] start_feature = None end_feature = None diff --git a/src/components/Map.js b/src/components/Map.js index fa051f4..aeffaad 100644 --- a/src/components/Map.js +++ b/src/components/Map.js @@ -1,4 +1,3 @@ -// MapboxComponent.js import React, { useEffect, useState } from "react"; import mapboxgl from "mapbox-gl/dist/mapbox-gl.js"; import "mapbox-gl/dist/mapbox-gl.css"; @@ -46,7 +45,15 @@ const MapboxComponent = () => { source: "geojson-source", filter: ["==", "$type", "Point"], paint: { - "circle-color": "#FF0000", + "circle-color": [ + "case", + ["==", ["get", "Name"], "Rover"], "#00FF00", // Green for rover + ["==", ["get", "Name"], "Eva1"], "#0000FF", // Blue for ev1 + ["==", ["get", "Name"], "Eva2"], "#0000FF", // Blue for ev2 + ["==", ["get", "Name"], "UIA"], "#FFC0CB", // Blue for ev2 + ["==", ["get", "Name"], "Comm Tower"], "#FFC0CB", // Blue for ev2 + "#FF0000" // Red for all other points + ], "circle-radius": 5, }, }); @@ -57,7 +64,7 @@ const MapboxComponent = () => { source: "geojson-source", filter: ["==", "$type", "LineString"], paint: { - "line-color": "#0000FF", + "line-color": "#FFFF00", // Yellow for lines "line-width": 2, }, });