ナビゲーション、ジオコーディング、高度のサンプリング、静的な地図画像の作成が可能です。
プロパティ
プロパティ | タイプ | 説明 |
---|---|---|
Direction | Direction | |
Static | Static |
メソッド
メソッド | 戻り値の型 | 概要 |
---|---|---|
decode | Number[] | エンコードされたポリライン文字列をポイントの配列にデコードします。 |
encode | String | ポイントの配列を文字列にエンコードします。 |
new | Direction | 新しい DirectionFinder オブジェクトを作成します。 |
new | Elevation | ElevationSampler オブジェクトを作成します。 |
new | Geocoder | 新しい Geocoder オブジェクトを作成します。 |
new | Static | 新しい StaticMap オブジェクトを作成します。 |
set | void | 外部で設定された Google Maps API プレミアム プラン アカウントを使用できるようにし、追加の割り当て額を利用できるようにします。 |
詳細なドキュメント
decode Polyline(polyline)
エンコードされたポリライン文字列をポイントの配列にデコードします。
// Decodes a string representation of the latitudes and longitudes of // Minneapolis and Milwaukee respectively. const polyline = 'qvkpG`qhxPbgyI_zq_@'; const points = Maps.decodePolyline(polyline); for (let i = 0; i < points.length; i += 2) { Logger.log('%s, %s', points[i], points[i + 1]); }
パラメータ
名前 | 型 | 説明 |
---|---|---|
polyline | String | デコードするエンコードされたポリライン。 |
戻る
Number[]
- 緯度経度ペアの配列(lat0、long0、lat1、long1 など)。
関連情報
encode Polyline(points)
ポイントの配列を文字列にエンコードします。
// The latitudes and longitudes of New York and Boston respectively. const points = [40.77, -73.97, 42.34, -71.04]; const polyline = Maps.encodePolyline(points);
パラメータ
名前 | 型 | 説明 |
---|---|---|
points | Number[] | エンコードする緯度と経度のペアの配列。 |
戻る
String
- これらの点を表すエンコードされた文字列。
関連情報
new Direction Finder()
new Elevation Sampler()
new Geocoder()
new Static Map()
set Authentication(clientId, signingKey)
外部で設定された Google Maps API プレミアム プラン アカウントを使用できるようにし、追加の割り当て額を利用できるようにします。クライアント ID と署名鍵は、Google Enterprise サポート ポータルから取得できます。これらの値を null
に設定して、デフォルトの割り当て使用量に戻します。
Maps.setAuthentication('gme-123456789', 'VhSEZvOXVSdnlxTnpJcUE');
パラメータ
名前 | 型 | 説明 |
---|---|---|
client | String | クライアントの識別子。 |
signing | String | 秘密署名鍵。 |