Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/components/panels/MapView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import { useEnvContext } from 'next-runtime-env';
import { useROS } from '@/ros/ROSContext';
import ROSLIB from 'roslib';

const DEFAULT_MAP_CENTER: LatLngTuple = [38.405884, -110.791719];

const getCustomIcon = (color: string) =>
L.divIcon({
html: `<div style="background-color: ${color}; width: 16px; height: 16px; border-radius: 50%; border: 2px solid #fff;"></div>`,
Expand Down Expand Up @@ -45,7 +47,7 @@ type MapViewProps = {
const MapView: React.FC<MapViewProps> = ({offline}) => {
const { ros } = useROS();
const [droneLoc, setDroneLoc] = useState<LatLngTuple>([0, 0]);
const [antennaLoc, setAntennaLoc] = useState<LatLngTuple>([45.385172, -75.698283]);
const [antennaLoc, setAntennaLoc] = useState<LatLngTuple>(DEFAULT_MAP_CENTER);
const [antennaHead, setAntennaHead] = useState<number>(0);
const { waypoints } = useWaypoints();
const { NEXT_PUBLIC_TILE_SERVER } = useEnvContext();
Expand Down Expand Up @@ -103,7 +105,7 @@ const MapView: React.FC<MapViewProps> = ({offline}) => {

return (
<MapContainer
center={[45.385172, -75.698283]}
center={DEFAULT_MAP_CENTER}
zoom={15}
maxZoom={22}
style={{ height: '100%', width: '100%' }}
Expand Down
1 change: 1 addition & 0 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ while [ -z "$LOCAL_IP" ]; do
LOCAL_IP=$(ip addr show enP8p1s0 | grep -oP '(?<=inet )([0-9\.]+)' || hostname -I | awk '{print $1}')
sleep 1
done
LOCAL_IP="192.168.0.20"
TILING_SERVER_PORT=80
echo "Local IP address: $LOCAL_IP"

Expand Down
Loading