Art*_*rev 5 openstreetmap react-native react-native-maps
此代码适用于 IOS,但不适用于 Android(模拟器/真实设备)
<MapView region={this.state.region}>
<UrlTile
urlTemplate="http://c.tile.openstreetmap.org/{z}/{x}/{y}.png"
maximumZ={19}
zIndex={99}
/>
</MapView>
Run Code Online (Sandbox Code Playgroud)
不明白问题出在哪里
UrlTile可以正常使用此 url http://tile.stamen.com/terrain/{z}/{x}/{y}.jpg,但不能使用osmurl,http://c.tile.openstreetmap.org/{z}/{x}/{y}.png尽管osmurl 在浏览器中可以工作
小智 3
这似乎是 OSM 的问题,而不是本机反应。我认为您已经得到了答案(https://github.com/react-native-maps/react-native-maps/issues/3747),这可能有助于其他人解决问题。
| 归档时间: |
|
| 查看次数: |
1987 次 |
| 最近记录: |