0
我嘗試這樣做:如何添加鏈接(url)以反應原生地圖標註?
<MapView.Marker id={marker.id}
coordinate={marker.coordinates}
title={marker.title}>
<MapView.Callout style={styles.callout} >
<Text style={styles.link} onPress={this.openUrl.bind(this)}>
{this.props.marker.link}
</Text>
</MapView.Callout>
</MapView.Marker>
不過的OpenURL功能不調用。
但在這種情況下,我不能在標註 –
多個鏈接,添加多個可點擊的鏈接標註,你應該使用onPress在標註兒童中(見更新的答案)。 –