diff --git a/Examples/UIExplorer/MapViewExample.js b/Examples/UIExplorer/MapViewExample.js index 407e40f00..2a7bd8b92 100644 --- a/Examples/UIExplorer/MapViewExample.js +++ b/Examples/UIExplorer/MapViewExample.js @@ -33,17 +33,6 @@ var regionText = { longitudeDelta: '0', }; -type MapRegion = { - latitude: number, - longitude: number, - latitudeDelta: number, - longitudeDelta: number, -}; - -type MapRegionInputState = { - region: MapRegion, -}; - var MapRegionInput = React.createClass({ propTypes: { @@ -56,7 +45,7 @@ var MapRegionInput = React.createClass({ onChange: React.PropTypes.func.isRequired, }, - getInitialState(): MapRegionInputState { + getInitialState() { return { region: { latitude: 0, @@ -160,30 +149,9 @@ var MapRegionInput = React.createClass({ }); -type Annotations = Array<{ - animateDrop?: boolean, - latitude: number, - longitude: number, - title?: string, - subtitle?: string, - hasLeftCallout?: boolean, - hasRightCallout?: boolean, - onLeftCalloutPress?: Function, - onRightCalloutPress?: Function, - tintColor?: string, - image?: any, - id?: string, -}>; -type MapViewExampleState = { - isFirstLoad: boolean, - mapRegion?: MapRegion, - mapRegionInput?: MapRegion, - annotations?: Annotations, -}; - var MapViewExample = React.createClass({ - getInitialState(): MapViewExampleState { + getInitialState() { return { isFirstLoad: true, }; @@ -207,7 +175,7 @@ var MapViewExample = React.createClass({ ); }, - _getAnnotations(region): Annotations { + _getAnnotations(region) { return [{ longitude: region.longitude, latitude: region.latitude, @@ -241,14 +209,9 @@ var MapViewExample = React.createClass({ }); -type AnnotationExampleState = { - isFirstLoad: boolean, - annotations?: Annotations, - mapRegion?: MapRegion, -}; var AnnotationExample = React.createClass({ - getInitialState(): AnnotationExampleState { + getInitialState() { return { isFirstLoad: true, }; diff --git a/Libraries/Components/MapView/MapView.js b/Libraries/Components/MapView/MapView.js index 8fcddb77c..13d564280 100644 --- a/Libraries/Components/MapView/MapView.js +++ b/Libraries/Components/MapView/MapView.js @@ -29,8 +29,8 @@ type Event = Object; type MapRegion = { latitude: number; longitude: number; - latitudeDelta?: ?number; - longitudeDelta?: ?number; + latitudeDelta?: number; + longitudeDelta?: number; }; const MapView = React.createClass({