- 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
96 lines
4.5 KiB
Objective-C
96 lines
4.5 KiB
Objective-C
//
|
|
// AIRGoogleMap.h
|
|
// AirMaps
|
|
//
|
|
// Created by Gil Birman on 9/1/16.
|
|
//
|
|
|
|
#ifdef HAVE_GOOGLE_MAPS
|
|
|
|
#import <UIKit/UIKit.h>
|
|
#import <React/RCTComponent.h>
|
|
#import <React/RCTBridge.h>
|
|
#import <GoogleMaps/GoogleMaps.h>
|
|
#import <MapKit/MapKit.h>
|
|
#import "AIRGMSMarker.h"
|
|
|
|
#import "AIRGoogleMapCoordinate.h"
|
|
|
|
|
|
@interface AIRGoogleMap : GMSMapView
|
|
|
|
// TODO: don't use MK region?
|
|
@property (nonatomic, weak) RCTBridge *bridge;
|
|
@property (nonatomic, assign) MKCoordinateRegion initialRegion;
|
|
@property (nonatomic, assign) MKCoordinateRegion region;
|
|
@property (nonatomic, assign) GMSCameraPosition *cameraProp; // Because the base class already has a "camera" prop.
|
|
@property (nonatomic, strong) GMSCameraPosition *initialCamera;
|
|
@property (nonatomic, assign) NSString *customMapStyleString;
|
|
@property (nonatomic, assign) UIEdgeInsets mapPadding;
|
|
@property (nonatomic, assign) NSString *paddingAdjustmentBehaviorString;
|
|
@property (nonatomic, copy) RCTDirectEventBlock onMapReady;
|
|
@property (nonatomic, copy) RCTDirectEventBlock onMapLoaded;
|
|
@property (nonatomic, copy) RCTDirectEventBlock onKmlReady;
|
|
@property (nonatomic, copy) RCTBubblingEventBlock onPress;
|
|
@property (nonatomic, copy) RCTBubblingEventBlock onLongPress;
|
|
@property (nonatomic, copy) RCTDirectEventBlock onPanDrag;
|
|
@property (nonatomic, copy) RCTDirectEventBlock onUserLocationChange;
|
|
@property (nonatomic, copy) RCTDirectEventBlock onMarkerPress;
|
|
@property (nonatomic, copy) RCTDirectEventBlock onMarkerSelect;
|
|
@property (nonatomic, copy) RCTDirectEventBlock onMarkerDeselect;
|
|
@property (nonatomic, copy) RCTDirectEventBlock onPoiClick;
|
|
@property (nonatomic, copy) RCTDirectEventBlock onRegionChangeStart;
|
|
@property (nonatomic, copy) RCTDirectEventBlock onRegionChange;
|
|
@property (nonatomic, copy) RCTDirectEventBlock onRegionChangeComplete;
|
|
@property (nonatomic, copy) RCTDirectEventBlock onIndoorLevelActivated;
|
|
@property (nonatomic, copy) RCTDirectEventBlock onIndoorBuildingFocused;
|
|
@property (nonatomic, strong) NSMutableArray *markers;
|
|
@property (nonatomic, strong) NSMutableArray *polygons;
|
|
@property (nonatomic, strong) NSMutableArray *polylines;
|
|
@property (nonatomic, strong) NSMutableArray *circles;
|
|
@property (nonatomic, strong) NSMutableArray *heatmaps;
|
|
@property (nonatomic, strong) NSMutableArray *tiles;
|
|
@property (nonatomic, strong) NSMutableArray *overlays;
|
|
|
|
@property (nonatomic, assign) BOOL showsBuildings;
|
|
@property (nonatomic, assign) BOOL showsTraffic;
|
|
@property (nonatomic, assign) BOOL showsCompass;
|
|
@property (nonatomic, assign) BOOL scrollEnabled;
|
|
@property (nonatomic, assign) BOOL zoomEnabled;
|
|
@property (nonatomic, assign) BOOL rotateEnabled;
|
|
@property (nonatomic, assign) BOOL scrollDuringRotateOrZoomEnabled;
|
|
@property (nonatomic, assign) BOOL pitchEnabled;
|
|
@property (nonatomic, assign) BOOL zoomTapEnabled;
|
|
@property (nonatomic, assign) BOOL showsUserLocation;
|
|
@property (nonatomic, assign) BOOL showsMyLocationButton;
|
|
@property (nonatomic, assign) BOOL showsIndoors;
|
|
@property (nonatomic, assign) BOOL showsIndoorLevelPicker;
|
|
@property (nonatomic, assign) NSString *kmlSrc;
|
|
|
|
- (BOOL) isReady;
|
|
- (void)didPrepareMap;
|
|
- (void)mapViewDidFinishTileRendering;
|
|
- (BOOL)didTapMarker:(GMSMarker *)marker;
|
|
- (void)didTapPolyline:(GMSPolyline *)polyline;
|
|
- (void)didTapPolygon:(GMSPolygon *)polygon;
|
|
- (void)didTapAtCoordinate:(CLLocationCoordinate2D)coordinate;
|
|
- (void)didLongPressAtCoordinate:(CLLocationCoordinate2D)coordinate;
|
|
- (void)willMove:(BOOL)gesture;
|
|
- (void)didChangeCameraPosition:(GMSCameraPosition *)position isGesture:(BOOL)isGesture;
|
|
- (void)idleAtCameraPosition:(GMSCameraPosition *)position isGesture:(BOOL)isGesture;
|
|
- (void)didTapPOIWithPlaceID:(NSString *)placeID name:(NSString *) name location:(CLLocationCoordinate2D) location;
|
|
- (NSDictionary *)getMapBoundaries;
|
|
|
|
+ (MKCoordinateRegion)makeGMSCameraPositionFromMap:(GMSMapView *)map andGMSCameraPosition:(GMSCameraPosition *)position;
|
|
+ (GMSCameraPosition*)makeGMSCameraPositionFromMap:(GMSMapView *)map andMKCoordinateRegion:(MKCoordinateRegion)region;
|
|
|
|
- (NSDictionary*) getMarkersFramesWithOnlyVisible:(BOOL)onlyVisible;
|
|
- (instancetype)initWithMapId:(NSString *)mapId initialCamera:(GMSCameraPosition*) camera backgroundColor:(UIColor *) backgroundColor andZoomTapEnabled:(BOOL)zoomTapEnabled;
|
|
-(void) fitToSuppliedMarkers:(NSArray*) markers withEdgePadding:(NSDictionary*) edgePadding animated:(BOOL)animated;
|
|
-(void) fitToCoordinates:(NSArray<AIRGoogleMapCoordinate *> *) coordinates withEdgePadding:(NSDictionary*) edgePadding animated:(BOOL)animated;
|
|
-(void) fitToElementsWithEdgePadding:(nonnull NSDictionary *)edgePadding
|
|
animated:(BOOL)animated;
|
|
@end
|
|
|
|
#endif
|