`React-native-maps` 的指示方向组件
React-native-maps-directions React-native-maps 的路线组件 – 绘制两个坐标之间的路线,由 Google Maps Directions API 提供支持origin: 起始路由的起始位置destination: 起始路由的目的地位置apikey: 你的 Google Maps Directions API 密钥 (请在此处申请一个 密钥; 如果你使用现有的 Google Maps API 密钥,请确保已通过 Google API Console 为该密钥启用 Google Maps Directions API).import MapViewDirections from 'react-native-maps-directions';
const origin = {latitude: 37.3318456, longitude: -122.0296002};
const destination = {latitude: 37.771707, longitude: -122.4053769};
const GOOGLE_MAPS_APIKEY = '…';
| Prop | 类型 | 默认值 | 说明 |
|---|---|---|---|
origin |
LatLng 或 String |
起始位置,用于开始路线规划。 |
暂无开放 Issues,或尚未同步最近议题。