反应本机地图标记
React Native Map marker
我正在尝试从地图上删除标准标记(红色标记)。我必须使用自定义标记。有什么建议吗?
<Marker coordinate={data}>
<Text style={{paddingLeft: 20, marginLeft: 60, color: 'red'}}>
<UserAvatarContainer
avatarUrl={Util.BackendImageBaseUrl + this.props.navigation.state.params.selectedDoctorAvatar}
/>
{data.selectedDoctor + ' ' + data.selectedDoctorLastName}
</Text>
</Marker>
假设您正在使用 react-native-maps you can use image
prop to use a custom image in your marker, check marker doc
我正在尝试从地图上删除标准标记(红色标记)。我必须使用自定义标记。有什么建议吗?
<Marker coordinate={data}>
<Text style={{paddingLeft: 20, marginLeft: 60, color: 'red'}}>
<UserAvatarContainer
avatarUrl={Util.BackendImageBaseUrl + this.props.navigation.state.params.selectedDoctorAvatar}
/>
{data.selectedDoctor + ' ' + data.selectedDoctorLastName}
</Text>
</Marker>
假设您正在使用 react-native-maps you can use image
prop to use a custom image in your marker, check marker doc