2016-06-01 2 views
2

反応のネイティブプロジェクトでアンドロイドマップ用に作成した凡例のスタイルを設定しようとしています。私はそれを正しく配置するのに苦労しています。伝説のコンテナで絶対的な性質を使用することは私を捨てました。リアクションネイティブのマップビューでlegend.pngをスタイルする方法

screenshot

スタイル

container: { 
    flex: 1 
}, 
map: { 
    position: 'absolute', 
    top: 56, 
    left: 0, 
    right: 0, 
    bottom: 0, 
}, 
legendContainer: { 
    position: 'absolute', 
    left: 200, 
    right: 0, 
    bottom: 0, 
    height: 65, 
    width: 210, 
    flex: 1, 
    alignItems: 'center', 
    flexDirection: 'column', 
    justifyContent: 'center', 
    backgroundColor: 'transparent' 
}, 
legend: { 
    top: 0, 
    right: 0, 
    height: 60, 
    width: 180, 
    flexDirection: 'row', 
    resizeMode: 'cover' 
} 

Map.jsが

<View style= { styles.container } > 
     <Toolbar 
      title={this.state.selectedTrip.tripName || this.state.selectedTripName} /> 
     <MapView 
      style={styles.map} 
      region={this.state.region} 
      > 
     </MapView> 
     <View style={styles.legendContainer}> 
      <Image source={require('../../img/legend.png') } style={styles.legend}/> 
     </View> 
    </View > 
+0

あなたのイメージに ' 'スタイルではない – Cherniv

+0

素晴らしい!答えを入れてください – texas697

答えて

関連する問題