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