0

I am using react-native-mapbox-gl library for map and trying to render draggable marker.

Following code for render point annotation:

<MapboxGL.PointAnnotation
                                ref={ref => (this.annotationRef = ref)}
                                key="idInpsectionTool"
                                id="idInpsectionTool"
                                draggable={true}
                                //coordinate={[54.606937, 24.370718]}
                                coordinate={this.state.inspectionCoordinate}
                                onDragEnd={this.onInspectionToolDragEnd}
                            >
                                <View style={{ flex: 1 }}>
                                    <Image source={require("../assets/pin.png")} style={{ height: 60, width: 60 }} onLoad={()=>this.annotationRef.refresh()} />
                                    <Icon name="location-sharp" type="Ionicons" style={{ color: "green", fontSize: 60 }} />
                                </View>
                            </MapboxGL.PointAnnotation>

It is working perfectly in ios and in android it is not rendering behind the map. i can see while loading map. once map loaded i can't see in in android only.

Khurshid Ansari
  • 4,638
  • 2
  • 33
  • 52

1 Answers1

0

Yeah, I have a similar issue with emulator and real device (are different issues).

  1. Run and install the app
  2. The images on PointAnnotation are completely invisible
  3. Change the height and width in real time and the image appears.
Adriaan
  • 17,741
  • 7
  • 42
  • 75