2

ここでは、リアルタイムでパスを描画する最善の方法を研究しています。座標を取得し、先に作成するなど..

ネットワーク内の材料はです。しかし、私は次のことが理解できません。継承の例はたくさんあります Overlay の次に draw() メソッドを実装して描画します。しかし、これは一度きりで、常に描く必要があります。

開始位置を受け取った、終了した、位置が元の位置に変わった、など。どのように?

例。

Google マップで線/パスを 描く Android の Google マップでポイントを解析してルートを描くにはどうすればよいですか?

ありがとう。

4

1 に答える 1

2

まず、タグからGoogle Maps API V2をポイントしていますが、投稿しているリンクはGoogle MapsAPIV1用です。つまり、操作するOverlayオブジェクトがなく、GeoPointも方向位置を表示するために使用する必要のあるオブジェクトではないということです。

Google Maps API V2でできることは、ポリラインを追加/削除して道順を表示することです。これらのポリラインはLatLngポイントを接続します。

ここで、道順を見つけるために、GoogleDirectionAPIを使用できます。道順を見つけてGoogleMapAPIV2に表示する方法に関する投稿は次のとおりです。

GoogleMapSupportMapFragmentで2つのGeoPoint間の運転ルートを描画します

それから、あなたがあなたの場所の更新とあなたの望ましい目的地の更新をどのように実装するかはあなた次第です:

考慮すべき重要事項: Google Maps APIの利用規約では、ルート案内にGoogleMapsAPIを使用することは正式に許可されていません。

Google Maps/Google Earth APIs Terms of Service

  Last updated: May 27, 2009

...

10. License Restrictions. Except as expressly permitted under the Terms, or unless you  
have received prior written authorization from Google (or, as applicable, from the 
provider of particular Content), Google's licenses above are subject to your adherence 
to all of the restrictions below. Except as explicitly permitted in Section 7 or the 
Maps APIs Documentation, you must not (nor may you permit anyone else to):

...

10.9 use the Service or Content with any products, systems, or applications for or in      
connection with:

(a) real time navigation or route guidance, including but not limited to turn-by-turn   
route guidance that is synchronized to the position of a user's sensor-enabled device;


and may be disabled for certain apps (somehow, at least on Android)... FromGeocode 
scraping in .NET conversation:
This is not allowed by the API terms of use. You should not scrape Google Maps to 
generate geocodes. We will block services that do automated queries of our servers.

Bret Taylor

Product Manager, Google Maps
于 2013-03-02T19:44:13.243 に答える