Class Maps

지도

경로 찾기, 지오코딩, 고도 샘플링 및 정적 지도 생성 지원 이미지

속성

속성유형설명
DirectionFinderDirectionFinderEnums
StaticMapStaticMapEnums

메서드

메서드반환 유형간략한 설명
decodePolyline(polyline)Number[]인코딩된 폴리라인 문자열을 점의 배열로 다시 디코딩합니다.
encodePolyline(points)String점 배열을 문자열로 인코딩합니다.
newDirectionFinder()DirectionFinder새 DirectionFinder 객체를 만듭니다.
newElevationSampler()ElevationSamplerElevationSampler 객체를 만듭니다.
newGeocoder()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]);
}

매개변수

이름유형설명
polylineString디코딩할 인코딩된 폴리라인입니다.

리턴

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);

매개변수

이름유형설명
pointsNumber[]인코딩할 위도/경도 쌍의 배열입니다.

리턴

String - 이러한 점을 나타내는 인코딩된 문자열입니다.

참고 항목


newDirectionFinder()

새 DirectionFinder 객체를 만듭니다.

리턴

DirectionFinder - 새로운 경로 찾기 객체입니다.


newElevationSampler()

ElevationSampler 객체를 만듭니다.

리턴

ElevationSampler - 새로운 고도 샘플러 객체입니다.


newGeocoder()

새 지오코더 객체를 만듭니다.

리턴

Geocoder - 새 지오코더 객체입니다.


newStaticMap()

새 StaticMap 객체를 만듭니다.

리턴

StaticMap - 새 정적 지도 객체입니다.


setAuthentication(clientId, signingKey)

외부에서 설정된 Google Maps API 프리미엄 플랜 계정을 사용할 수 있습니다. 추가 할당량을 활용하여 수당. Google Enterprise에서 클라이언트 ID와 서명 키를 가져올 수 있습니다. 지원 포털 기본 할당량을 사용하도록 되돌리려면 이 값을 null로 설정하세요. 있습니다.

<ph type="x-smartling-placeholder">

Maps.setAuthentication('gme-123456789', 'VhSEZvOXVSdnlxTnpJcUE');

매개변수

이름유형설명
clientIdString클라이언트 식별자입니다.
signingKeyString비공개 서명 키