如何解决更新由以下人员管理的视图的属性“lineCap”时出错: AIRMapPolyline in expo
展会版本:sdk42 react-native-maps: 0.28 和 0.27.1 使用 react-native-maps-directions 这是代码
<MapView
provider={PROVIDER_GOOGLE} // remove if not using Google Maps
style={styles.map}
region={getMapRegion()}
>
<MapViewDirections
origin={origin}
destination={destination}
apikey={GOOGLE_MAPS_APIKEY}
strokeWidth={3}
strokeColor="blue"
/>
<Marker
coordinate={getMapRegion()}
title="Test Title"
description="This is the test description"
>
<Callout tooltip>
<Text>{text}</Text>
</Callout>
</Marker>
</MapView>
解决方法
lineDashPattern={[number]} 在折线中添加或响应 MapViewDirections
<MapViewDirections
lineDashPattern={[0]}
origin={origin}
destination={destination}
apikey={GOOGLE_MAPS_APIKEY}
/>