MCPcopy Create free account
hub / github.com/react-native-maps/react-native-maps / render

Method render

src/MapOverlay.tsx:99–135  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

97 private fabricOverlay?: Boolean = undefined;
98
99 render() {
100 const {opacity = 1.0, bounds} = this.props;
101
102 if (this.fabricOverlay === undefined) {
103 this.fabricOverlay = Platform.OS === 'android';
104 }
105
106 const AIRMapOverlay = this.getNativeComponent();
107 let image: any = this.props.image;
108
109 let boundsParam: any = bounds;
110 if (this.fabricOverlay) {
111 if (this.props.image) {
112 image = fixImageProp(this.props.image);
113 }
114 if (bounds) {
115 boundsParam = normalizeBounds(bounds);
116 }
117 } else {
118 if (this.props.image) {
119 image = fixImageProp(this.props.image);
120 if (image.uri) {
121 image = image.uri;
122 }
123 }
124 }
125 return (
126 <AIRMapOverlay
127 // @ts-ignore
128 bounds={boundsParam}
129 opacity={opacity}
130 // @ts-ignore
131 image={image}
132 style={[styles.overlay, this.props.style]}
133 />
134 );
135 }
136}
137
138type Coordinate = [number, number];

Callers

nothing calls this directly

Calls 2

fixImagePropFunction · 0.90
normalizeBoundsFunction · 0.85

Tested by

no test coverage detected