-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBDMapView.ios.js
More file actions
50 lines (41 loc) · 1.17 KB
/
BDMapView.ios.js
File metadata and controls
50 lines (41 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
'use strict';
import React, { PropTypes } from 'react';
import {
View,
requireNativeComponent,
NativeModules
} from 'react-native';
var BDMapManager = NativeModules.RCTBDMapManager;
const MapView = React.createClass({
propTypes: {
...View.propTypes,
/**
* Used to style and layout the `MapView`.
*/
style: View.propTypes.style,
annotations: React.PropTypes.arrayOf(React.PropTypes.shape({
/**
* The location of the annotation.
*/
latitude: React.PropTypes.number.isRequired,
longitude: React.PropTypes.number.isRequired,
/**
* Annotation title and subtile.
*/
title: React.PropTypes.string,
})),
region:React.PropTypes.shape({
/**
* The location of the annotation.
*/
latitude: React.PropTypes.number.isRequired,
longitude: React.PropTypes.number.isRequired,
}),
pitchEnabled: React.PropTypes.bool,
},
render: function() {
return (<RCTBDMap {...this.props} annotations={this.props.annotations} pitchEnabled={true} region={this.props.region}/>);
}
});
var RCTBDMap = requireNativeComponent('RCTBDMap', MapView);
module.exports = MapView;