У меня следующая проблема, не могу обернуть голову. Я следую примеру response-native-maps и пытаюсь установить маркеры. Однако .map () продолжает выдавать ошибку:
this.props.screenProps.mapLoc.markers.map не является функцией
Код такой:
<MapView
style={{ left:0, right: 0, top:0, bottom: 0, position: 'absolute', backgroundColor: '#fff' }}
region={this.state.region}
onRegionChange={this.onRegionChange.bind(this)}
>
{this.props.screenProps.mapLoc.markers.map(marker => (
<MapView.Marker
coordinate={marker.Coords}
title={marker.Name}
description={marker.Description}
/>
))}
</MapView>
Data is params есть и должны:
{"screenProps": {"cats": [], "mapLoc": {"markers": {"Name": "Blank", "Description": "Blank", "Coords": {"latitude": 56.947902, "longitude": 24.097722}}}}, "navigation": {"state": {"key": "Map", "routeName": "Map"}}}
понятия не имею, что происходит.