GMap.NET C#,没有 Google 距离矩阵的两点之间的距离 Api

GMap.NET C#, distance between 2 points without Google Distance Matrix Api

我正在尝试在 C# 中的 Windows 表单中使用 GMap。我已经创建了准确的路线,但是有没有什么方法可以在 GMaps.NET 中计算路线的距离和持续时间,除了调用 Google 距离矩阵 Api 之外,是否有任何为此目的实现的函数?

我正在寻找的函数名为 "Distance"。 这是获取路线距离的方法:

            inicial = new PointLatLng(googleGeoCoding(txtorigin.Text).Item2,googleGeoCoding(txtorigin.Text).Item3);

            final = new PointLatLng(googleGeoCoding(txtdest.Text).Item2, googleGeoCoding(txtdest.Text).Item3);


            GDirections routedir;
            var routefromtable = GMapProviders.GoogleMap.GetDirections(out routedir, inicial, final, chbxhighways.Checked, chbxtolls.Checked, rbtnwalking.Checked, false, false);

            GMapRoute tablemaproute = new GMapRoute(routedir.Route, "Ruta ubication");

            GMapOverlay tablerouteoverlay = new GMapOverlay("Capa de la ruta");

            tablerouteoverlay.Routes.Add(tablemaproute);

            gMapControl1.Overlays.Add(tablerouteoverlay);
            gMapControl1.Zoom = gMapControl1.Zoom + 1;
            gMapControl1.Zoom = gMapControl1.Zoom - 1;

            double distance = tablemaproute.Distance;
            MessageBox.Show(distance.ToString());