use remote image uri in react-native-maps MapView -


i'm using react-native-maps react-native application. need post image on mapview on map. but, image web. whereas, know local images can added mapview in react-native-maps. know way post image uri in react-native-maps mapview?

i tried

<mapview style={{flex: 1}}                 loadingenabled={true}                 region={this.state.region}                 onregionchangecomplete={this.onregionchangecomplete}>                 <mapview.marker                     coordinate={{latitude: this.props.user_location[0], longitude: this.props.user_location[1]}}                     title={this.props.user_name}                     description={this.props.user_desc}>                    <image source={{uri: 'https://facebook.github.io/react/img/logo_og.png'}} />                </mapview.marker>              </mapview> 

and result

enter image description here

and deleted <image/>

<mapview style={{flex: 1}}                 loadingenabled={true}                 region={this.state.region}                 onregionchangecomplete={this.onregionchangecomplete}>                 <mapview.marker                     coordinate={{latitude: this.props.user_location[0], longitude: this.props.user_location[1]}}                     title={this.props.user_name}                     description={this.props.user_desc}>                </mapview.marker>              </mapview> 

and result

enter image description here

you can try custom marker view

<mapview.marker coordinate={marker.latlng}>   <image source={{uri: 'http://somecustomimageurl' }} /> </mapview.marker> 

Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -