Fixed docker issue temporarily
This commit is contained in:
@@ -50,7 +50,9 @@ body,
|
||||
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
transition: background-color 0.2s, color 0.2s;
|
||||
transition:
|
||||
background-color 0.2s,
|
||||
color 0.2s;
|
||||
}
|
||||
|
||||
.map-button.active {
|
||||
|
||||
@@ -42,14 +42,14 @@ function App() {
|
||||
|
||||
useEffect(() => {
|
||||
if (showRadar) {
|
||||
getWeatherMapUrl().then(url => {
|
||||
getWeatherMapUrl().then((url) => {
|
||||
setRainViewerUrl(url);
|
||||
});
|
||||
}
|
||||
}, [showRadar]);
|
||||
|
||||
function toggleRadar() {
|
||||
setShowRadar(prev => {
|
||||
setShowRadar((prev) => {
|
||||
const newValue = !prev;
|
||||
Cookies.set('showRadar', newValue.toString(), { expires: 7 });
|
||||
return newValue;
|
||||
@@ -96,7 +96,7 @@ function App() {
|
||||
<TileLayer url={darkLayerUrl} />
|
||||
</LayersControl.BaseLayer>
|
||||
</LayersControl>
|
||||
{rainViewerUrl && showRadar && <TileLayer url={rainViewerUrl} opacity={0.5} zIndex={5} />}
|
||||
{rainViewerUrl && showRadar && <TileLayer url={rainViewerUrl} opacity={0.5} zIndex={10} />}
|
||||
<ZoomControl position={'bottomright'} />
|
||||
<AirportLayer setAirport={setAirport} />
|
||||
<BaseLayerChangeHandler />
|
||||
|
||||
@@ -27,7 +27,7 @@ export default function AirportMarker({
|
||||
mouseout: () => markerRef.current?.closePopup()
|
||||
}}
|
||||
>
|
||||
<Popup closeButton={false}>
|
||||
<Popup closeButton={false} autoPan={false}>
|
||||
{airport.icao} - {airport.name}
|
||||
</Popup>
|
||||
</Marker>
|
||||
|
||||
@@ -4,7 +4,7 @@ const weatherMapsUrl = 'https://api.rainviewer.com/public/weather-maps.json';
|
||||
|
||||
async function getWeatherMaps(): Promise<WeatherMaps | undefined> {
|
||||
const response = await fetch(`${weatherMapsUrl}`, {
|
||||
method: 'GET',
|
||||
method: 'GET'
|
||||
});
|
||||
if (response?.status === 200) {
|
||||
return response.json();
|
||||
@@ -18,16 +18,16 @@ export async function getWeatherMapUrl(): Promise<string | null> {
|
||||
if (weatherMaps != undefined) {
|
||||
let url = weatherMaps.host;
|
||||
// url = 'https://cdn.rainviewer.com';
|
||||
let latest = "";
|
||||
let latest = '';
|
||||
if (weatherMaps.radar.past.length > 0) {
|
||||
latest = weatherMaps.radar.past[weatherMaps.radar.past.length - 1].path;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
url += latest + "/256/{z}/{x}/{y}/2/1_1.png";
|
||||
url += latest + '/256/{z}/{x}/{y}/2/1_1.png';
|
||||
// url += latest + "/256/{z}/{x}/{y}/255/1_1_1_0.webp";
|
||||
return url;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,4 +18,4 @@ export interface SatelliteObject {
|
||||
export interface FrameObject {
|
||||
time: number;
|
||||
path: string;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user