【发布时间】:2016-11-26 19:15:45
【问题描述】:
当我说 React Native Maps 时,我指的是这个模块:https://github.com/airbnb/react-native-maps
如何将文本置于此标记之上,使其适用于 ios 和 android 上的任何屏幕尺寸?在上面的屏幕截图中,文本出现在标记的左上角。这是一个 1。
代码如下。感谢您的指导!
<MapView.Marker
style ={{zIndex: this.state.selectedMarker === marker ? 1 : 0}}
key={marker.id}
image={require('../../assets/marker-with-label/marker-with-label.png')}
coordinate={marker.coordinate}
>
<Text>1</Text>
</MapView.Marker>
【问题讨论】:
标签: react-native maps