如何将 gif 添加到自定义标记?
How can I add gif to custom marker?
我想在标记中将 gip 添加到图像源,我的应用程序没有显示任何标记
这是我的代码....
<MapView
initialRegion={region}
maxZoomLevel={17}
region={region}
>
{region.latitude !== 0 ? (
<Marker
minDelta={0.5}
maxDelta={2}
coordinate={{
latitude: region.latitude,
longitude: region.longitude,
}}
title={'You are here!'}
>
<View style={{height:10,width:10}}>
<Image
resizeMode="center"
source={require('../src/images/1.gif')}
/>
</View>
</Marker>
):null}
</MapView>
如何将 gif 添加到标记??
我需要动画标记吗???
试试这个方法
<MapView.Marker
minDelta={0.5}
maxDelta={2}
coordinate={markerInfo.location}>
<Image style={styles.image} source={require('../src/images/1.gif')} />
</MapView.Marker>
我想在标记中将 gip 添加到图像源,我的应用程序没有显示任何标记
这是我的代码....
<MapView
initialRegion={region}
maxZoomLevel={17}
region={region}
>
{region.latitude !== 0 ? (
<Marker
minDelta={0.5}
maxDelta={2}
coordinate={{
latitude: region.latitude,
longitude: region.longitude,
}}
title={'You are here!'}
>
<View style={{height:10,width:10}}>
<Image
resizeMode="center"
source={require('../src/images/1.gif')}
/>
</View>
</Marker>
):null}
</MapView>
如何将 gif 添加到标记?? 我需要动画标记吗???
试试这个方法
<MapView.Marker
minDelta={0.5}
maxDelta={2}
coordinate={markerInfo.location}>
<Image style={styles.image} source={require('../src/images/1.gif')} />
</MapView.Marker>