1

I already saw that there were posts where you were trying to solve zIndex defects of react native maps for markers. But it does not work on ANYTHING in react native maps, including Polygon, Polyline. Is there any solution to solve this huge problem?

Thank you for your suggestions.

  • possible duplicate of this: https://stackoverflow.com/questions/47191457/react-native-maps-markers-prop-zindex-doesnt-work-correctly-in-ios-11. – ruby_newbie Nov 25 '19 at 19:15
  • Does this answer your question? [react-native-maps Marker's prop zIndex doesn't work correctly in iOS 11](https://stackoverflow.com/questions/47191457/react-native-maps-markers-prop-zindex-doesnt-work-correctly-in-ios-11) – ruby_newbie Nov 25 '19 at 19:15
  • No, it does not. Because it is just POSSIBLE solution and only for markers. As I said, I need to use zIndex for polygon and polyline too. – Martin Schmidt Nov 26 '19 at 08:50

1 Answers1

0

try to do this :

 <MapView
      //ref={_map}
      initialRegion={{
        latitude: LATITUDE,
        longitude: LONGITUDE,
        latitudeDelta: LATITUDE_DELTA,
        longitudeDelta: LONGITUDE_DELTA,
      }}
      style={{
        flex: 1,
        ...StyleSheet.absoluteFillObject, // <-- add this style to map
        top: 0,
        left: 0,
        right: 0,
        bottom: 0,
      }}
      //provider={PROVIDER_GOOGLE}
      >
      <Marker
        coordinate={{latitude: LATITUDE,longitude: LONGITUDE,}}
        title={'itle'}
      />
    </MapView>
    <View style={{marginVertical: 20, flexDirection: 'row',}}>
      <TouchableOpacity
        onPress={() => {}}
        style={[styles.bubble, styles.button]}>
        <Text>Press me</Text>
      </TouchableOpacity>
    </View>
  </View>