【发布时间】:2020-06-02 09:45:54
【问题描述】:
尊敬的先生/女士,我想在我的项目中实现离线 osm map。但我没有找到任何关于如何下载瓷砖以供离线使用的适当文档。我目前正在使用 react-native-maps 包来实现自定义 Tile Overlay
import { LocalTile } from 'react-native-maps';
<MapView
region={this.state.region}
onRegionChange={this.onRegionChange}
>
<LocalTile
/**
* The path template of the locally stored tiles. The patterns {x} {y} {z} will be replaced at runtime
* For example, /storage/emulated/0/mytiles/{z}/{x}/{y}.png
*/
pathTemplate={this.state.pathTemplate}
/**
* The size of provided local tiles (usually 256 or 512).
*/
tileSize={256}
/>
</MapView>
【问题讨论】:
标签: reactjs react-native maps openstreetmap react-native-maps