Chuyển tới nội dung chính

WeatherOverlay

A map overlay component displaying current weather conditions.

📋 Overview

PropertyValue
Filesrc/components/WeatherOverlay.tsx
TypeReact Functional Component
AuthorUIP Team
Version1.0.0

🎯 Purpose

  • Display weather conditions on map
  • Show rain, cloud, temperature layers
  • Weather impact on traffic
  • Real-time weather updates

🚀 Usage

import { WeatherOverlay } from '@/components/WeatherOverlay';

function MapComponent() {
return (
<MapContainer>
<WeatherOverlay
data={weatherData}
layers={['rain', 'clouds']}
visible={showWeather}
/>
</MapContainer>
);
}

📦 Props

PropTypeRequiredDefaultDescription
dataWeatherDataYes-Weather data
layersWeatherLayer[]No['rain']Active layers
visiblebooleanNotrueShow/hide overlay
opacitynumberNo0.6Layer opacity

🌦️ Weather Layers

LayerDisplayData Source
rainPrecipitationOpenWeatherMap
cloudsCloud coverageOpenWeatherMap
tempTemperatureOpenWeatherMap
windWind vectorsOpenWeatherMap

See the complete components reference for all available components.