Browse Source

引入smart-amap中的marker、circle等类型,并且export出去

guohui.deng 7 years ago
parent
commit
7489c0d0c4
2 changed files with 5 additions and 42 deletions
  1. 4 42
      index.ts
  2. 1 0
      package.json

+ 4 - 42
index.ts

@@ -1,5 +1,6 @@
 import { createSelector, OutputSelector } from 'reselect';
 import Global from './Common';
+import { Marker, Circle, Line, Polygon} from 'react-native-smart-amap';
 import {
     latLngDegreesToDecimal,
     latLngDecimalToDegrees,
@@ -9,13 +10,11 @@ import {
     isNumber
 } from './Utils'
 
+export { Marker, Circle, Line, Polygon };
+
 let LatLon = require('geodesy').LatLonSpherical;
 
-export interface Region {
-    center: CoordinateLong;
-    radius: number;
-    animate: boolean;
-}
+
 declare namespace LatLon {
     export interface Spherical {
         lat: number;
@@ -224,43 +223,6 @@ declare type PassingPoint = PassingPointLocal | PassingPointServer
 
 // shapes
 export type Coordinate = CoordinateLong | CoordinateShort
-export interface Circle {
-    coordinate: Coordinate;
-    radius: number;
-    lineWidth: number;
-    strokeColor: string;
-    fillColor: string;
-}
-
-export interface CustomViewProps {
-    imgName: string;
-    addrName: string;
-    index: number;
-    isSelected: boolean;
-}
-
-export interface Marker {
-    coordinate: Coordinate;
-    imageName?: string;
-    customView?: string;
-    customViewProps?: CustomViewProps;
-    isToTop?: boolean;
-    flat?: boolean;
-    uid?: string;
-}
-
-export interface Polygon {
-    lineWidth: number;
-    strokeColor: string;
-    fillColor: string;
-    coordinates: Coordinate[];
-}
-
-export interface Line {
-    lineWidth: number;
-    strokeColor: string;
-    coordinates: Coordinate[];
-}
 
 export interface CirclesAndMarkers {
     circles: Circle[];

+ 1 - 0
package.json

@@ -22,6 +22,7 @@
     "react-test-renderer": "16.0.0-beta.5",
     "ts-jest": "^23.10.4",
     "typescript": "^3.1.4"
+    "react-native-smart-amap": "ssh+git://git@git.corp.brilliantaero.com:BA/react-native-smart-amap.git"
   },
   "jest": {
     "preset": "ts-jest",