Can't remove a User location Icon from my MAP?

Viewed 402

I am using React Native Maps from react-native-maps library, and I have a problem with on of the icons of the userLocation, I don't want it to show up, But it is there, the problem is when I set a property showsUserLocation to false to make disappear I am losing a functionality.

I will explain more with code and images, this my code :

<MapWrapper
        ref={this.mapRef}
        followUserLocation
        zoomEnabled
        showsUserLocation
        mapType={isSatMode ? 'satellite' : 'standard'}
        rotateEnabled={false}
      >
        {!isNilOrEmpty(markers) && !isNilOrEmpty(selectedMenuItem) && markers.map(marker => this.renderMarker(marker, handleOnClickMark))}
        {!isNilOrEmpty(polylines) && polylines.map(this.renderPolyline)}
      </MapWrapper>

The showsUserLocation is true now, which means that I have two icons on my Map :

  • the blue Icon pointing on my location
  • The icon that I can click on the move to my location ( I want to get rid of this )

With images :

enter image description here

When I change the showsUserLocation to false, the two of them are no longer there, but I need the blue icon on my View.

Any help would be much appreciated.

1 Answers

By setting showsMyLocationButton to false it works.

Related