Places Widgets

PlaceAutocompleteElement 클래스

google.maps.places.PlaceAutocompleteElement 클래스

PlaceAutocompleteElement는 Places Autocomplete API의 UI 구성요소를 제공하는 HTMLElement 하위 클래스입니다.

PlaceAutocompleteElement는 내부적으로 AutocompleteSessionToken를 사용하여 사용자 자동 완성 검색의 쿼리 및 선택 단계를 그룹화합니다.

PlacePrediction.toPlace에서 반환된 Place에서 Place.fetchFields을 처음 호출하면 PlacePrediction를 가져오는 데 사용된 세션 토큰이 자동으로 포함됩니다.

세션 작동 방식에 대한 자세한 내용은 https://developers.google.com/maps/documentation/places/web-service/place-session-tokens을 참고하세요.

맞춤 요소:
<gmp-place-autocomplete included-primary-types="type1 type2 type3..." included-region-codes="c1 c2 c3..." name="string" origin="lat,lng" requested-language="string" requested-region="string" unit-system="metric"></gmp-place-autocomplete>

이 클래스는 HTMLElement를 확장합니다.

이 클래스는 PlaceAutocompleteElementOptions를 구현합니다.

const {PlaceAutocompleteElement} = await google.maps.importLibrary("places")를 호출하여 액세스
Maps JavaScript API의 라이브러리를 참고하세요.

PlaceAutocompleteElement
PlaceAutocompleteElement(options)
매개변수: 
includedPrimaryTypes
유형:  Array<string> optional
기본 장소 유형이 포함됩니다 (예: 'restaurant' 또는 'gas_station').

기본 유형이 이 목록에 포함된 경우에만 장소가 반환됩니다. 최대 5개의 값을 지정할 수 있습니다. 유형을 지정하지 않으면 모든 장소 유형이 반환됩니다.
HTML 속성:
  • <gmp-place-autocomplete included-primary-types="type1 type2 type3..."></gmp-place-autocomplete>
includedRegionCodes
유형:  Array<string> optional
최대 15개의 CLDR 2자리 지역 코드로 지정된 지역의 결과만 포함합니다. 빈 집합은 결과를 제한하지 않습니다. locationRestrictionincludedRegionCodes가 모두 설정된 경우 결과는 교차 영역에 위치합니다.
HTML 속성:
  • <gmp-place-autocomplete included-region-codes="c1 c2 c3..."></gmp-place-autocomplete>
locationBias
유형:  LocationBias optional
장소를 검색할 때 사용할 소프트 경계 또는 힌트입니다.
locationRestriction
유형:  LocationRestriction optional
검색 결과를 제한하는 경계입니다.
name
유형:  string optional
입력 요소에 사용할 이름입니다. 자세한 내용은 https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#name을 참고하세요. 입력의 이름 속성과 동일한 동작을 따릅니다. 양식이 제출될 때 사용되는 이름입니다. 자세한 내용은 https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form을 참고하세요.
HTML 속성:
  • <gmp-place-autocomplete name="string"></gmp-place-autocomplete>
origin
거리를 계산할 원점입니다. 지정하지 않으면 거리가 계산되지 않습니다. 고도가 제공된 경우 계산에 사용되지 않습니다.
HTML 속성:
  • <gmp-place-autocomplete origin="lat,lng"></gmp-place-autocomplete>
  • <gmp-place-autocomplete origin="lat,lng,altitude"></gmp-place-autocomplete>
requestedLanguage
유형:  string optional
가능한 경우 결과를 반환해야 하는 언어의 언어 식별자입니다. 선택한 언어로 된 결과가 더 높은 순위로 표시될 수 있지만 추천은 이 언어로 제한되지 않습니다. 지원 언어 목록을 참조하세요.
HTML 속성:
  • <gmp-place-autocomplete requested-language="string"></gmp-place-autocomplete>
requestedRegion
유형:  string optional
결과 형식 지정 및 결과 필터링에 사용되는 지역 코드입니다. 이 국가로 추천이 제한되지는 않습니다. 지역 코드에는 ccTLD ('최상위 도메인') 2자리 값이 허용됩니다. 대부분의 ccTLD 코드는 ISO 3166-1 코드와 동일하지만 일부 특별한 예외가 있습니다. 예를 들어 영국의 ccTLD는 'uk' (.co.uk)이지만 ISO 3166-1 코드는 'gb' (기술적으로 '그레이트브리튼 북아일랜드 연합왕국'의 법인)입니다.
HTML 속성:
  • <gmp-place-autocomplete requested-region="string"></gmp-place-autocomplete>
unitSystem
유형:  UnitSystem optional
거리를 표시하는 데 사용되는 단위 체계입니다. 지정하지 않으면 단위 시스템이 requestedRegion에 따라 결정됩니다.
HTML 속성:
  • <gmp-place-autocomplete unit-system="metric"></gmp-place-autocomplete>
  • <gmp-place-autocomplete unit-system="imperial"></gmp-place-autocomplete>
prediction-item
단일 예측을 나타내는 예상 검색어 드롭다운의 항목입니다.
prediction-item-icon
예상 검색어 목록에서 각 항목의 왼쪽에 표시되는 아이콘.
prediction-item-main-text
예측의 기본 텍스트인 예측 항목의 일부입니다. 지리적 위치의 경우 '시드니'와 같은 장소 이름이나 '10. King Street'와 같은 도로명과 번지가 포함됩니다. 기본적으로 prediction-item-main-text는 검은색으로 지정됩니다. 예측 항목에 추가 텍스트가 있으면 prediction-item-main-text 외부에 있으며 prediction-item의 스타일을 상속합니다. 기본적으로 색상은 회색으로 지정됩니다. 추가 텍스트는 일반적으로 주소입니다.
prediction-item-match
사용자의 입력과 일치하는 반환된 예상 검색어의 일부. 기본적으로, 일치하는 텍스트는 굵은 텍스트로 강조됩니다. 일치하는 텍스트는 prediction-item 내 어디에나 있을 수 있습니다. 예측 항목 기본 텍스트의 일부일 필요는 없습니다.
prediction-item-selected
사용자가 키보드로 이동한 항목. 참고: 선택된 항목은 이 부분 스타일과 예측 항목 부분 스타일의 영향을 받습니다.
prediction-list
장소 자동완성 서비스가 반환한 예상 검색어 목록을 포함하는 시각적 요소. 이 목록은 PlaceAutocompleteElement 아래 드롭다운 목록으로 표시됩니다.
BetaaddEventListener
addEventListener(type, listener[, options])
매개변수: 
  • typestring 수신할 이벤트 유형을 나타내는 대소문자를 구분하는 문자열입니다.
  • listenerEventListener|EventListenerObject 알림을 수신하는 객체입니다. handleEvent 메서드가 있는 함수 또는 객체여야 합니다.
  • optionsboolean|AddEventListenerOptions optional 옵션을 참고하세요. 맞춤 이벤트는 capturepassive만 지원합니다.
반환 값:  void
지정된 이벤트가 타겟에 전달될 때마다 호출될 함수를 설정합니다. addEventListener를 참고하세요.
BetaremoveEventListener
removeEventListener(type, listener[, options])
매개변수: 
  • typestring 이벤트 리스너를 삭제할 이벤트 유형을 지정하는 문자열입니다.
  • listenerEventListener|EventListenerObject 이벤트 타겟에서 삭제할 이벤트 핸들러의 이벤트 리스너입니다.
  • optionsboolean|EventListenerOptions optional 옵션을 참고하세요.
반환 값:  void
이전에 addEventListener로 등록된 이벤트 리스너를 타겟에서 삭제합니다. removeEventListener을 참고하세요.
gmp-error
function(errorEvent)
인수: 
이 이벤트는 백엔드 요청이 거부된 경우 (예: 잘못된 API 키) 발생합니다. 이 이벤트는 버블링되지 않습니다.
gmp-select
function(placePredictionSelectEvent)
인수: 
이 이벤트는 사용자가 장소 예측을 선택할 때 발생합니다. Place 객체로 변환할 수 있는 PlacePrediction 객체를 포함합니다.

PlaceAutocompleteElementOptions 인터페이스

google.maps.places.PlaceAutocompleteElementOptions 인터페이스

PlaceAutocompleteElement를 생성하기 위한 옵션입니다. 각 속성의 설명은 PlaceAutocompleteElement 클래스의 동일한 이름의 속성을 참고하세요.

locationBias optional
유형:  LocationBias optional
locationRestriction optional
유형:  LocationRestriction optional
name optional
유형:  string optional
requestedLanguage optional
유형:  string optional

PlacePredictionSelectEvent 클래스

google.maps.places.PlacePredictionSelectEvent 클래스

이 이벤트는 사용자가 PlaceAutocompleteElement로 예상 검색어 항목을 선택한 후에 생성됩니다. event.placePrediction로 선택 항목에 액세스합니다.

PlacePrediction.toPlace를 호출하여 placePrediction을 Place로 변환합니다.

이 클래스는 Event를 확장합니다.

const {PlacePredictionSelectEvent} = await google.maps.importLibrary("places")를 호출하여 액세스
Maps JavaScript API의 라이브러리를 참고하세요.

placePrediction
유형:  PlacePrediction
PlacePrediction.toPlace를 호출하여 이를 Place로 변환합니다.

PlaceAutocompleteRequestErrorEvent 클래스

google.maps.places.PlaceAutocompleteRequestErrorEvent 클래스

이 이벤트는 네트워크 요청에 문제가 있을 때 PlaceAutocompleteElement에 의해 발생합니다.

이 클래스는 Event를 확장합니다.

const {PlaceAutocompleteRequestErrorEvent} = await google.maps.importLibrary("places")를 호출하여 액세스
Maps JavaScript API의 라이브러리를 참고하세요.

PlaceContextualElement 클래스

google.maps.places.PlaceContextualElement 클래스

컨텍스트 토큰을 사용하여 Google 지도 그라운딩 응답의 컨텍스트 뷰를 표시하는 위젯입니다.

맞춤 요소:
<gmp-place-contextual context-token="string"></gmp-place-contextual>

이 클래스는 HTMLElement를 확장합니다.

이 클래스는 PlaceContextualElementOptions를 구현합니다.

const {PlaceContextualElement} = await google.maps.importLibrary("places")를 호출하여 액세스
Maps JavaScript API의 라이브러리를 참고하세요.

contextToken
유형:  string optional
컨텍스트 토큰입니다.
HTML 속성:
  • <gmp-place-contextual context-token="string"></gmp-place-contextual>
BetaaddEventListener
addEventListener(type, listener[, options])
매개변수: 
  • typestring 수신할 이벤트 유형을 나타내는 대소문자를 구분하는 문자열입니다.
  • listenerEventListener|EventListenerObject 알림을 수신하는 객체입니다. handleEvent 메서드가 있는 함수 또는 객체여야 합니다.
  • optionsboolean|AddEventListenerOptions optional 옵션을 참고하세요. 맞춤 이벤트는 capturepassive만 지원합니다.
반환 값:  void
지정된 이벤트가 타겟에 전달될 때마다 호출될 함수를 설정합니다. addEventListener를 참고하세요.
BetaremoveEventListener
removeEventListener(type, listener[, options])
매개변수: 
  • typestring 이벤트 리스너를 삭제할 이벤트 유형을 지정하는 문자열입니다.
  • listenerEventListener|EventListenerObject 이벤트 타겟에서 삭제할 이벤트 핸들러의 이벤트 리스너입니다.
  • optionsboolean|EventListenerOptions optional 옵션을 참고하세요.
반환 값:  void
이전에 addEventListener로 등록된 이벤트 리스너를 타겟에서 삭제합니다. removeEventListener을 참고하세요.

PlaceContextualElementOptions 인터페이스

google.maps.places.PlaceContextualElementOptions 인터페이스

PlaceContextualElement 옵션

contextToken optional
유형:  string optional
Google 지도를 사용한 그라운딩 응답에서 제공하는 컨텍스트 토큰입니다.

PlaceContextualListConfigElement 클래스

google.maps.places.PlaceContextualListConfigElement 클래스

장소 컨텍스트 요소의 목록 보기 옵션을 구성하는 HTML 요소입니다.

맞춤 요소:
<gmp-place-contextual-list-config layout="compact" map-hidden></gmp-place-contextual-list-config>

이 클래스는 HTMLElement를 확장합니다.

이 클래스는 PlaceContextualListConfigElementOptions를 구현합니다.

const {PlaceContextualListConfigElement} = await google.maps.importLibrary("places")를 호출하여 액세스
Maps JavaScript API의 라이브러리를 참고하세요.

layout
유형:  PlaceContextualListLayout optional
레이아웃
HTML 속성:
  • <gmp-place-contextual-list-config layout="compact"></gmp-place-contextual-list-config>
  • <gmp-place-contextual-list-config layout="vertical"></gmp-place-contextual-list-config>
mapHidden
유형:  boolean optional
지도가 숨겨져 있는지 여부입니다.
HTML 속성:
  • <gmp-place-contextual-list-config map-hidden></gmp-place-contextual-list-config>
BetaaddEventListener
addEventListener(type, listener[, options])
매개변수: 
  • typestring 수신할 이벤트 유형을 나타내는 대소문자를 구분하는 문자열입니다.
  • listenerEventListener|EventListenerObject 알림을 수신하는 객체입니다. handleEvent 메서드가 있는 함수 또는 객체여야 합니다.
  • optionsboolean|AddEventListenerOptions optional 옵션을 참고하세요. 맞춤 이벤트는 capturepassive만 지원합니다.
반환 값:  void
지정된 이벤트가 타겟에 전달될 때마다 호출될 함수를 설정합니다. addEventListener를 참고하세요.
BetaremoveEventListener
removeEventListener(type, listener[, options])
매개변수: 
  • typestring 이벤트 리스너를 삭제할 이벤트 유형을 지정하는 문자열입니다.
  • listenerEventListener|EventListenerObject 이벤트 타겟에서 삭제할 이벤트 핸들러의 이벤트 리스너입니다.
  • optionsboolean|EventListenerOptions optional 옵션을 참고하세요.
반환 값:  void
이전에 addEventListener로 등록된 이벤트 리스너를 타겟에서 삭제합니다. removeEventListener을 참고하세요.

PlaceContextualListConfigElementOptions 인터페이스

google.maps.places.PlaceContextualListConfigElementOptions 인터페이스

PlaceContextualListConfigElement의 옵션입니다.

layout optional
유형:  PlaceContextualListLayout optional
레이아웃 기본값은 PlaceContextualListLayout.VERTICAL입니다.
mapHidden optional
유형:  boolean optional
지도가 숨겨져 있는지 여부입니다. 기본값은 지도를 표시하는 것입니다 (값 false).

PlaceContextualListLayout 상수

google.maps.places.PlaceContextualListLayout 상수

장소 컨텍스트 요소가 목록 보기에서 지원하는 레이아웃 목록입니다.

const {PlaceContextualListLayout} = await google.maps.importLibrary("places")를 호출하여 액세스
Maps JavaScript API의 라이브러리를 참고하세요.

COMPACT 소형 목록 레이아웃: 목록 항목이 단일 행에 링크로 렌더링되며, 오버플로는 드롭다운 목록에 표시됩니다.
VERTICAL 세로 목록 레이아웃: 목록 항목이 세로 목록의 카드로 렌더링됩니다.

PlaceDetailsElement 클래스

google.maps.places.PlaceDetailsElement 클래스

장소의 세부정보를 표시하는 HTML 요소입니다. configureFromPlace() 또는 configureFromLocation() 메서드를 사용하여 렌더링할 콘텐츠를 지정합니다. 장소 세부정보 요소를 사용하려면 Google Cloud 콘솔에서 프로젝트에 대해 Places UI Kit API를 사용 설정하세요.

맞춤 요소:
<gmp-place-details size="small"></gmp-place-details>

이 클래스는 HTMLElement를 확장합니다.

이 클래스는 PlaceDetailsElementOptions를 구현합니다.

const {PlaceDetailsElement} = await google.maps.importLibrary("places")를 호출하여 액세스
Maps JavaScript API의 라이브러리를 참고하세요.

PlaceDetailsElement
PlaceDetailsElement([options])
매개변수: 
place
유형:  Place optional
읽기 전용입니다. 현재 렌더링된 장소의 ID, 위치, 뷰포트를 포함하는 Place 객체입니다.
size
유형:  PlaceDetailsSize optional
PlaceDetailsElement의 크기 변형입니다. 기본적으로 요소에는 PlaceDetailsSize.X_LARGE이 표시됩니다.
HTML 속성:
  • <gmp-place-details size="small"></gmp-place-details>
  • <gmp-place-details size="medium"></gmp-place-details>
  • <gmp-place-details size="large"></gmp-place-details>
  • <gmp-place-details size="x-large"></gmp-place-details>
BetaaddEventListener
addEventListener(type, listener[, options])
매개변수: 
  • typestring 수신할 이벤트 유형을 나타내는 대소문자를 구분하는 문자열입니다.
  • listenerEventListener|EventListenerObject 알림을 수신하는 객체입니다. handleEvent 메서드가 있는 함수 또는 객체여야 합니다.
  • optionsboolean|AddEventListenerOptions optional 옵션을 참고하세요. 맞춤 이벤트는 capturepassive만 지원합니다.
반환 값:  void
지정된 이벤트가 타겟에 전달될 때마다 호출될 함수를 설정합니다. addEventListener를 참고하세요.
configureFromLocation
configureFromLocation(location)
매개변수: 
반환 값:  Promise<void> 장소 데이터가 로드되고 렌더링되면 처리되는 프로미스입니다.
역 지오코딩을 사용하여 LatLng에서 위젯을 구성합니다.
configureFromPlace
configureFromPlace(place)
매개변수: 
  • placePlace|{id:string} 세부정보를 렌더링할 위치입니다.
반환 값:  Promise<void> 장소 데이터가 로드되고 렌더링되면 처리되는 프로미스입니다.
Place 객체 또는 장소 ID에서 위젯을 구성합니다.
BetaremoveEventListener
removeEventListener(type, listener[, options])
매개변수: 
  • typestring 이벤트 리스너를 삭제할 이벤트 유형을 지정하는 문자열입니다.
  • listenerEventListener|EventListenerObject 이벤트 타겟에서 삭제할 이벤트 핸들러의 이벤트 리스너입니다.
  • optionsboolean|EventListenerOptions optional 옵션을 참고하세요.
반환 값:  void
이전에 addEventListener로 등록된 이벤트 리스너를 타겟에서 삭제합니다. removeEventListener을 참고하세요.
gmp-load
function(event)
인수: 
이 이벤트는 요소가 콘텐츠를 로드하고 렌더링할 때 발생합니다. 이 이벤트는 버블링되지 않습니다.
gmp-requesterror
function(event)
인수: 
이 이벤트는 백엔드 요청이 거부된 경우 (예: 잘못된 API 키) 발생합니다. 이 이벤트는 버블링되지 않습니다.

PlaceDetailsElementOptions 인터페이스

google.maps.places.PlaceDetailsElementOptions 인터페이스

PlaceDetailsElement 옵션

size optional
유형:  PlaceDetailsSize optional

PlaceDetailsSize 상수

google.maps.places.PlaceDetailsSize 상수

PlaceDetailsElement의 크기 옵션입니다.

const {PlaceDetailsSize} = await google.maps.importLibrary("places")를 호출하여 액세스
Maps JavaScript API의 라이브러리를 참고하세요.

LARGE 큰 이미지, 기본 정보, 연락처 정보가 포함된 큰 변형입니다.
MEDIUM 큰 이미지와 기본 정보가 포함된 중간 변형입니다.
SMALL 작은 이미지와 기본 정보가 포함된 작은 변형입니다.
X_LARGE 사진 콜라주, 리뷰, 포괄적인 장소 정보를 포함한 매우 큰 변형입니다.

PlaceDetailsCompactElement 클래스

google.maps.places.PlaceDetailsCompactElement 클래스

장소의 세부정보를 압축 레이아웃으로 표시합니다. 렌더링할 장소를 지정하려면 PlaceDetailsPlaceRequestElement를 추가합니다. PlaceContentConfigElement, PlaceStandardContentElement 또는 PlaceAllContentElement를 추가하여 렌더링할 콘텐츠를 지정합니다.

이 요소를 사용하려면 Google Cloud 콘솔에서 프로젝트에 대해 Places UI Kit API를 사용 설정하세요.

맞춤 요소:
<gmp-place-details-compact orientation="vertical" truncation-preferred></gmp-place-details-compact>

이 클래스는 HTMLElement를 확장합니다.

이 클래스는 PlaceDetailsCompactElementOptions를 구현합니다.

const {PlaceDetailsCompactElement} = await google.maps.importLibrary("places")를 호출하여 액세스
Maps JavaScript API의 라이브러리를 참고하세요.

PlaceDetailsCompactElement
PlaceDetailsCompactElement([options])
매개변수: 
orientation
유형:  PlaceDetailsOrientation optional
기본값: PlaceDetailsOrientation.VERTICAL
요소의 방향 변형 (세로 또는 가로)입니다.
HTML 속성:
  • <gmp-place-details-compact orientation="vertical"></gmp-place-details-compact>
  • <gmp-place-details-compact orientation="horizontal"></gmp-place-details-compact>
place
유형:  Place optional
읽기 전용입니다. 현재 렌더링된 장소의 ID, 위치, 뷰포트를 포함하는 장소 객체입니다.
truncationPreferred
유형:  boolean
기본값: false
true인 경우 줄바꿈 대신 한 줄에 맞게 장소 이름과 주소를 자릅니다.
HTML 속성:
  • <gmp-place-details-compact truncation-preferred></gmp-place-details-compact>
--gmp-mat-color-info
정보 감정이 있는 UI 요소의 색상입니다. 휠체어 아이콘에 사용됩니다.
--gmp-mat-color-negative
부정적인 감정을 가진 UI 요소의 색상입니다. 현재 영업 중 상태의 '영업 종료' 텍스트에 사용됩니다.
--gmp-mat-color-neutral-container
중립 채워진 UI 요소의 컨테이너 색상입니다. 이미지 자리표시자에 사용됩니다.
--gmp-mat-color-on-secondary-container
보조 컨테이너 색상에 대한 텍스트 및 아이콘 색상입니다. '지도에서 열기' 버튼의 텍스트와 아이콘에 사용됩니다.
--gmp-mat-color-on-surface
표면 색상에 대비되는 텍스트 및 아이콘의 색상입니다. 일반 텍스트에 사용됩니다.
--gmp-mat-color-on-surface-variant
표면 색상에 대비되는 텍스트 및 아이콘의 낮은 강조 색상입니다. 덜 강조된 텍스트에 사용됩니다.
--gmp-mat-color-outline-decorative
비대화형 요소의 윤곽선 색상입니다. 요소의 테두리에 사용됩니다.
--gmp-mat-color-positive
긍정적인 감정을 가진 UI 요소의 색상입니다. 현재 영업 중 상태의 '영업 중' 텍스트에 사용됩니다.
--gmp-mat-color-primary
표면 색상에 대한 대화형 텍스트 및 아이콘의 색상입니다. 기여 분석 대화상자의 리뷰 수 및 링크에 사용됩니다.
--gmp-mat-color-secondary-container
색조 버튼과 같은 소극적인 구성요소의 경우 표면에 비해 눈에 덜 띄는 채우기 색상 '지도에서 열기' 버튼의 배경에 사용됩니다.
--gmp-mat-color-surface
배경 색상입니다. 요소 및 저작자 표시 대화상자의 배경에 사용됩니다.
--gmp-mat-font-body-medium
저작자 표시 대화상자의 본문 텍스트에 사용됩니다.
--gmp-mat-font-body-small
장소 주소, 평점, 유형, 가격, 영업 중 상태에 사용됩니다.
--gmp-mat-font-family
모든 텍스트에 사용되는 기본 글꼴 모음입니다.
--gmp-mat-font-headline-medium
저작자 표시 대화상자의 제목 텍스트에 사용됩니다.
--gmp-mat-font-label-large
저작자 표시 대화상자의 '지도에서 열기' 버튼 및 링크에 사용됩니다.
--gmp-mat-font-title-small
장소 이름에 사용됩니다.
background-color
요소의 배경 색상을 재정의합니다.
border
요소의 테두리를 재정의합니다.
border-radius
요소의 테두리 반경을 재정의합니다.
color-scheme
이 요소를 렌더링할 수 있는 색 구성표를 나타냅니다. 자세한 내용은 color-scheme 문서를 참고하세요. 기본값은 color-scheme: light dark입니다.
font-size
요소의 모든 텍스트와 아이콘을 확장합니다. 텍스트와 아이콘은 em으로 내부적으로 정의됩니다. 기본값은 16px입니다.
BetaaddEventListener
addEventListener(type, listener[, options])
매개변수: 
  • typestring 수신할 이벤트 유형을 나타내는 대소문자를 구분하는 문자열입니다.
  • listenerEventListener|EventListenerObject 알림을 수신하는 객체입니다. handleEvent 메서드가 있는 함수 또는 객체여야 합니다.
  • optionsboolean|AddEventListenerOptions optional 옵션을 참고하세요. 맞춤 이벤트는 capturepassive만 지원합니다.
반환 값:  void
지정된 이벤트가 타겟에 전달될 때마다 호출될 함수를 설정합니다. addEventListener를 참고하세요.
BetaremoveEventListener
removeEventListener(type, listener[, options])
매개변수: 
  • typestring 이벤트 리스너를 삭제할 이벤트 유형을 지정하는 문자열입니다.
  • listenerEventListener|EventListenerObject 이벤트 타겟에서 삭제할 이벤트 핸들러의 이벤트 리스너입니다.
  • optionsboolean|EventListenerOptions optional 옵션을 참고하세요.
반환 값:  void
이전에 addEventListener로 등록된 이벤트 리스너를 타겟에서 삭제합니다. removeEventListener을 참고하세요.
gmp-error
function(event)
인수: 
이 이벤트는 백엔드 요청이 거부된 경우 (예: 잘못된 API 키) 발생합니다. 이 이벤트는 버블링되지 않습니다.
gmp-load
function(event)
인수: 
이 이벤트는 요소가 콘텐츠를 로드하고 렌더링할 때 발생합니다. 이 이벤트는 버블링되지 않습니다.

PlaceDetailsCompactElementOptions 인터페이스

google.maps.places.PlaceDetailsCompactElementOptions 인터페이스

PlaceDetailsCompactElement 옵션

orientation optional
유형:  PlaceDetailsOrientation optional
truncationPreferred optional
유형:  boolean optional

PlaceDetailsOrientation 상수

google.maps.places.PlaceDetailsOrientation 상수

PlaceDetailsCompactElement의 방향 변형입니다.

const {PlaceDetailsOrientation} = await google.maps.importLibrary("places")를 호출하여 액세스
Maps JavaScript API의 라이브러리를 참고하세요.

HORIZONTAL 가로 방향입니다.
VERTICAL 세로 방향입니다.

PlaceDetailsPlaceRequestElement 클래스

google.maps.places.PlaceDetailsPlaceRequestElement 클래스

장소 객체, ID 또는 리소스 이름을 기반으로 데이터를 로드하도록 장소 세부정보 콤팩트 요소를 구성합니다. 이 요소를 PlaceDetailsCompactElement의 하위 요소로 추가하여 지정된 장소의 데이터를 로드합니다.

맞춤 요소:
<gmp-place-details-place-request place="some-place-id"></gmp-place-details-place-request>

이 클래스는 HTMLElement를 확장합니다.

이 클래스는 PlaceDetailsPlaceRequestElementOptions를 구현합니다.

const {PlaceDetailsPlaceRequestElement} = await google.maps.importLibrary("places")를 호출하여 액세스
Maps JavaScript API의 라이브러리를 참고하세요.

PlaceDetailsPlaceRequestElement
PlaceDetailsPlaceRequestElement([options])
매개변수: 
place
유형:  Place optional
장소 세부정보 컴팩트 요소에 세부정보를 렌더링할 장소 객체, ID 또는 리소스 이름입니다. 이 속성은 리소스 이름으로 속성에 반영됩니다.
HTML 속성:
  • <gmp-place-details-place-request place="some-place-id"></gmp-place-details-place-request>
BetaaddEventListener
addEventListener(type, listener[, options])
매개변수: 
  • typestring 수신할 이벤트 유형을 나타내는 대소문자를 구분하는 문자열입니다.
  • listenerEventListener|EventListenerObject 알림을 수신하는 객체입니다. handleEvent 메서드가 있는 함수 또는 객체여야 합니다.
  • optionsboolean|AddEventListenerOptions optional 옵션을 참고하세요. 맞춤 이벤트는 capturepassive만 지원합니다.
반환 값:  void
지정된 이벤트가 타겟에 전달될 때마다 호출될 함수를 설정합니다. addEventListener를 참고하세요.
BetaremoveEventListener
removeEventListener(type, listener[, options])
매개변수: 
  • typestring 이벤트 리스너를 삭제할 이벤트 유형을 지정하는 문자열입니다.
  • listenerEventListener|EventListenerObject 이벤트 타겟에서 삭제할 이벤트 핸들러의 이벤트 리스너입니다.
  • optionsboolean|EventListenerOptions optional 옵션을 참고하세요.
반환 값:  void
이전에 addEventListener로 등록된 이벤트 리스너를 타겟에서 삭제합니다. removeEventListener을 참고하세요.

PlaceDetailsPlaceRequestElementOptions 인터페이스

google.maps.places.PlaceDetailsPlaceRequestElementOptions 인터페이스

PlaceDetailsPlaceRequestElement 옵션

place optional
유형:  Place|string optional

PlaceContentConfigElement 클래스

google.maps.places.PlaceContentConfigElement 클래스

장소 세부정보 컴팩트 요소에 표시할 콘텐츠를 구성합니다. 이 요소를 PlaceDetailsCompactElement의 하위 요소로 추가하여 사용합니다. PlaceContentConfigElement에 다음 요소 중 하나를 추가하여 해당 콘텐츠를 표시합니다.
PlaceMediaElement, PlaceAddressElement, PlaceRatingElement, PlaceTypeElement, PlacePriceElement, PlaceAccessibleEntranceIconElement, PlaceOpenNowStatusElement, PlaceAttributionElement
자식의 순서는 중요하지 않습니다. 요소는 맞춤설정할 수 없는 표준 순서로 콘텐츠를 렌더링합니다.

맞춤 요소:
<gmp-place-content-config></gmp-place-content-config>

이 클래스는 HTMLElement를 확장합니다.

이 클래스는 PlaceContentConfigElementOptions를 구현합니다.

const {PlaceContentConfigElement} = await google.maps.importLibrary("places")를 호출하여 액세스
Maps JavaScript API의 라이브러리를 참고하세요.

PlaceContentConfigElement
PlaceContentConfigElement([options])
매개변수: 
BetaaddEventListener
addEventListener(type, listener[, options])
매개변수: 
  • typestring 수신할 이벤트 유형을 나타내는 대소문자를 구분하는 문자열입니다.
  • listenerEventListener|EventListenerObject 알림을 수신하는 객체입니다. handleEvent 메서드가 있는 함수 또는 객체여야 합니다.
  • optionsboolean|AddEventListenerOptions optional 옵션을 참고하세요. 맞춤 이벤트는 capturepassive만 지원합니다.
반환 값:  void
지정된 이벤트가 타겟에 전달될 때마다 호출될 함수를 설정합니다. addEventListener를 참고하세요.
BetaremoveEventListener
removeEventListener(type, listener[, options])
매개변수: 
  • typestring 이벤트 리스너를 삭제할 이벤트 유형을 지정하는 문자열입니다.
  • listenerEventListener|EventListenerObject 이벤트 타겟에서 삭제할 이벤트 핸들러의 이벤트 리스너입니다.
  • optionsboolean|EventListenerOptions optional 옵션을 참고하세요.
반환 값:  void
이전에 addEventListener로 등록된 이벤트 리스너를 타겟에서 삭제합니다. removeEventListener을 참고하세요.

PlaceContentConfigElementOptions 인터페이스

google.maps.places.PlaceContentConfigElementOptions 인터페이스

PlaceContentConfigElement 옵션

PlaceMediaElement 클래스

google.maps.places.PlaceMediaElement 클래스

사진과 같은 장소의 미디어를 표시하도록 장소 세부정보 컴팩트 요소를 구성합니다. 이 요소를 PlaceContentConfigElement의 하위 요소로 추가하여 사용합니다.

맞춤 요소:
<gmp-place-media lightbox-preferred></gmp-place-media>

이 클래스는 HTMLElement를 확장합니다.

이 클래스는 PlaceMediaElementOptions를 구현합니다.

const {PlaceMediaElement} = await google.maps.importLibrary("places")를 호출하여 액세스
Maps JavaScript API의 라이브러리를 참고하세요.

PlaceMediaElement
PlaceMediaElement([options])
매개변수: 
lightboxPreferred
유형:  boolean optional
기본값: false
두 옵션이 모두 지원되는 경우 미디어 라이트박스를 사용 설정할지 사용 중지할지 여부입니다.
HTML 속성:
  • <gmp-place-media lightbox-preferred></gmp-place-media>
BetaaddEventListener
addEventListener(type, listener[, options])
매개변수: 
  • typestring 수신할 이벤트 유형을 나타내는 대소문자를 구분하는 문자열입니다.
  • listenerEventListener|EventListenerObject 알림을 수신하는 객체입니다. handleEvent 메서드가 있는 함수 또는 객체여야 합니다.
  • optionsboolean|AddEventListenerOptions optional 옵션을 참고하세요. 맞춤 이벤트는 capturepassive만 지원합니다.
반환 값:  void
지정된 이벤트가 타겟에 전달될 때마다 호출될 함수를 설정합니다. addEventListener를 참고하세요.
BetaremoveEventListener
removeEventListener(type, listener[, options])
매개변수: 
  • typestring 이벤트 리스너를 삭제할 이벤트 유형을 지정하는 문자열입니다.
  • listenerEventListener|EventListenerObject 이벤트 타겟에서 삭제할 이벤트 핸들러의 이벤트 리스너입니다.
  • optionsboolean|EventListenerOptions optional 옵션을 참고하세요.
반환 값:  void
이전에 addEventListener로 등록된 이벤트 리스너를 타겟에서 삭제합니다. removeEventListener을 참고하세요.

PlaceMediaElementOptions 인터페이스

google.maps.places.PlaceMediaElementOptions 인터페이스

PlaceMediaElement 옵션

lightboxPreferred optional
유형:  boolean optional

PlaceAddressElement 클래스

google.maps.places.PlaceAddressElement 클래스

장소의 주소를 표시하도록 장소 세부정보 컴팩트 요소를 구성합니다. 이 요소를 PlaceContentConfigElement의 하위 요소로 추가하여 사용합니다.

맞춤 요소:
<gmp-place-address></gmp-place-address>

이 클래스는 HTMLElement를 확장합니다.

이 클래스는 PlaceAddressElementOptions를 구현합니다.

const {PlaceAddressElement} = await google.maps.importLibrary("places")를 호출하여 액세스
Maps JavaScript API의 라이브러리를 참고하세요.

PlaceAddressElement
PlaceAddressElement([options])
매개변수: 
BetaaddEventListener
addEventListener(type, listener[, options])
매개변수: 
  • typestring 수신할 이벤트 유형을 나타내는 대소문자를 구분하는 문자열입니다.
  • listenerEventListener|EventListenerObject 알림을 수신하는 객체입니다. handleEvent 메서드가 있는 함수 또는 객체여야 합니다.
  • optionsboolean|AddEventListenerOptions optional 옵션을 참고하세요. 맞춤 이벤트는 capturepassive만 지원합니다.
반환 값:  void
지정된 이벤트가 타겟에 전달될 때마다 호출될 함수를 설정합니다. addEventListener를 참고하세요.
BetaremoveEventListener
removeEventListener(type, listener[, options])
매개변수: 
  • typestring 이벤트 리스너를 삭제할 이벤트 유형을 지정하는 문자열입니다.
  • listenerEventListener|EventListenerObject 이벤트 타겟에서 삭제할 이벤트 핸들러의 이벤트 리스너입니다.
  • optionsboolean|EventListenerOptions optional 옵션을 참고하세요.
반환 값:  void
이전에 addEventListener로 등록된 이벤트 리스너를 타겟에서 삭제합니다. removeEventListener을 참고하세요.

PlaceAddressElementOptions 인터페이스

google.maps.places.PlaceAddressElementOptions 인터페이스

PlaceAddressElement 옵션

PlaceRatingElement 클래스

google.maps.places.PlaceRatingElement 클래스

장소의 평점을 표시하도록 장소 세부정보 컴팩트 요소를 구성합니다. 이 요소를 PlaceContentConfigElement의 하위 요소로 추가하여 사용합니다.

맞춤 요소:
<gmp-place-rating></gmp-place-rating>

이 클래스는 HTMLElement를 확장합니다.

이 클래스는 PlaceRatingElementOptions를 구현합니다.

const {PlaceRatingElement} = await google.maps.importLibrary("places")를 호출하여 액세스
Maps JavaScript API의 라이브러리를 참고하세요.

PlaceRatingElement
PlaceRatingElement([options])
매개변수: 
BetaaddEventListener
addEventListener(type, listener[, options])
매개변수: 
  • typestring 수신할 이벤트 유형을 나타내는 대소문자를 구분하는 문자열입니다.
  • listenerEventListener|EventListenerObject 알림을 수신하는 객체입니다. handleEvent 메서드가 있는 함수 또는 객체여야 합니다.
  • optionsboolean|AddEventListenerOptions optional 옵션을 참고하세요. 맞춤 이벤트는 capturepassive만 지원합니다.
반환 값:  void
지정된 이벤트가 타겟에 전달될 때마다 호출될 함수를 설정합니다. addEventListener를 참고하세요.
BetaremoveEventListener
removeEventListener(type, listener[, options])
매개변수: 
  • typestring 이벤트 리스너를 삭제할 이벤트 유형을 지정하는 문자열입니다.
  • listenerEventListener|EventListenerObject 이벤트 타겟에서 삭제할 이벤트 핸들러의 이벤트 리스너입니다.
  • optionsboolean|EventListenerOptions optional 옵션을 참고하세요.
반환 값:  void
이전에 addEventListener로 등록된 이벤트 리스너를 타겟에서 삭제합니다. removeEventListener을 참고하세요.

PlaceRatingElementOptions 인터페이스

google.maps.places.PlaceRatingElementOptions 인터페이스

PlaceRatingElement 옵션

PlaceTypeElement 클래스

google.maps.places.PlaceTypeElement 클래스

장소의 유형을 표시하도록 장소 세부정보 컴팩트 요소를 구성합니다. 이 요소를 PlaceContentConfigElement의 하위 요소로 추가하여 사용합니다.

맞춤 요소:
<gmp-place-type></gmp-place-type>

이 클래스는 HTMLElement를 확장합니다.

이 클래스는 PlaceTypeElementOptions를 구현합니다.

const {PlaceTypeElement} = await google.maps.importLibrary("places")를 호출하여 액세스
Maps JavaScript API의 라이브러리를 참고하세요.

PlaceTypeElement
PlaceTypeElement([options])
매개변수: 
BetaaddEventListener
addEventListener(type, listener[, options])
매개변수: 
  • typestring 수신할 이벤트 유형을 나타내는 대소문자를 구분하는 문자열입니다.
  • listenerEventListener|EventListenerObject 알림을 수신하는 객체입니다. handleEvent 메서드가 있는 함수 또는 객체여야 합니다.
  • optionsboolean|AddEventListenerOptions optional 옵션을 참고하세요. 맞춤 이벤트는 capturepassive만 지원합니다.
반환 값:  void
지정된 이벤트가 타겟에 전달될 때마다 호출될 함수를 설정합니다. addEventListener를 참고하세요.
BetaremoveEventListener
removeEventListener(type, listener[, options])
매개변수: 
  • typestring 이벤트 리스너를 삭제할 이벤트 유형을 지정하는 문자열입니다.
  • listenerEventListener|EventListenerObject 이벤트 타겟에서 삭제할 이벤트 핸들러의 이벤트 리스너입니다.
  • optionsboolean|EventListenerOptions optional 옵션을 참고하세요.
반환 값:  void
이전에 addEventListener로 등록된 이벤트 리스너를 타겟에서 삭제합니다. removeEventListener을 참고하세요.

PlaceTypeElementOptions 인터페이스

google.maps.places.PlaceTypeElementOptions 인터페이스

PlaceTypeElement 옵션

PlacePriceElement 클래스

google.maps.places.PlacePriceElement 클래스

장소의 가격 수준 또는 가격 범위를 표시하도록 장소 세부정보 컴팩트 요소를 구성합니다. 이 요소를 PlaceContentConfigElement의 하위 요소로 추가하여 사용합니다.

맞춤 요소:
<gmp-place-price></gmp-place-price>

이 클래스는 HTMLElement를 확장합니다.

이 클래스는 PlacePriceElementOptions를 구현합니다.

const {PlacePriceElement} = await google.maps.importLibrary("places")를 호출하여 액세스
Maps JavaScript API의 라이브러리를 참고하세요.

PlacePriceElement
PlacePriceElement([options])
매개변수: 
BetaaddEventListener
addEventListener(type, listener[, options])
매개변수: 
  • typestring 수신할 이벤트 유형을 나타내는 대소문자를 구분하는 문자열입니다.
  • listenerEventListener|EventListenerObject 알림을 수신하는 객체입니다. handleEvent 메서드가 있는 함수 또는 객체여야 합니다.
  • optionsboolean|AddEventListenerOptions optional 옵션을 참고하세요. 맞춤 이벤트는 capturepassive만 지원합니다.
반환 값:  void
지정된 이벤트가 타겟에 전달될 때마다 호출될 함수를 설정합니다. addEventListener를 참고하세요.
BetaremoveEventListener
removeEventListener(type, listener[, options])
매개변수: 
  • typestring 이벤트 리스너를 삭제할 이벤트 유형을 지정하는 문자열입니다.
  • listenerEventListener|EventListenerObject 이벤트 타겟에서 삭제할 이벤트 핸들러의 이벤트 리스너입니다.
  • optionsboolean|EventListenerOptions optional 옵션을 참고하세요.
반환 값:  void
이전에 addEventListener로 등록된 이벤트 리스너를 타겟에서 삭제합니다. removeEventListener을 참고하세요.

PlacePriceElementOptions 인터페이스

google.maps.places.PlacePriceElementOptions 인터페이스

PlacePriceElement 옵션

PlaceAccessibleEntranceIconElement 클래스

google.maps.places.PlaceAccessibleEntranceIconElement 클래스

장소에 휠체어 진입로가 있는 경우 휠체어 아이콘을 표시하도록 장소 세부정보 컴팩트 요소를 구성합니다. 이 요소를 PlaceContentConfigElement의 하위 요소로 추가하여 사용합니다.

맞춤 요소:
<gmp-place-accessible-entrance-icon></gmp-place-accessible-entrance-icon>

이 클래스는 HTMLElement를 확장합니다.

이 클래스는 PlaceAccessibleEntranceIconElementOptions를 구현합니다.

const {PlaceAccessibleEntranceIconElement} = await google.maps.importLibrary("places")를 호출하여 액세스
Maps JavaScript API의 라이브러리를 참고하세요.

PlaceAccessibleEntranceIconElement
PlaceAccessibleEntranceIconElement([options])
매개변수: 
BetaaddEventListener
addEventListener(type, listener[, options])
매개변수: 
  • typestring 수신할 이벤트 유형을 나타내는 대소문자를 구분하는 문자열입니다.
  • listenerEventListener|EventListenerObject 알림을 수신하는 객체입니다. handleEvent 메서드가 있는 함수 또는 객체여야 합니다.
  • optionsboolean|AddEventListenerOptions optional 옵션을 참고하세요. 맞춤 이벤트는 capturepassive만 지원합니다.
반환 값:  void
지정된 이벤트가 타겟에 전달될 때마다 호출될 함수를 설정합니다. addEventListener를 참고하세요.
BetaremoveEventListener
removeEventListener(type, listener[, options])
매개변수: 
  • typestring 이벤트 리스너를 삭제할 이벤트 유형을 지정하는 문자열입니다.
  • listenerEventListener|EventListenerObject 이벤트 타겟에서 삭제할 이벤트 핸들러의 이벤트 리스너입니다.
  • optionsboolean|EventListenerOptions optional 옵션을 참고하세요.
반환 값:  void
이전에 addEventListener로 등록된 이벤트 리스너를 타겟에서 삭제합니다. removeEventListener을 참고하세요.

PlaceAccessibleEntranceIconElementOptions 인터페이스

google.maps.places.PlaceAccessibleEntranceIconElementOptions 인터페이스

PlaceAccessibleEntranceIconElement 옵션

PlaceOpenNowStatusElement 클래스

google.maps.places.PlaceOpenNowStatusElement 클래스

장소의 현재 영업 또는 휴업 상태를 표시하도록 장소 세부정보 Compact 요소를 구성합니다. 이 요소를 PlaceContentConfigElement의 하위 요소로 추가하여 사용합니다.

맞춤 요소:
<gmp-place-open-now-status></gmp-place-open-now-status>

이 클래스는 HTMLElement를 확장합니다.

이 클래스는 PlaceOpenNowStatusElementOptions를 구현합니다.

const {PlaceOpenNowStatusElement} = await google.maps.importLibrary("places")를 호출하여 액세스
Maps JavaScript API의 라이브러리를 참고하세요.

PlaceOpenNowStatusElement
PlaceOpenNowStatusElement([options])
매개변수: 
BetaaddEventListener
addEventListener(type, listener[, options])
매개변수: 
  • typestring 수신할 이벤트 유형을 나타내는 대소문자를 구분하는 문자열입니다.
  • listenerEventListener|EventListenerObject 알림을 수신하는 객체입니다. handleEvent 메서드가 있는 함수 또는 객체여야 합니다.
  • optionsboolean|AddEventListenerOptions optional 옵션을 참고하세요. 맞춤 이벤트는 capturepassive만 지원합니다.
반환 값:  void
지정된 이벤트가 타겟에 전달될 때마다 호출될 함수를 설정합니다. addEventListener를 참고하세요.
BetaremoveEventListener
removeEventListener(type, listener[, options])
매개변수: 
  • typestring 이벤트 리스너를 삭제할 이벤트 유형을 지정하는 문자열입니다.
  • listenerEventListener|EventListenerObject 이벤트 타겟에서 삭제할 이벤트 핸들러의 이벤트 리스너입니다.
  • optionsboolean|EventListenerOptions optional 옵션을 참고하세요.
반환 값:  void
이전에 addEventListener로 등록된 이벤트 리스너를 타겟에서 삭제합니다. removeEventListener을 참고하세요.

PlaceOpenNowStatusElementOptions 인터페이스

google.maps.places.PlaceOpenNowStatusElementOptions 인터페이스

PlaceOpenNowStatusElement 옵션

PlaceAttributionElement 클래스

google.maps.places.PlaceAttributionElement 클래스

장소 세부정보 콤팩트 요소에서 Google 지도 저작자 표시 텍스트를 맞춤설정할 수 있습니다. 이 요소를 PlaceContentConfigElement의 하위 요소로 추가하여 사용합니다. 이 요소를 생략하면 기본 색상으로 저작자 표시가 계속 표시됩니다.

맞춤 요소:
<gmp-place-attribution dark-scheme-color="white" light-scheme-color="white"></gmp-place-attribution>

이 클래스는 HTMLElement를 확장합니다.

이 클래스는 PlaceAttributionElementOptions를 구현합니다.

const {PlaceAttributionElement} = await google.maps.importLibrary("places")를 호출하여 액세스
Maps JavaScript API의 라이브러리를 참고하세요.

PlaceAttributionElement
PlaceAttributionElement([options])
매개변수: 
darkSchemeColor
유형:  AttributionColor optional
기본값: AttributionColor.WHITE
어두운 모드에서 Google 지도 저작자 표시의 색상입니다.
HTML 속성:
  • <gmp-place-attribution dark-scheme-color="white"></gmp-place-attribution>
  • <gmp-place-attribution dark-scheme-color="black"></gmp-place-attribution>
  • <gmp-place-attribution dark-scheme-color="gray"></gmp-place-attribution>
lightSchemeColor
유형:  AttributionColor optional
기본값: AttributionColor.GRAY
밝은 모드에서 Google 지도 저작자 표시의 색상입니다.
HTML 속성:
  • <gmp-place-attribution light-scheme-color="white"></gmp-place-attribution>
  • <gmp-place-attribution light-scheme-color="black"></gmp-place-attribution>
  • <gmp-place-attribution light-scheme-color="gray"></gmp-place-attribution>
BetaaddEventListener
addEventListener(type, listener[, options])
매개변수: 
  • typestring 수신할 이벤트 유형을 나타내는 대소문자를 구분하는 문자열입니다.
  • listenerEventListener|EventListenerObject 알림을 수신하는 객체입니다. handleEvent 메서드가 있는 함수 또는 객체여야 합니다.
  • optionsboolean|AddEventListenerOptions optional 옵션을 참고하세요. 맞춤 이벤트는 capturepassive만 지원합니다.
반환 값:  void
지정된 이벤트가 타겟에 전달될 때마다 호출될 함수를 설정합니다. addEventListener를 참고하세요.
BetaremoveEventListener
removeEventListener(type, listener[, options])
매개변수: 
  • typestring 이벤트 리스너를 삭제할 이벤트 유형을 지정하는 문자열입니다.
  • listenerEventListener|EventListenerObject 이벤트 타겟에서 삭제할 이벤트 핸들러의 이벤트 리스너입니다.
  • optionsboolean|EventListenerOptions optional 옵션을 참고하세요.
반환 값:  void
이전에 addEventListener로 등록된 이벤트 리스너를 타겟에서 삭제합니다. removeEventListener을 참고하세요.

PlaceAttributionElementOptions 인터페이스

google.maps.places.PlaceAttributionElementOptions 인터페이스

PlaceAttributionElement 옵션

darkSchemeColor optional
유형:  AttributionColor optional
lightSchemeColor optional
유형:  AttributionColor optional

AttributionColor 상수

google.maps.places.AttributionColor 상수

Google 지도 저작자 표시 텍스트의 색상 옵션입니다. 이러한 색상을 사용하도록 저작자 표시를 맞춤설정할 수 있습니다.

const {AttributionColor} = await google.maps.importLibrary("places")를 호출하여 액세스
Maps JavaScript API의 라이브러리를 참고하세요.

BLACK 검은색 저작자 표시 텍스트
GRAY 회색 저작자 표시 텍스트
WHITE 흰색 저작자 표시 텍스트

PlaceAllContentElement 클래스

google.maps.places.PlaceAllContentElement 클래스

사용 가능한 모든 콘텐츠를 표시하도록 장소 세부정보 컴팩트 요소를 구성합니다. 이 요소를 PlaceDetailsCompactElement의 하위 요소로 추가하여 사용합니다.

맞춤 요소:
<gmp-place-all-content></gmp-place-all-content>

이 클래스는 HTMLElement를 확장합니다.

이 클래스는 PlaceAllContentElementOptions를 구현합니다.

const {PlaceAllContentElement} = await google.maps.importLibrary("places")를 호출하여 액세스
Maps JavaScript API의 라이브러리를 참고하세요.

PlaceAllContentElement
PlaceAllContentElement([options])
매개변수: 
BetaaddEventListener
addEventListener(type, listener[, options])
매개변수: 
  • typestring 수신할 이벤트 유형을 나타내는 대소문자를 구분하는 문자열입니다.
  • listenerEventListener|EventListenerObject 알림을 수신하는 객체입니다. handleEvent 메서드가 있는 함수 또는 객체여야 합니다.
  • optionsboolean|AddEventListenerOptions optional 옵션을 참고하세요. 맞춤 이벤트는 capturepassive만 지원합니다.
반환 값:  void
지정된 이벤트가 타겟에 전달될 때마다 호출될 함수를 설정합니다. addEventListener를 참고하세요.
BetaremoveEventListener
removeEventListener(type, listener[, options])
매개변수: 
  • typestring 이벤트 리스너를 삭제할 이벤트 유형을 지정하는 문자열입니다.
  • listenerEventListener|EventListenerObject 이벤트 타겟에서 삭제할 이벤트 핸들러의 이벤트 리스너입니다.
  • optionsboolean|EventListenerOptions optional 옵션을 참고하세요.
반환 값:  void
이전에 addEventListener로 등록된 이벤트 리스너를 타겟에서 삭제합니다. removeEventListener을 참고하세요.

PlaceAllContentElementOptions 인터페이스

google.maps.places.PlaceAllContentElementOptions 인터페이스

PlaceAllContentElement 옵션

PlaceStandardContentElement 클래스

google.maps.places.PlaceStandardContentElement 클래스

표준 콘텐츠 세트 (미디어, 등급, 유형, 가격, 접근 가능한 입구 아이콘, 현재 영업 중 상태)를 표시하도록 장소 세부정보 컴팩트 요소를 구성합니다. 이 요소를 PlaceDetailsCompactElement의 하위 요소로 추가하여 사용합니다.

맞춤 요소:
<gmp-place-standard-content></gmp-place-standard-content>

이 클래스는 HTMLElement를 확장합니다.

이 클래스는 PlaceStandardContentElementOptions를 구현합니다.

const {PlaceStandardContentElement} = await google.maps.importLibrary("places")를 호출하여 액세스
Maps JavaScript API의 라이브러리를 참고하세요.

PlaceStandardContentElement
PlaceStandardContentElement([options])
매개변수: 
BetaaddEventListener
addEventListener(type, listener[, options])
매개변수: 
  • typestring 수신할 이벤트 유형을 나타내는 대소문자를 구분하는 문자열입니다.
  • listenerEventListener|EventListenerObject 알림을 수신하는 객체입니다. handleEvent 메서드가 있는 함수 또는 객체여야 합니다.
  • optionsboolean|AddEventListenerOptions optional 옵션을 참고하세요. 맞춤 이벤트는 capturepassive만 지원합니다.
반환 값:  void
지정된 이벤트가 타겟에 전달될 때마다 호출될 함수를 설정합니다. addEventListener를 참고하세요.
BetaremoveEventListener
removeEventListener(type, listener[, options])
매개변수: 
  • typestring 이벤트 리스너를 삭제할 이벤트 유형을 지정하는 문자열입니다.
  • listenerEventListener|EventListenerObject 이벤트 타겟에서 삭제할 이벤트 핸들러의 이벤트 리스너입니다.
  • optionsboolean|EventListenerOptions optional 옵션을 참고하세요.
반환 값:  void
이전에 addEventListener로 등록된 이벤트 리스너를 타겟에서 삭제합니다. removeEventListener을 참고하세요.

PlaceStandardContentElementOptions 인터페이스

google.maps.places.PlaceStandardContentElementOptions 인터페이스

PlaceStandardContentElement 옵션

PlaceListElement 클래스

google.maps.places.PlaceListElement 클래스

장소 검색 결과를 목록에 표시하는 HTML 요소입니다. configureFromSearchByTextRequest() 또는 configureFromSearchNearbyRequest() 메서드를 사용하여 결과를 렌더링할 요청을 지정합니다. 장소 목록 요소를 사용하려면 Google Cloud 콘솔에서 프로젝트에 Places UI Kit API를 사용 설정하세요.

맞춤 요소:
<gmp-place-list selectable></gmp-place-list>

이 클래스는 HTMLElement를 확장합니다.

이 클래스는 PlaceListElementOptions를 구현합니다.

const {PlaceListElement} = await google.maps.importLibrary("places")를 호출하여 액세스
Maps JavaScript API의 라이브러리를 참고하세요.

PlaceListElement
PlaceListElement([options])
매개변수: 
places
유형:  Array<Place>
읽기 전용입니다. 현재 렌더링된 장소의 ID, 위치, 뷰포트를 포함하는 Place 객체의 배열입니다.
selectable
유형:  boolean
목록 항목을 선택할 수 있는지 여부입니다. true인 경우 목록 항목은 클릭 시 gmp-placeselect 이벤트를 디스패치하는 버튼이 됩니다. 접근성 있는 키보드 탐색 및 선택도 지원됩니다.
HTML 속성:
  • <gmp-place-list selectable></gmp-place-list>
BetaaddEventListener
addEventListener(type, listener[, options])
매개변수: 
  • typestring 수신할 이벤트 유형을 나타내는 대소문자를 구분하는 문자열입니다.
  • listenerEventListener|EventListenerObject 알림을 수신하는 객체입니다. handleEvent 메서드가 있는 함수 또는 객체여야 합니다.
  • optionsboolean|AddEventListenerOptions optional 옵션을 참고하세요. 맞춤 이벤트는 capturepassive만 지원합니다.
반환 값:  void
지정된 이벤트가 타겟에 전달될 때마다 호출될 함수를 설정합니다. addEventListener를 참고하세요.
configureFromSearchByTextRequest
configureFromSearchByTextRequest(request)
매개변수: 
  • requestSearchByTextRequest 결과를 렌더링할 요청입니다. SearchByTextRequestfields 속성은 필수 속성이 아닙니다.
반환 값:  Promise<void> 장소 데이터가 로드되고 렌더링되면 처리되는 프로미스입니다.
Places Text Search API 요청의 검색 결과를 렌더링하도록 위젯을 구성합니다.
configureFromSearchNearbyRequest
configureFromSearchNearbyRequest(request)
매개변수: 
  • requestSearchNearbyRequest 결과를 렌더링할 요청입니다. SearchNearbyRequestfields 속성은 필수 속성이 아닙니다.
반환 값:  Promise<void> 장소 데이터가 로드되고 렌더링되면 처리되는 프로미스입니다.
Places Nearby Search API 요청의 검색 결과를 렌더링하도록 위젯을 구성합니다.
BetaremoveEventListener
removeEventListener(type, listener[, options])
매개변수: 
  • typestring 이벤트 리스너를 삭제할 이벤트 유형을 지정하는 문자열입니다.
  • listenerEventListener|EventListenerObject 이벤트 타겟에서 삭제할 이벤트 핸들러의 이벤트 리스너입니다.
  • optionsboolean|EventListenerOptions optional 옵션을 참고하세요.
반환 값:  void
이전에 addEventListener로 등록된 이벤트 리스너를 타겟에서 삭제합니다. removeEventListener을 참고하세요.
gmp-load
function(event)
인수: 
이 이벤트는 요소가 콘텐츠를 로드하고 렌더링할 때 발생합니다. 이 이벤트는 버블링되지 않습니다.
gmp-placeselect
function(event)
인수: 
이 이벤트는 사용자가 장소를 선택할 때 발생합니다. Place 객체와 목록에서 선택한 장소의 색인을 포함합니다.
gmp-requesterror
function(event)
인수: 
이 이벤트는 백엔드 요청이 거부된 경우 (예: 잘못된 API 키) 발생합니다. 이 이벤트는 버블링되지 않습니다.

PlaceListElementOptions 인터페이스

google.maps.places.PlaceListElementOptions 인터페이스

PlaceListElement 옵션

selectable optional
유형:  boolean optional

PlaceListPlaceSelectEvent 클래스

google.maps.places.PlaceListPlaceSelectEvent 클래스

이 이벤트는 사용자가 장소를 선택할 때 PlaceListElement에 의해 발생합니다.

이 클래스는 Event를 확장합니다.

const {PlaceListPlaceSelectEvent} = await google.maps.importLibrary("places")를 호출하여 액세스
Maps JavaScript API의 라이브러리를 참고하세요.

index
유형:  number
선택한 장소의 목록 색인입니다.
place
유형:  Place
선택한 장소의 ID, 위치, 뷰포트가 포함된 Place 객체입니다.

Autocomplete 클래스

google.maps.places.Autocomplete 클래스

사용자의 텍스트 입력을 기반으로 장소 예측을 제공하는 위젯입니다. text 유형의 입력 요소에 연결되고 해당 필드의 텍스트 입력을 수신 대기합니다. 예상 검색어 목록은 드롭다운 목록으로 표시되며 텍스트를 입력할 때 업데이트됩니다.

이 클래스는 MVCObject를 확장합니다.

const {Autocomplete} = await google.maps.importLibrary("places")를 호출하여 액세스
Maps JavaScript API의 라이브러리를 참고하세요.

Autocomplete
Autocomplete(inputField[, opts])
매개변수: 
지정된 입력 텍스트 필드에 주어진 옵션으로 연결되는 Autocomplete의 새 인스턴스를 만듭니다.
getBounds
getBounds()
매개변수:  없음
반환 값:  LatLngBounds|undefined 바이어싱 경계입니다.
예측이 편향되는 경계를 반환합니다.
getFields
getFields()
매개변수:  없음
반환 값:  Array<string>|undefined
세부정보를 성공적으로 가져온 경우 세부정보 응답에 포함할 장소의 필드를 반환합니다. 필드 목록은 PlaceResult를 참고하세요.
getPlace
getPlace()
매개변수:  없음
반환 값:  PlaceResult 사용자가 선택한 장소입니다.
세부정보를 가져오는 데 성공한 경우 사용자가 선택한 장소의 세부정보를 반환합니다. 그렇지 않으면 name 속성이 입력 필드의 현재 값으로 설정된 스텁 장소 객체를 반환합니다.
setBounds
setBounds(bounds)
매개변수: 
반환 값:  None
장소 결과를 반환할 기본 영역을 설정합니다. 검색 결과는 이 지역에 편중되지만 이 지역만으로 제한되지는 않습니다.
setComponentRestrictions
setComponentRestrictions(restrictions)
매개변수: 
반환 값:  None
구성요소 제한을 설정합니다. 구성요소 제한은 예측을 상위 구성요소 내의 예측으로만 제한하는 데 사용됩니다. 예를 들어 국가입니다.
setFields
setFields(fields)
매개변수: 
  • fieldsArray<string> optional
반환 값:  None
세부정보를 성공적으로 가져온 경우 세부정보 응답에 포함할 장소 필드를 설정합니다. 필드 목록은 PlaceResult를 참고하세요.
setOptions
setOptions(options)
매개변수: 
반환 값:  None
setTypes
setTypes(types)
매개변수: 
  • typesArray<string> optional 포함할 예측 유형입니다.
반환 값:  None
반환할 예측 유형을 설정합니다. 지원되는 유형은 개발자 가이드를 참고하세요. 유형을 지정하지 않으면 모든 유형이 반환됩니다.
상속: addListener, bindTo, get, notify, set, setValues, unbind, unbindAll
place_changed
function()
인수:  없음
이 이벤트는 사용자가 선택한 장소에 PlaceResult가 제공될 때 발생합니다.
사용자가 컨트롤에서 추천하지 않은 장소의 이름을 입력하고 Enter 키를 누르거나 장소 세부정보 요청이 실패하면 PlaceResult에는 name 속성에 사용자 입력이 포함되며 다른 속성은 정의되지 않습니다.

AutocompleteOptions 인터페이스

google.maps.places.AutocompleteOptions 인터페이스

Autocomplete 객체에 설정할 수 있는 옵션입니다.

bounds optional
장소를 검색할 영역입니다.
componentRestrictions optional
유형:  ComponentRestrictions optional
구성요소 제한사항입니다. 구성요소 제한은 예측을 상위 구성요소 내의 예측으로만 제한하는 데 사용됩니다. 예를 들어 국가입니다.
fields optional
유형:  Array<string> optional
세부정보를 성공적으로 가져온 경우 세부정보 응답에 포함할 장소 필드입니다. 요금이 청구됩니다. ['ALL']이 전달되는 경우 사용 가능한 모든 필드가 반환되고 청구됩니다 (프로덕션 배포의 경우 권장되지 않음). 필드 목록은 PlaceResult를 참고하세요. 중첩된 필드는 점 경로 (예: "geometry.location")로 지정할 수 있습니다. 기본값은 ['ALL']입니다.
placeIdOnly optional
유형:  boolean optional
장소 ID만 가져올지 여부입니다. place_changed 이벤트가 발생할 때 사용할 수 있는 PlaceResult에는 place_id, types, name 필드만 있으며, Autocomplete 서비스에서 반환된 place_id, types, description이 있습니다. 기본적으로 사용 중지됩니다.
strictBounds optional
유형:  boolean optional
쿼리가 전송된 시점에 Autocomplete 위젯의 경계 내에 있는 장소만 Autocomplete 위젯에서 반환해야 함을 나타내는 불리언 값입니다. strictBounds를 false (기본값)로 설정하면 검색 결과가 경계 내에 포함된 장소에 편중되지만 이 장소만으로 제한되지는 않습니다.
types optional
유형:  Array<string> optional
반환할 예측 유형입니다. 지원되는 유형은 개발자 가이드를 참고하세요. 유형을 지정하지 않으면 모든 유형이 반환됩니다.

google.maps.places.SearchBox 클래스

사용자의 텍스트 입력을 기반으로 쿼리 예측을 제공하는 위젯입니다. text 유형의 입력 요소에 연결되고 해당 필드의 텍스트 입력을 수신 대기합니다. 예상 검색어 목록은 드롭다운 목록으로 표시되며 텍스트를 입력할 때 업데이트됩니다.

이 클래스는 MVCObject를 확장합니다.

const {SearchBox} = await google.maps.importLibrary("places")를 호출하여 액세스
Maps JavaScript API의 라이브러리를 참고하세요.

SearchBox
SearchBox(inputField[, opts])
매개변수: 
지정된 입력 텍스트 필드에 주어진 옵션으로 연결되는 SearchBox의 새 인스턴스를 만듭니다.
getBounds
getBounds()
매개변수:  없음
반환 값:  LatLngBounds|undefined
쿼리 예측이 편향되는 경계를 반환합니다.
getPlaces
getPlaces()
매개변수:  없음
반환 값:  Array<PlaceResult>|undefined
사용자가 places_changed 이벤트와 함께 사용하도록 선택한 쿼리를 반환합니다.
setBounds
setBounds(bounds)
매개변수: 
반환 값:  None
쿼리 예측에 편향을 주기 위해 사용할 리전을 설정합니다. 검색 결과는 이 지역에 편중되지만 이 지역만으로 제한되지는 않습니다.
상속: addListener, bindTo, get, notify, set, setValues, unbind, unbindAll
places_changed
function()
인수:  없음
이 이벤트는 사용자가 쿼리를 선택할 때 발생하며, getPlaces를 사용하여 새 장소를 가져와야 합니다.

SearchBoxOptions 인터페이스

google.maps.places.SearchBoxOptions 인터페이스

SearchBox 객체에 설정할 수 있는 옵션입니다.

bounds optional
쿼리 예측에 편향을 적용할 영역입니다. 예측은 이러한 경계를 타겟팅하는 쿼리에 편중되지만 이러한 쿼리만으로 제한되지는 않습니다.