Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/32.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何让ScrollView从底部开始,并在Google地图组件上滚动?_Javascript_Css_React Native - Fatal编程技术网

Javascript 如何让ScrollView从底部开始,并在Google地图组件上滚动?

Javascript 如何让ScrollView从底部开始,并在Google地图组件上滚动?,javascript,css,react-native,Javascript,Css,React Native,我有以下代码: <MapView provider={PROVIDER_GOOGLE} google={this.props.google} style={{ width: Dimensions.get('window').width, height: Dimensions.get('window').height, zIndex:

我有以下代码:

 <MapView
            provider={PROVIDER_GOOGLE}
            google={this.props.google}
            style={{
              width: Dimensions.get('window').width,
              height: Dimensions.get('window').height,
              zIndex: -1,
            }}
            initialRegion={{
              latitude: this.state.centerLat,
              longitude: this.state.centerLng,
              latitudeDelta: 1,
              longitudeDelta: 1,
            }}
            zoomControl={false}
            mapTypeControl={false}
            streetViewControl={false}
            fullscreenControl={false}
            gestureHandling="greedy"
            onPress={() => this.onMapClicked()}
          >
          </MapView>

        <ScrollView
          styleName="card-menu"
          style={{ alignSelf: "center", position: "absolute" }}
          contentContainerStyle={{ alignSelf: "center", justifyContent: 'flex-end', alignItems: 'flex-end' }}
          onScroll={(event) => this.businessScroll(event)}
          scrollEventThrottle={16}
          style={{ zIndex: 999, position: 'absolute', left: 0, right: 0, bottom: 150 }}

        >
          {this.state.businessMerchants.map((merchant, index) => (
            <Business
              merchant={merchant}
              key={merchant.id}
              isCurrentItem={index === this.state.currentItemIndex}
            />
          ))}
        </ScrollView>
this.onmaplicked()}
>
this.businessScroll(事件)}
scrollEventThrottle={16}
style={{zIndex:999,位置:'absolute',左:0,右:0,下:150}
>
{this.state.businessMerchants.map((merchant,index)=>(
))}
我想要的是从地图的底部(可能从底部开始100或200像素)开始,在地图的顶部,滚动时,我希望ScrollView中的每个项目在地图的越来越多的地方向上滚动

有办法吗?我可以将滚动视图放在地图上,位置为“绝对”,指针事件为“无框”,但我无法访问它下面的地图

如何访问这两个视图并在地图视图上滚动