【问题标题】:react native maps UrlTile is not working with openstreetmap url on Android反应原生地图 UrlTile 不适用于 Android 上的 openstreetmap url
【发布时间】: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 可以在浏览器中使用

安卓: IOS:

【问题讨论】:

  • 您的问题解决了吗?我遇到了同样的问题。

标签: react-native react-native-android openstreetmap react-native-maps


【解决方案1】:

这似乎是 OSM 的问题,而不是本机反应。我想你已经得到了你的答案 (https://github.com/react-native-maps/react-native-maps/issues/3747),这可能有助于其他人解决问题。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-11-16
    • 2023-03-03
    • 2018-08-20
    • 1970-01-01
    • 2016-06-30
    • 2019-12-25
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多