|
| 1 | +import * as React from 'react'; |
| 2 | + |
| 3 | +interface MapViewProps { |
| 4 | + provider?: 'google'; |
| 5 | + style: any; |
| 6 | + customMapStyle?: any[]; |
| 7 | + customMapStyleString?: string; |
| 8 | + showsUserLocation?: boolean; |
| 9 | + userLocationAnnotationTitle?: string; |
| 10 | + showsMyLocationButton?: boolean; |
| 11 | + followsUserLocation?: boolean; |
| 12 | + showsPointsOfInterest?: boolean; |
| 13 | + showsCompass?: boolean; |
| 14 | + zoomEnabled?: boolean; |
| 15 | + rotateEnabled?: boolean; |
| 16 | + cacheEnabled?: boolean; |
| 17 | + loadingEnabled?: boolean; |
| 18 | + loadingBackgroundColor?: any; |
| 19 | + loadingIndicatorColor?: any; |
| 20 | + scrollEnabled?: boolean; |
| 21 | + pitchEnabled?: boolean; |
| 22 | + toolbarEnabled?: boolean; |
| 23 | + moveOnMarkerPress?: boolean; |
| 24 | + showsScale?: boolean; |
| 25 | + showsBuildings?: boolean; |
| 26 | + showsTraffic?: boolean; |
| 27 | + showsIndoors?: boolean; |
| 28 | + showsIndoorLevelPicker?: boolean; |
| 29 | + mapType?: 'standard' | 'satellite' | 'hybrid' | 'terrain' | 'none'; |
| 30 | + region?: { latitude: number; longitude: number; latitudeDelta: number; longitudeDelta: number; }; |
| 31 | + initialRegion?: { latitude: number; longitude: number; latitudeDelta: number; longitudeDelta: number; }; |
| 32 | + liteMode?: boolean; |
| 33 | + maxDelta?: number; |
| 34 | + minDelta?: number; |
| 35 | + legalLabelInsets?: any; |
| 36 | + onChange?: Function; |
| 37 | + onMapReady?: Function; |
| 38 | + onRegionChange?: Function; |
| 39 | + onRegionChangeComplete?: Function; |
| 40 | + onPress?: Function; |
| 41 | + onLayout?: Function; |
| 42 | + onLongPress?: Function; |
| 43 | + onPanDrag?: Function; |
| 44 | + onMarkerPress?: Function; |
| 45 | + onMarkerSelect?: Function; |
| 46 | + onMarkerDeselect?: Function; |
| 47 | + onCalloutPress?: Function; |
| 48 | + onMarkerDragStart?: Function; |
| 49 | + onMarkerDrag?: Function; |
| 50 | + onMarkerDragEnd?: Function; |
| 51 | + minZoomLevel?: number; |
| 52 | + maxZoomLevel?: number; |
| 53 | +} |
| 54 | + |
| 55 | +declare class MapView extends React.Component<MapViewProps, any> { |
| 56 | + static Animated: any; |
| 57 | + static AnimatedRegion: any; |
| 58 | +} |
| 59 | + |
| 60 | +declare namespace MapView { |
| 61 | + |
| 62 | + type LineCapType = 'butt' | 'round' | 'square'; |
| 63 | + type LineJoinType = 'miter' | 'round' | 'bevel'; |
| 64 | + |
| 65 | + interface MarkerProps { |
| 66 | + identifier?: string; |
| 67 | + reuseIdentifier?: string; |
| 68 | + title?: string; |
| 69 | + description?: string; |
| 70 | + image?: any; |
| 71 | + opacity?: number; |
| 72 | + pinColor?: string; |
| 73 | + coordinate: { latitude: number; longitude: number }; |
| 74 | + centerOffset?: { x: number; y: number }; |
| 75 | + calloutOffset?: { x: number; y: number }; |
| 76 | + anchor?: { x: number; y: number }; |
| 77 | + calloutAnchor?: { x: number; y: number }; |
| 78 | + flat?: boolean; |
| 79 | + draggable?: boolean; |
| 80 | + onPress?: Function; |
| 81 | + onSelect?: Function; |
| 82 | + onDeselect?: Function; |
| 83 | + onCalloutPress?: Function; |
| 84 | + onDragStart?: Function; |
| 85 | + onDrag?: Function; |
| 86 | + onDragEnd?: Function; |
| 87 | + zIndex?: number; |
| 88 | + } |
| 89 | + |
| 90 | + interface MapPolylineProps { |
| 91 | + coordinates?: { latitude: number; longitude: number; }[]; |
| 92 | + onPress?: Function; |
| 93 | + tappable?: boolean; |
| 94 | + fillColor?: string; |
| 95 | + strokeWidth?: number; |
| 96 | + strokeColor?: string; |
| 97 | + zIndex?: number; |
| 98 | + lineCap?: LineCapType; |
| 99 | + lineJoin?: LineJoinType; |
| 100 | + miterLimit?: number; |
| 101 | + geodesic?: boolean; |
| 102 | + lineDashPhase?: number; |
| 103 | + lineDashPattern?: number[]; |
| 104 | + } |
| 105 | + |
| 106 | + interface MapPolygonProps { |
| 107 | + coordinates?: { latitude: number; longitude: number; }[]; |
| 108 | + holes?: { latitude: number; longitude: number; }[][]; |
| 109 | + onPress?: Function; |
| 110 | + tappable?: boolean; |
| 111 | + strokeWidth?: number; |
| 112 | + strokeColor?: string; |
| 113 | + fillColor?: string; |
| 114 | + zIndex?: number; |
| 115 | + lineCap?: LineCapType; |
| 116 | + lineJoin?: LineJoinType; |
| 117 | + miterLimit?: number; |
| 118 | + geodesic?: boolean; |
| 119 | + lineDashPhase?: number; |
| 120 | + lineDashPattern?: number[]; |
| 121 | + } |
| 122 | + |
| 123 | + interface MapCircleProps { |
| 124 | + center: { latitude: number; longitude: number }; |
| 125 | + radius: number; |
| 126 | + onPress?: Function; |
| 127 | + strokeWidth?: number; |
| 128 | + strokeColor?: string; |
| 129 | + fillColor?: string; |
| 130 | + zIndex?: number; |
| 131 | + lineCap?: LineCapType; |
| 132 | + lineJoin?: LineJoinType; |
| 133 | + miterLimit?: number; |
| 134 | + lineDashPhase?: number; |
| 135 | + lineDashPattern?: number[]; |
| 136 | + } |
| 137 | + |
| 138 | + interface MapUrlTitleProps { |
| 139 | + urlTemplate: string; |
| 140 | + zIndex?: number; |
| 141 | + } |
| 142 | + |
| 143 | + interface MapCalloutProps { |
| 144 | + tooltip?: boolean; |
| 145 | + onPress?: Function; |
| 146 | + } |
| 147 | + |
| 148 | + export class Marker extends React.Component<MarkerProps, any> {} |
| 149 | + export class Polyline extends React.Component<MapPolylineProps, any> {} |
| 150 | + export class Polygon extends React.Component<MapPolygonProps, any> {} |
| 151 | + export class Circle extends React.Component<MapCircleProps, any> {} |
| 152 | + export class UrlTile extends React.Component<MapUrlTitleProps, any> {} |
| 153 | + export class Callout extends React.Component<MapCalloutProps, any> {} |
| 154 | +} |
| 155 | + |
| 156 | +export = MapView; |
0 commit comments