React Native Maps: Markers image doesn't show using Custom Marker in react-native-maps

后端 未结 10 1856
别那么骄傲
别那么骄傲 2021-02-05 16:52

I\'m using react-native-maps but I faced a problem that after a lot of googling without answer makes me ask it here. I\'m trying to use Custom Marker for the marker

10条回答
  •  名媛妹妹
    2021-02-05 17:19

    as of Oct 2019, the image can be displayed in the marker as along as the tracksViewChanges is set to true. I use FastImage but the general idea is to set tracksViewChanges to true and then to false as soon as the image is loaded so that there won't be any performance issue.

    export const UserMapPin = props => {
      const [trackView, setTrackView] = useState(true);
    
      function changeTrackView() {
        setTrackView(false);
      }
    
      return (
        
          
              
          
        
      );
    };
    

提交回复
热议问题