无需可触摸整个MapView.Callout!在React-native-maps中

时间:2017-07-03 13:49:09

标签: react-native react-native-android react-native-maps

我在android中开发移动应用程序。我在callout视图中显示了数据。在这个视图中,一个是可触摸链接,一个是关闭标记,但它可以触摸整个标注。但我希望当我点击特别像书籍约会或关闭标签时关闭标注(点击错误图像),但可触摸整个应用程序。

我的代码:

 <MapView.Callout style={{width:260}}>
          <View style={{flexGrow:1,flexDirection:'row'}}>
           <View style={{flex:.3,alignItems:'center',justifyContent:'center'}}>
              {this.props.marker.DoctorImage == ''? (
              <Image source = {require('./Imgs/emptypic.png')} style={{height:70,width:70,borderRadius:35,resizeMode:'cover'}}/>
              ):(
              <Image source = {{uri:config.privacyUrl+this.props.marker.DoctorImage}} style={{height:70,width:70,borderRadius:35,resizeMode:'cover'}}/>
              )}
            </View>
            <View style={{flex:.64,justifyContent:'center'}}>
                    <Text style={{flex:.12}}>Name: {this.props.marker.FirstName} {this.props.marker.LastName}</Text>
                      <Text style={{flex:.12}}>Qualification: {this.props.marker.Qualification}</Text>
                        <Text style={{flex:.12}}>Fee: {this.props.marker.ConsultationFee}</Text>
                      <Text style={{flex:.12}}>Speciality: {this.props.marker.SpecialityName}</Text>
                    <Text style={{flex:.16,color:'#0000ff',fontWeight:'bold',fontSize:16}}>Book Appointment</Text>
                  </View>

                  <View style={{flex:.06,justifyContent:'center'}}>
                    <Image source = {require('./Imgs/close.png')} style ={{height:10,width:15}} />
                  </View>

          </View>

          </MapView.Callout>

0 个答案:

没有答案