forked from react-native-maps/react-native-maps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMapUrlTile.js
40 lines (33 loc) · 975 Bytes
/
MapUrlTile.js
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
import React, { PropTypes } from 'react';
import {
View,
requireNativeComponent,
} from 'react-native';
const propTypes = {
...View.propTypes,
/**
* The url template of the tile server. The patterns {x} {y} {z} will be replaced at runtime
* For example, http://c.tile.openstreetmap.org/{z}/{x}/{y}.png
*/
urlTemplate: PropTypes.string.isRequired,
/**
* The order in which this tile overlay is drawn with respect to other overlays. An overlay
* with a larger z-index is drawn over overlays with smaller z-indices. The order of overlays
* with the same z-index is arbitrary. The default zIndex is -1.
*
* @platform android
*/
zIndex: PropTypes.number,
};
class MapUrlTile extends React.Component {
render() {
return (
<AIRMapUrlTile
{...this.props}
/>
);
}
}
MapUrlTile.propTypes = propTypes;
const AIRMapUrlTile = requireNativeComponent('AIRMapUrlTile', MapUrlTile);
module.exports = MapUrlTile;