- App.tsx: full navigation (Auth stack + Main tabs with 5 screens) - Auth: LoginScreen, RegisterScreen, ForgotPasswordScreen - HomeScreen: dashboard with IoT metrics, weather widget, alerts, quick actions, sensors - MapScreen: interactive map with layer toggles (6 layers) - MarketplaceScreen: categories (6), products (5), search - ChatScreen: AI chat with quick prompts (4), bot responses - ProfileScreen: user info, stats, menu (9 items), logout - AlertsScreen: alert list with severity, acknowledge - SensorsScreen: sensor list with type filters (6 types), search - ZonesScreen: zone cards with stats - SettingsScreen: language picker (FR/EN/ES/DE), privacy, about - Stores: iotStore (sensors, zones, alerts), notificationStore, uiStore + i18n - Hooks: useSensors, useAlerts, useNotifications, useLocation - Components: Card, Button, LoadingSpinner, ErrorBoundary, Header - Services: iotService, notificationService (with axios API client) - Utils: formatters (temp, AQI, noise, dates), validators (email, password, IBAN) - Theme: colors.ts with full design system (Blue Ocean palette) - Ditto: fixed MongoDB connection, new JWT secrets, official gateway image
118 lines
2.4 KiB
Objective-C
118 lines
2.4 KiB
Objective-C
//
|
|
// Created by Leland Richardson on 12/27/15.
|
|
// Copyright (c) 2015 Facebook. All rights reserved.
|
|
//
|
|
|
|
#import "AIRMapCircle.h"
|
|
#import <React/UIView+React.h>
|
|
|
|
|
|
@implementation AIRMapCircle {
|
|
BOOL _radiusSet;
|
|
BOOL _centerSet;
|
|
}
|
|
|
|
- (void)setFillColor:(UIColor *)fillColor {
|
|
_fillColor = fillColor;
|
|
[self update];
|
|
}
|
|
|
|
- (void)setStrokeColor:(UIColor *)strokeColor {
|
|
_strokeColor = strokeColor;
|
|
[self update];
|
|
}
|
|
|
|
- (void)setStrokeWidth:(CGFloat)strokeWidth {
|
|
_strokeWidth = strokeWidth;
|
|
[self update];
|
|
}
|
|
|
|
- (void)setLineJoin:(CGLineJoin)lineJoin {
|
|
_lineJoin = lineJoin;
|
|
[self update];
|
|
}
|
|
|
|
- (void)setLineCap:(CGLineCap)lineCap {
|
|
_lineCap = lineCap;
|
|
[self update];
|
|
}
|
|
|
|
- (void)setMiterLimit:(CGFloat)miterLimit {
|
|
_miterLimit = miterLimit;
|
|
[self update];
|
|
}
|
|
|
|
- (void)setLineDashPhase:(CGFloat)lineDashPhase {
|
|
_lineDashPhase = lineDashPhase;
|
|
[self update];
|
|
}
|
|
|
|
- (void)setLineDashPattern:(NSArray <NSNumber *> *)lineDashPattern {
|
|
_lineDashPattern = lineDashPattern;
|
|
[self update];
|
|
}
|
|
|
|
- (void)setRadius:(CLLocationDistance)radius {
|
|
_radius = radius;
|
|
_radiusSet = YES;
|
|
[self createCircleAndRendererIfPossible];
|
|
[self update];
|
|
}
|
|
|
|
- (void)setCenterCoordinate:(CLLocationCoordinate2D)centerCoordinate{
|
|
_centerCoordinate = centerCoordinate;
|
|
_centerSet = YES;
|
|
[self createCircleAndRendererIfPossible];
|
|
[self update];
|
|
}
|
|
|
|
- (void) createCircleAndRendererIfPossible
|
|
{
|
|
if (!_centerSet || !_radiusSet) return;
|
|
self.circle = [MKCircle circleWithCenterCoordinate:_centerCoordinate radius:_radius];
|
|
self.renderer = [[MKCircleRenderer alloc] initWithCircle:self.circle];
|
|
}
|
|
|
|
- (void) update
|
|
{
|
|
if (!_renderer) return;
|
|
_renderer.fillColor = _fillColor;
|
|
_renderer.strokeColor = _strokeColor;
|
|
_renderer.lineWidth = _strokeWidth;
|
|
_renderer.lineCap = _lineCap;
|
|
_renderer.lineJoin = _lineJoin;
|
|
_renderer.miterLimit = _miterLimit;
|
|
_renderer.lineDashPhase = _lineDashPhase;
|
|
_renderer.lineDashPattern = _lineDashPattern;
|
|
|
|
if (_map == nil) return;
|
|
[_map removeOverlay:self];
|
|
[_map addOverlay:self];
|
|
}
|
|
|
|
|
|
#pragma mark MKOverlay implementation
|
|
|
|
- (CLLocationCoordinate2D) coordinate
|
|
{
|
|
return self.circle.coordinate;
|
|
}
|
|
|
|
- (MKMapRect) boundingMapRect
|
|
{
|
|
return self.circle.boundingMapRect;
|
|
}
|
|
|
|
- (BOOL)intersectsMapRect:(MKMapRect)mapRect
|
|
{
|
|
BOOL answer = [self.circle intersectsMapRect:mapRect];
|
|
return answer;
|
|
}
|
|
|
|
- (BOOL)canReplaceMapContent
|
|
{
|
|
return NO;
|
|
}
|
|
|
|
@end
|