【问题标题】:React Native ArcGIS REST solve routeReact Native ArcGIS REST 解决路径
【发布时间】:2018-08-14 00:16:54
【问题描述】:

我为我的机构创建了一个路由网络,该网络发布在 ArcServer 上。我想用 React Native 创建一个移动应用程序,能够将 onpress 坐标作为停靠点,将它们传递到 REST 服务并生成/显示路线,最好是带有方向。

我找到的最接近的一个例子是https://github.com/bramus/react-native-maps-directions。无论如何我用我自己的替换谷歌地图服务?

【问题讨论】:

    标签: rest react-native routing arcgis


    【解决方案1】:

    react-native-maps-directions 的一个特性——我是它的作者——是你可以覆盖 directionsServiceBaseUrl,这是谷歌默认的。

    <MapView initialRegion={…}>
      <MapViewDirections
        origin={origin}
        destination={destination}
        directionsServiceBaseUrl="…"
      />
    </MapView>
    

    请注意 - 目前 - Google 的服务和您的服务之间的输出必须非常相似。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-03-15
      • 1970-01-01
      • 2019-06-30
      • 2019-03-10
      • 2023-02-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多