【发布时间】:2017-01-08 17:21:53
【问题描述】:
所以我试图为 mapbox 设置我的初始中心坐标,所以它们不是 0,0。在 api 上它说 mapbox 需要一个
的道具initialCenterCoordinate object Optional Initial latitude/longitude the map will load at. { latitude:0, longitude: 0 }
所以我在做
<Mapbox
initialCenterCoordinate={latitude: 40.444328, longitude: -79.953155} .... other props/>
这在该行上给我一个错误,说意外令牌,期待 }。
每当我做类似的事情时
<Mapbox
initialCenterCoordinate={{latitude: 40.444328, longitude: -79.953155}} .... other props/>
它仍然将我的初始位置设置为 0,0。有人有什么想法吗?
编辑: 链接到 git hub 页面-https://github.com/mapbox/react-native-mapbox-gl
【问题讨论】:
标签: ios react-native mapbox mapbox-gl react-native-mapbox-gl