| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202 |
- import { OutputSelector } from 'reselect';
- import { Marker, Circle, Line, Polygon } from 'react-native-amap-kit';
- import { latLngDegreesToDecimal, latLngDecimalToDegrees } from './Utils';
- export { Marker, Circle, Line, Polygon };
- export interface CoordinateShort {
- lat: number;
- lng: number;
- }
- export interface CoordinateLong {
- latitude: number;
- longitude: number;
- }
- export interface LatLngAddrServer extends CoordinateShort {
- addr: string;
- }
- export interface LatLngPointServer extends LatLngAddrServer {
- altitude: number;
- unit: 0 | 1 | 2 | 3;
- }
- export interface StartPointServer extends CoordinateShort {
- altitude: number;
- unit: 0 | 1 | 2 | 3;
- }
- export interface AirRoutePoint extends CoordinateShort {
- point_id: number;
- point_name: string;
- point_code: string;
- }
- export interface PassingPointNavServer extends CoordinateShort {
- point_type: 1;
- altitude: number;
- unit: 0 | 1 | 2 | 3;
- point_id: number;
- point_code: string;
- point_name: string;
- }
- export interface PassingPointAirlineServer {
- point_type: 2;
- altitude: number;
- unit: 0 | 1 | 2 | 3;
- airway?: number;
- air_route_code: string;
- points: Array<AirRoutePoint>;
- }
- export interface PassingPointNormalServer extends CoordinateShort {
- point_type: 3;
- altitude: number;
- unit: 0 | 1 | 2 | 3;
- point_name: string;
- }
- export interface AirspaceInfoCircleServer {
- airspace_name: string;
- airspace_type: 1;
- airspace_id: string;
- note: string;
- center_loc: string;
- center_point_of_flying: CoordinateShort;
- radius_of_flying: number;
- altitude: number;
- unit: number;
- }
- export interface AirspaceInfoLineServer {
- airspace_name: string;
- airspace_type: 2;
- airspace_id: string;
- note: string;
- start_loc: string;
- start_point: StartPointServer;
- end_loc: string;
- end_point: CoordinateShort;
- passing_points: Array<PassingPointServer>;
- airline_width?: number;
- }
- export interface AirspaceInfoPolygonServer {
- airspace_name: string;
- airspace_type: 3;
- airspace_id: string;
- note: string;
- points: Array<LatLngAddrServer>;
- altitude: number;
- unit: number;
- }
- export interface CoordinateShort {
- lat: number;
- lng: number;
- }
- export interface LatLngAddrLocal extends CoordinateShort {
- addr: string;
- }
- export interface LatLngPointLocal extends LatLngAddrLocal {
- height: string;
- heightStandard: string;
- }
- export interface PassingPointNavLocal extends CoordinateShort {
- pointType: 1;
- height: string;
- heightStandard: string;
- pointId: number;
- pointCode: string;
- pointName: string;
- }
- export interface PassingPointAirlineLocal {
- pointType: 2;
- height: string;
- heightStandard: string;
- airRouteId: number;
- airlineCode: string;
- airlines: Array<AirRoutePoint>;
- }
- export interface PassingPointNormalLocal extends CoordinateShort {
- pointType: 3;
- height: string;
- heightStandard: string;
- addr: string;
- }
- export interface AirspaceInfoCircleLocal {
- airspaceType: 1;
- airspaceId: string;
- name: string;
- note: string;
- addr: string;
- lat: number;
- lng: number;
- radius: number;
- height: string;
- heightStandard: string;
- }
- export interface AirspaceInfoLineLocal {
- airspaceType: 2;
- airspaceId: string;
- name: string;
- note: string;
- dep: LatLngPointLocal;
- arrive: LatLngAddrLocal;
- passPoints: Array<PassingPointLocal>;
- airlineWidth?: number;
- }
- export interface AirspaceInfoPolygonLocal {
- airspaceType: 3;
- airspaceId: string;
- name: string;
- note: string;
- polygonPoints: Array<LatLngAddrLocal>;
- height: string;
- heightStandard: string;
- }
- declare type AirspaceInfoCircle = AirspaceInfoCircleLocal | AirspaceInfoCircleServer;
- declare type AirspaceInfoLine = AirspaceInfoLineLocal | AirspaceInfoLineServer;
- declare type AirspaceInfoPolygon = AirspaceInfoPolygonLocal | AirspaceInfoPolygonServer;
- declare type AirspaceInfoLocal = AirspaceInfoCircleLocal | AirspaceInfoLineLocal | AirspaceInfoPolygonLocal;
- declare type AirspaceInfoServer = AirspaceInfoCircleServer | AirspaceInfoLineServer | AirspaceInfoPolygonServer;
- declare type AirspaceInfo = AirspaceInfoLocal | AirspaceInfoServer;
- declare type PassingPointLocal = PassingPointNavLocal | PassingPointNormalLocal | PassingPointAirlineLocal;
- declare type PassingPointServer = PassingPointNavServer | PassingPointNormalServer | PassingPointAirlineServer;
- export declare type Coordinate = CoordinateLong | CoordinateShort;
- export interface CirclesAndMarkers {
- circles: Circle[];
- markers: Marker[];
- }
- export interface LinesAndMarkes {
- lines: Line[];
- markers: Marker[];
- }
- export interface LinesPolygonsAndMarkers {
- polygons: Polygon[];
- markers: Marker[];
- lines: Line[];
- }
- export interface PolygonsAndMarkers {
- polygons: Polygon[];
- markers: Marker[];
- }
- export interface ShapeStyle {
- imageName: string;
- lineWidth: number;
- strokeColor: string;
- fillColor: string;
- }
- export interface ShapeStyles {
- [styleName: string]: ShapeStyle;
- }
- export declare function convertAirspaceInfoServerToLocal(airspaceInfo: AirspaceInfoCircleServer | AirspaceInfoLineServer | AirspaceInfoPolygonServer): AirspaceInfoCircleLocal | AirspaceInfoLineLocal | AirspaceInfoPolygonLocal | null;
- export declare function convertAirspaceInfoLocalToServer(airspace: AirspaceInfoCircleLocal | AirspaceInfoLineLocal | AirspaceInfoPolygonLocal): AirspaceInfoCircleServer | AirspaceInfoLineServer | AirspaceInfoPolygonServer;
- export declare type FnSetStyle = (styleName: string) => null | ShapeStyle;
- export declare function getShapesSelector(airspaceInfos: () => AirspaceInfo[], style?: ShapeStyles, currentAirspaceIndex?: () => number | undefined): {
- markers: OutputSelector<any, Marker[], (res1: any, res2: any, res3: any) => Marker[]>;
- circles: OutputSelector<any, Circle[], (res: any) => Circle[]>;
- lines: OutputSelector<any, Line[], (res: any) => Line[]>;
- polygons: OutputSelector<any, Polygon[], (res1: any, res2: any) => Polygon[]>;
- regionPoints: OutputSelector<any, Coordinate[], (res1: any, res2: any, res3: any) => Coordinate[]>;
- };
- export declare function getShapes(airspaceInfos: AirspaceInfo[], style?: ShapeStyles, currentAirspaceIndex?: number): {
- markers: Marker[];
- circles: Circle[];
- lines: Line[];
- polygons: Polygon[];
- regionPoints: Coordinate[];
- };
- export declare function circleContent(airspaceInfo: AirspaceInfoCircle, type?: number): string;
- export declare function lineContent(airspaceInfo: AirspaceInfoLine, type?: number): string;
- export declare function polygonContent(airspaceInfo: AirspaceInfoPolygon, type?: number): string;
- export { latLngDegreesToDecimal, latLngDecimalToDegrees };
|