Commit Graph

38 Commits

Author SHA1 Message Date
vergiLgood1 4590e21c39 Refactor map layers: consolidate imports, enhance type definitions, and improve layer management. Remove UnclusteredPointLayer and introduce AllIncidentsLayer for better incident handling and visualization. 2025-05-15 12:21:24 +07:00
vergiLgood1 849b3c1ae3 fix: fix kesalahan oengambilan properti distance pada units layer 2025-05-14 17:17:10 +07:00
vergiLgood1 5808758855 Refactor map layer animations to use BASE_DURATION and introduce new constants for 3D view settings
- Updated DistrictFillLineLayer to use BASE_DURATION for animation duration instead of a hardcoded value.
- Commented out the flyTo animation in DistrictFillLineLayer for potential future use.
- Modified Layers component to utilize ZOOM_3D and PITCH_3D constants for flyTo animations, enhancing readability and maintainability.
2025-05-14 12:11:34 +07:00
vergiLgood1 6c96c1140c Refactor tooltip and control types for improved clarity and consistency
- Renamed ITooltips to ITooltipsControl for better context in map controls.
- Updated type references in search-control, tooltips, crime-map, and layers to use the new ITooltipsControl type.
- Enhanced fill opacity logic in map layers based on active control state.
- Introduced getFillOpacity utility function to centralize opacity determination based on active control.
- Adjusted event handling for district clicks to ensure proper focus and visibility toggling.
- Cleaned up CSS styles by commenting out unused styles for circles.
2025-05-14 11:08:06 +07:00
vergiLgood1 db8e2a6321 add seeds supaabse 2025-05-14 06:54:34 +07:00
vergiLgood1 2a8f249d0c add filter source_type 2025-05-12 12:24:50 +07:00
vergiLgood1 8a1a4320c2 feat: Add Panic Button Demo component and EWS Alert Layer for incident management
- Implemented PanicButtonDemo component for triggering alerts with varying priorities.
- Created EWSAlertLayer to manage and display active incidents on the map.
- Added styles for alert markers and status indicators.
- Developed mock data utilities for generating and managing incident logs.
- Defined TypeScript interfaces for incident logs and locations.
2025-05-07 10:23:54 +07:00
vergiLgood1 3448945f4d add some geojson layer 2025-05-07 09:03:52 +07:00
vergiLgood1 05ba4ab920 feat: enhance SidebarInfoTab with detailed map layers and add timeline layer functionality to CrimeMap; update TimelineLegend and TimelinePopup styles 2025-05-07 08:01:07 +07:00
vergiLgood1 609a9c1327 Refactor map interaction and event handling
- Updated DistrictLayer to dispatch custom events for incident clicks and map fly-to actions.
- Enhanced DistrictFillLineLayer to support a new onDistrictClick prop for handling district interactions.
- Improved Layers component to manage district and incident selections, including new event listeners for incident clicks.
- Refactored UnclusteredPointLayer to streamline incident click handling and map interactions.
- Introduced FlyToHandler component to centralize fly-to event handling and highlight effects for incidents.
- Cleaned up event listener management across components to ensure proper cleanup and avoid memory leaks.
2025-05-07 06:41:33 +07:00
vergiLgood1 fa7651619b feat: Enhance heatmap and timeline layers with new data handling and filtering options 2025-05-05 11:11:11 +07:00
vergiLgood1 a19e8ec32d feat: Add timeline and units layers to the map component
- Introduced a new TimelineLayer to visualize average incident times per district.
- Added UnitsLayer to display police stations and connection lines to incidents.
- Updated Layers component to conditionally render the new layers based on active controls.
- Implemented a query to fetch units data from the server.
- Created utility functions for color generation based on crime categories.
- Enhanced map interaction with popups for detailed information on incidents and units.
- Added legends for timeline and units to improve user experience.
- Refactored existing types and interfaces to accommodate new features.
2025-05-05 10:38:11 +07:00
vergiLgood1 b0db61a9ff feat: add heatmap layer and enhance clustering functionality in map layers 2025-05-05 06:47:59 +07:00
vergiLgood1 078bf969bc refactor: refactor district layer 2025-05-05 05:15:05 +07:00
vergiLgood1 03a5e527d4 Refactor map layers and components for improved structure and functionality
- Removed the MapLayerManager component and integrated its functionality into the Layers component.
- Added FlyToHandler component to manage map fly-to animations and highlight incidents.
- Introduced ClusterLayer and UnclusteredPointLayer components for better handling of crime incident clustering and display.
- Updated types in map.ts to include new interfaces for district features and layer props.
- Enhanced crime data processing functions for better data management and visualization.
- Adjusted button styles in button.tsx for improved UI consistency.
2025-05-05 04:57:32 +07:00
vergiLgood1 c282d958a5 feat: add map reset functionality and improve incident popup handling 2025-05-05 03:42:32 +07:00
vergiLgood1 6327d7b886 feat: implement map fly-to functionality with custom events for improved navigation experience 2025-05-05 03:20:16 +07:00
vergiLgood1 a2f51e6837 refactor: update crime-related interfaces for consistency and clarity across components 2025-05-05 03:11:07 +07:00
vergiLgood1 2aa2e609f1 feat: enhance search functionality with crime data integration and improved suggestion handling 2025-05-05 02:16:49 +07:00
vergiLgood1 50f42f532f fix: update tooltip container reference and adjust z-index for better visibility 2025-05-05 01:53:52 +07:00
vergiLgood1 8f12715072 feat: Add Sidebar Statistics Tab for crime analytics overview
- Implemented SidebarStatisticsTab component to display monthly incidents and crime overview statistics.
- Integrated StatCard components for total incidents, monthly average, and clearance rate.
- Added visualization for incidents by month with dynamic height based on incident counts.
- Included CrimeTypeCard for displaying the most common crimes with percentage breakdown.

feat: Create Additional Tooltips for enhanced map controls

- Developed AdditionalTooltips component to provide year, month, and category selection.
- Integrated MonthSelector, YearSelector, and CategorySelector for filtering options.
- Added functionality to toggle visibility of selectors.

feat: Implement Crime Tooltips for crime data controls

- Created CrimeTooltips component to manage various crime data views.
- Included tooltips for incidents, heatmap, trends, patrol areas, clusters, and timeline.

feat: Enhance Search Control with incident search capabilities

- Developed SearchTooltip component for searching incidents by various criteria.
- Implemented suggestion filtering based on selected search type (crime ID, incident ID, coordinates, description, address).
- Added functionality to display detailed information about selected incidents.

feat: Consolidate tooltips into a unified Tooltip component

- Merged CrimeTooltips, AdditionalTooltips, and SearchTooltip into a single Tooltips component.
- Streamlined props for managing active controls and selected filters.

feat: Add Map Legend for crime rate visualization

- Created MapLegend component to visually represent crime rates using color coding.
- Integrated with existing map overlay for better user experience.
2025-05-05 01:11:37 +07:00
vergiLgood1 d807942688 Refactor FloatingActionSearchBar to accept actions and props; remove map-navigations component; implement top-controls with search functionality; enhance crime map with fly-to incident feature; add district layer highlight effect. 2025-05-04 08:54:03 +07:00
vergiLgood1 5d13ff532b refactor: rename TopNavigation to TopControl and update related imports in CrimeMap
style: update MapLegend text color for better visibility
2025-05-04 05:18:12 +07:00
vergiLgood1 593b198b94 feat(map): enhance CrimeSidebar with filtered crimes and incident click handling 2025-05-04 03:59:56 +07:00
vergiLgood1 7916680122 feat(map): update MapLegend component usage and enhance click handler management in DistrictLayer 2025-05-04 03:17:54 +07:00
vergiLgood1 7d01547a02 Add DistrictLayer and MapLayerManager components for enhanced map functionality
- Implemented DistrictLayer to display district information and crime data on the map.
- Added interactivity for district selection, including animations and data retrieval.
- Created MapLayerManager to manage multiple layers on the map, including district and crime layers.
- Integrated crime data processing and visualization based on user interactions.
- Ensured proper handling of map style loading and layer management.
2025-05-04 02:45:10 +07:00
vergiLgood1 4623fac52b feat: replace SmoothYearTimeline with CrimeTimelapse component and enhance timeline functionality 2025-05-03 23:51:26 +07:00
vergiLgood1 e488bad7c1 feat(map): add pitch and bearing constants for map initialization
feat(district-popup): enhance badge hover styles for crime levels

feat(map): implement year timeline control with smooth animation

feat(ui): create a reusable slider component using Radix UI

chore(package): update package.json and package-lock.json to include @radix-ui/react-slider
2025-05-03 22:58:14 +07:00
vergiLgood1 fdc0403b81 feat: enhance district layer and popup with improved data handling and logging 2025-05-03 19:54:39 +07:00
vergiLgood1 0d6f9acf66 feat: refactor crime data fetching and filtering logic in crime management components 2025-05-03 19:12:13 +07:00
vergiLgood1 428986c927 feat: add crime and district popups with detailed information and filtering capabilities
- Added `CrimePopup` component to display detailed information about individual crime incidents.
- Introduced `DistrictPopup` component to show district-level crime statistics and demographics.
- Implemented `useFilteredCrimeData` hook for filtering crime data based on selected categories.
- Created `calculateCrimeStats` utility function to compute various crime statistics from raw data.
- Updated package.json to include necessary dependencies for map and geocoder functionalities.
2025-05-02 22:20:22 +07:00
vergiLgood1 b564e6f330 feat(map): enhance map functionality with new controls and overlays
- Added GeolocateControl to the map for user location tracking.
- Introduced CategorySelector for filtering crime categories.
- Implemented TopNavigation for year, month, and category selection.
- Created MapSelectors for managing filters with reset functionality.
- Developed CrimeSidebar for displaying incidents, statistics, and reports.
- Added SidebarToggle for collapsing and expanding the sidebar.
- Prefetch crime data based on selected year and month.
- Updated Popover and Skeleton components for better UI experience.
- Refactored OverlayControl for improved rendering and cleanup.
- Enhanced styling and responsiveness across components.
2025-05-02 02:47:16 +07:00
vergiLgood1 897a130ff7 feat: Enhance Overlay component with customizable styles and addControl method
- Updated OverlayProps to include className and style for customization.
- Modified OverlayControl to apply custom styles and handle control addition.
- Improved rendering logic in _Overlay to pass addControl method to children.
- Refactored SelectContent to accept a container prop for better positioning.
- Cleaned up useFullscreen hook by removing unnecessary comments and improving readability.
- Updated global CSS for better styling of map popups and controls.
- Removed unused dependencies related to mapbox-gl-draw from package.json and package-lock.json.
- Added CustomControl and MonthSelector components for enhanced map functionality.
2025-05-01 21:15:31 +07:00
vergiLgood1 31f12ab88b feat: add overlay component and integrate into map controls for improved UI layout 2025-04-30 18:39:21 +07:00
vergiLgood1 2c09cb4d7c feat: implement map layer control and time slider components for enhanced crime data visualization 2025-04-28 23:45:06 +07:00
vergiLgood1 6f89892d8c feat: add map controls and sidebar components for crime data visualization
- Implemented MapControls component for selecting various crime-related metrics.
- Created MapFilterControl for filtering data by year and month.
- Developed MapSidebar to display crime statistics and district information.
- Added SidebarToggle for opening and closing the sidebar.
- Introduced SeverityIndicator to visually represent crime severity levels.
- Created TimeControls for selecting time frames for data analysis.
- Added useFullscreen hook for managing fullscreen functionality.
2025-04-28 00:14:16 +07:00
vergiLgood1 29925dc1b9 add some stuff 2025-04-27 22:41:27 +07:00
vergiLgood1 c6f803b08c feat: add crime map components and functionality
- Implemented MapLegend component to display crime rate legend.
- Created YearSelector component for selecting the year of crime data.
- Developed CrimeMap component to manage crime incidents and district data.
- Added DistrictLayer for rendering districts on the map with hover and click interactions.
- Introduced CrimeMarker for displaying crime incidents on the map.
- Built MapView component for rendering the map with various controls.
- Established utility constants for crime colors and rates.
- Defined types for crime management and map features.
2025-04-14 23:47:44 +07:00