标签: google-maps-direction-api

Google Directions API

在JSON输出中,在"步骤"内存在字段"操纵".在这个"向左转","向右转","向左转",等等.示例在这里

我在哪里可以找到"机动"字段的定义,以及可能的值列表?有没有相关描述这里

提前致谢

directions google-maps-direction-api

17
推荐指数
3
解决办法
1万
查看次数

我们如何从Google Direction API默认获得从A点到B点的最短距离路线

我们如何从Google Direction API建议的替代路线默认获得从A点到B点的最短距离路线?默认情况下,它根据当前的交通状况为我们提供最短的持续时间路线.我注意到如果你打开"provideRouteAlternatives = true",google会响应多个备用路由,我想知道我们是否可以向Google API发送一个参数,以便它始终返回最短距离路径

directions google-maps-direction-api

9
推荐指数
1
解决办法
3万
查看次数

为什么我在谷歌地图上出现这个错误"无法加载DynamiteLoader:java.lang.ClassNotFoundException:没找到类?

我想在两个纬度经度之间绘制路径.这是我的MapsActivity.java.

    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_maps);
        // Obtain the SupportMapFragment and get notified when the map is ready to be used.
        SupportMapFragment mapFragment = (SupportMapFragment)
getSupportFragmentManager()
                .findFragmentById(R.id.map);
        mapFragment.getMapAsync(this);

        find = (Button) findViewById(R.id.btnFindPath);
        or = (EditText) findViewById(R.id.etOrigin);
        dest = (EditText) findViewById(R.id.etDestination);


        find.setOnClickListener(new View.OnClickListener() {
            @Override

            public void onClick(View view) {

            sendRequest();

            }
        });
    }

    public void sendRequest(){

        String origin = or.getText().toString();
        String destination = dest.getText().toString();

        if(origin.isEmpty()){
            Toast.makeText(this,"Please Enter the Origin" , Toast.LENGTH_SHORT).show();
        }

        if(destination.isEmpty()){
            Toast.makeText(this,"Please Enter the Destination" , …
Run Code Online (Sandbox Code Playgroud)

java android google-maps google-maps-direction-api

9
推荐指数
1
解决办法
1万
查看次数

Android Google Maps Direction Api - Api密钥限制不起作用

在此输入图像描述

当我们为Google Maps Direction Api 设置Key限制NONE时,它运行正常.

但是当我们为Android应用程序设置密钥限制并提供正确的软件包名称和SHA-1证书时 - 它表示请求已从Google Api响应中拒绝.

任何已知的解决方案?

android google-maps google-maps-api-2 google-maps-android-api-2 google-maps-direction-api

8
推荐指数
1
解决办法
3679
查看次数

Google Directions Api返回0条路线

我们正在调用google指令api来计算往返行程值.一般来说它完美无缺.然而,我遇到了一个用例,它无法提出任何路由.但是,当我们使用具有相同origin,destination,waypoints和travelMode的js google.maps.DirectionsService版本时,它可以正常工作.

失败的电话是:https://maps.googleapis.com/maps/api/directions/json?origin = -33.92873,18.458879&destination=-33.92873,18.458879&waypoints= via: -33.9403,18.666731&mode=driving&key=

回应是

{
   "geocoded_waypoints" : [ {}, {}, {} ],
   "routes" : [],
   "status" : "ZERO_RESULTS"
}
Run Code Online (Sandbox Code Playgroud)

javascript google-maps google-maps-api-3 google-maps-direction-api

6
推荐指数
1
解决办法
1539
查看次数

如何将当前流量数据绘制到Google Direction API绘制的特定多边形线上的谷歌地图上

我在Android中创建了一个应用程序,其功能与Google Map相同,可以找到指向特定位置的方向.

我有谷歌方向API收到的从一个地方到另一个地方的绘制路线(折线).我的问题是,我想将当前的流量数据仅放在特定的多边形线上.

如果我们从网上找到方向而不是我们没有获得任何流量数据,但如果我们从移动设备上的谷歌地图应用程序中找到它,那么我们就能看到它.

有谁知道如何解决方案?请给我一个线索!

android google-maps kotlin google-maps-direction-api

5
推荐指数
0
解决办法
178
查看次数

如何从PHP中的Google Maps Direction API解码折线

我从以下URL获得了json响应:

http://maps.googleapis.com/maps/api/directions/json?origin=Chicago,IL&destination=Los%20Angeles,CA&sensor=false

JSON路径routes[x].legs[y].steps[z].polyline.points:

"azq〜FHC {uOAlB jB表示^ P P乙@ V□的|??????【J @为fA XA @ XA H +乙˚F@ TA @的xD H + BNA @ |?????甲@ rB中@ ˚F@ @@ d v□的AXB d @ AZEzA BIjB @Cx @ EzAAlC F F T B˚F@ DhHBhD 5 R升5 R |???????????????CCpDAj @ E | DGnDKzCCb @ OtBa @ rFGfAAb @?@?FAp @?ADbJD|F@bF@@@fERhd@BrEFdDBtBAvBAx@@l@?n@@^@bANnQ?rABnM?jC?hH@fA?@BF?vC?hB?@BpM?@?j @@ p @@ | KB~Q @ pFBbHBvF @ z @?f @@ jB?nA @ z @ DzD @ VJ ~CLfC\| E?B?@ HnANtAVpDRpCLbB ^ dFTxC …

php json directions google-maps-direction-api

2
推荐指数
2
解决办法
1万
查看次数

Google Directions API概述折线不起作用

我正在尝试在Google Maps静态地图上显示来自Google Maps Directions api的路径。路线api调用的网址如下所示:

https://maps.googleapis.com/maps/api/directions/json?origin=lübeck&destination=hamburg&key=MY_API_KEY

我得到一个包含所有信息的有效json响应。然后,我想通过此api调用在静态地图上显示路径概述的编码折线:

https://maps.googleapis.com/maps/api/staticmap?sensor=false&size=860x600&path=enc:THE_ENCODED_POLYLINE
Run Code Online (Sandbox Code Playgroud)

静态地图不会显示路径。我怀疑路线api返回的编码折线格式错误或不完整。如果将返回的编码折线输入到Google的交互式折线解码器中,则会在末尾自动添加“ @”字符。产生的折线将显示在静态地图上,但与方向不匹配。

我在不同城市之间的路径上进行了准确的工作流程,完全没有问题。是否有人对这个示例有什么想法有任何想法。

google-maps polyline google-maps-static-api google-maps-direction-api

0
推荐指数
1
解决办法
1128
查看次数