Add in UI Explorer example for showing annotation callouts by default in <MapView>
Reviewed By: martinbigio Differential Revision: D4253281 fbshipit-source-id: b4bd9fedf7042d3d43d2a50bdb7474caa875781f
This commit is contained in:
parent
8117a029cb
commit
946913e9fa
|
@ -242,6 +242,7 @@ class AnnotationExample extends React.Component {
|
|||
|
||||
return (
|
||||
<MapView
|
||||
showsAnnotationCallouts={this.props.showsAnnotationCallouts}
|
||||
style={styles.map}
|
||||
onRegionChangeComplete={onRegionChangeComplete}
|
||||
region={this.state.mapRegion}
|
||||
|
@ -366,6 +367,29 @@ exports.examples = [
|
|||
}}/>;
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'Show callouts by default example',
|
||||
render() {
|
||||
return <AnnotationExample
|
||||
style={styles.map}
|
||||
annotation={{
|
||||
title: 'More Info...',
|
||||
rightCalloutView: (
|
||||
<TouchableOpacity
|
||||
onPress={() => {
|
||||
alert('You Are Here');
|
||||
}}>
|
||||
<Image
|
||||
style={{width:30, height:30}}
|
||||
source={require('./uie_thumb_selected.png')}
|
||||
/>
|
||||
</TouchableOpacity>
|
||||
),
|
||||
}}
|
||||
showsAnnotationCallouts={true}
|
||||
/>;
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'Annotation focus example',
|
||||
render() {
|
||||
|
|
Loading…
Reference in New Issue