react-native - MapView.Polyline 在 react-native-web-maps 中不起作用
问题描述
在我的 Android 应用程序中,它绘制了折线,但它在 Web 中不起作用。即使在那本故事书中我也找不到任何例子。但在文档中提到它支持折线。
我的代码
<MapView
provider={this.props.provider}
style={styles.map}
initialRegion={this.state.region}
onPress={e => this.onMapPress(e)}
onLayout={()=>console.log('map on layout')}
ref={(ref) => { this.mapRef = ref }}
onRegionChange={this.onRegionChange}
>
<MapView.Marker
coordinate={
{
latitude: 17.43745,
longitude: 78.48229
}
}
title={'pickup Location'}
/>
<MapView.Marker
coordinate={
{
latitude: 17.4049696,
longitude: 78.4043356
}
}
title={'pickup Location'}
pinColor="green"
/>
<MapView.Polyline coordinates={this.dummyCoords} strokeWidth={2} strokeColor={'rgba(r,g,b,0.5)'} fillColor={'rgba(r,g,b,0.5)'}/>
</MapView>
任何人都可以分享示例,我被卡住了。
解决方案
推荐阅读
- azure-machine-learning-studio - Azure ML Python SDK mini_batch_size 在 TabularDataset 的 ParallelRunConfig 上未按预期工作
- tensorflow - 在使用 MaxPoolingWithArgmax2D 和 MaxUnpooling2D 实现 SEGNET 时出现错误
- php - HTML 和 PHP 多复选框表单处理
- c - 为 arr 大小设置运行时 const 值且无错误
- python - 如何在 google colab tensorflow 1.15.2 上训练自定义对象检测模型 ssd_mobilenet_v1_coco 和 ssd_inception_v2_coco?
- android - 即使使用正确的测试用户登录,使用 Facebook 登录也无法正常工作
- regex - 在 Geany IDE 中:如何查找和删除整行
- kubernetes - 我想为 operator.yaml 中部署的所有 Pod 指定调度目的地的节点
- go - 我的应用程序无法在没有将更改推送到远程仓库的情况下导入另一个本地包
- javascript - 将页面导入 App.js 时显示为空白