【发布时间】:2021-03-13 14:33:53
【问题描述】:
此代码适用于 IOS,但不适用于 Android(模拟器/真实设备)
<MapView region={this.state.region}>
<UrlTile
urlTemplate="http://c.tile.openstreetmap.org/{z}/{x}/{y}.png"
maximumZ={19}
zIndex={99}
/>
</MapView>
不明白问题出在哪里
UrlTile 可以正常使用此 url http://tile.stamen.com/terrain/{z}/{x}/{y}.jpg 但不能使用 osm url http://c.tile.openstreetmap.org/{z}/{x}/{y}.png 尽管 osm url 可以在浏览器中使用
【问题讨论】:
-
您的问题解决了吗?我遇到了同样的问题。
标签: react-native react-native-android openstreetmap react-native-maps