【发布时间】:2019-03-07 19:35:37
【问题描述】:
我想在我的地图屏幕上添加一个搜索栏,然后使用 google 查找与输入文本关联的位置并将地图移动到那里。
这就是我现在拥有的:
import React, { Component } from 'react';
import {
View
} from 'react-native';
import { Mapview } from 'expo';
export default class screen extends Component {
constructor(props) {
super(props);
this.state = {
initialRegion: {
latitude: 37.78825,
longitude: -122.4324,
latitudeDelta: 0.0922,
longitudeDelta: 0.0421,
}
};
}
render() {
return (
<View>
<MapView
style={{ flex: 1 }}
initialRegion={this.state.initialRegion}
/>
</View>
)
}
}
我在react-native-maps 文档中找不到此功能。这是我需要自己构建的东西吗?
【问题讨论】:
标签: react-native expo react-native-maps