0

私のコードはすでに2つのポイント間のポリインを取得していますが、Googleマップに表示できるようにしたいのは、あるポイントからAから別のポイントへのポリインに似たルーティング方向です.ルーティング方向を表示する方法についてのアイデア. ポリラインを取得するasp.net c#のコードは次のとおりです。

List<LatLng> Coords = new List<LatLng>();
while (reader.Read())
{
    // perhaps even: lat = reader.GetDouble(0);
    lat = Convert.ToDouble(reader[0].ToString());
    log = Convert.ToDouble(reader[1].ToString());

    // add the next point in the polyline
    Coords.Add(new LatLng(lat, log));
}

GMap.Add(new PolyLine(Coords, Color.Red, 100f, 2, new InfoWindow("")));

// Lastly, identify the center of the polyline and add that point:
GMap.Center = Coords[Coords.Count / 2];
GMap.ZoomLevel = 12;
GMap.Add(new ImageMarker(GMap.Center, " ", new InfoWindow(""), "");

前もって感謝します。

4

1 に答える 1

0

Google には、使用できるルーティング APIがあります。

于 2013-07-02T18:51:30.263 に答える