使用Leaflet线方向的本机地图

问题描述

我已经通过Expo建立了一个带有本机反应的地图。

当前,航班/航迹与传单和“ bezier”模块配合良好。但是,当我尝试搭乘檀香山->东京航班时,路线不正确。实际上,应该从右到左(大约是卡的两端)完成操作,而不是从左到右。

我正在使用网络视图,

<WebView
              geolocationEnabled={true}
              javaScriptEnabled={true}
              source={{
                uri:
                  "https://www.ttt.org/fr/mes-voyages" +
                  "?society_id=" + ttt_SOCIETYID +
                  "&user_id=" + this.state.user_id +
                  "&lang=" + this.state.lang +
                  "&access_token=" + this.state.access_token +
                  "&screen=" + this.state.screen_updated,}}
              originWhitelist={[
                "https://www.ttt.org","https://www.yyy.com",]}
              injectedJavaScript={`const meta = document.createElement('meta');
                meta.setAttribute('content','width=device-width,initial-scale=0.5,maximum-
                scale=0.5,user-scalable=0'); meta.setAttribute('name','viewport');
                document.getElementsByTagName('head')[0].appendChild(meta);`}
              scalesPageToFit={true}
              onMessage={(m) => this.performMessageFromWebView(m)}
              style={{ marginHorizontal: 0,backgroundColor: "transparent" }}
            />

在网络上,我的坐标如下:

function getTrips1() {
       return [                  
                                                                                                                [
       {id: 215,lat: 33.94250107,lng: -118.4079971,deep:"8",popup: "Los Angeles International Airport"},{id: 215,lat: 49.012798,lng: 2.55,popup: "Charles de Gaulle International Airport"}
               ],...
                         

我不知道该如何设置,您有任何线索吗?非常感谢!

解决方法

将360度从您的角度添加到lng,然后它从右到左

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...