Place Widget Content Customization

PlaceContentConfigElement 類別

google.maps.places.PlaceContentConfigElement class

設定 PlaceDetailsCompactElement、PlaceDetailsElement 或 PlaceSearchElement,顯示一組自訂內容。請將這個元素附加為子項,以便使用。

如果是 PlaceDetailsCompactElement、PlaceDetailsElement 或 PlaceSearchElement,請將下列任一元素附加至 PlaceContentConfigElement,以顯示對應的內容:
PlaceAddressElement、PlaceAccessibleEntranceIconElement、PlaceAttributionElement PlaceMediaElement、PlaceOpenNowStatusElement、PlacePriceElement、PlaceRatingElement、PlaceTypeElement。

針對 PlaceDetailsElement,您也可以附加下列任一元素:
PlaceFeatureListElement PlaceOpeningHoursElement、PlacePhoneNumberElement、PlacePlusCodeElement、PlaceReviewSummaryElement、PlaceReviewsElement、PlaceSummaryElement、PlaceTypeSpecificHighlightsElement、PlaceWebsiteElement。

子項的順序並不重要,元素會按照標準順序算繪內容,無法自訂。範例:

 <gmp-place-details>
  <gmp-place-content-config>
    <gmp-place-media lightbox-preferred></gmp-place-media>
    <gmp-place-address></gmp-place-address>
  </gmp-place-content-config>
</gmp-place-details>

自訂元素:
<gmp-place-content-config></gmp-place-content-config>

這個類別會擴充 HTMLElement。

這個類別會實作 PlaceContentConfigElementOptions。

呼叫 const {PlaceContentConfigElement} = await google.maps.importLibrary("places") 即可存取。
請參閱「Maps JavaScript API 中的程式庫」。

PlaceContentConfigElement
PlaceContentConfigElement([options])
參數: 
addEventListener
addEventListener(type, listener[, options])
參數: 
  • type:string區分大小寫的字串,代表要監聽的事件類型。
  • listener:EventListener|EventListenerObject接收通知的物件。這必須是函式或具有 handleEvent 方法的物件
  • options:boolean|AddEventListenerOptions optional。查看選項。自訂事件僅支援 capture 和 passive。
傳回值:  void
設定函式,每當指定事件傳送至目標時,系統就會呼叫該函式。請參閱 addEventListener。
removeEventListener
removeEventListener(type, listener[, options])
參數: 
傳回值:  void
從目標中移除先前使用 addEventListener 註冊的事件監聽器。請參閱 removeEventListener。

PlaceContentConfigElementOptions 介面

google.maps.places.PlaceContentConfigElementOptions 介面

「PlaceContentConfigElement」的選項。

PlaceAllContentElement 類別

google.maps.places.PlaceAllContentElement class

設定 PlaceDetailsCompactElement、PlaceDetailsElement 或 PlaceSearchElement,顯示所有可用內容。請將這個元素附加為子項,以便使用。例如:

 <gmp-place-details>
  <gmp-place-all-content></gmp-place-all-content>
</gmp-place-details>

自訂元素:
<gmp-place-all-content></gmp-place-all-content>

這個類別會擴充 HTMLElement。

這個類別會實作 PlaceAllContentElementOptions。

呼叫 const {PlaceAllContentElement} = await google.maps.importLibrary("places") 即可存取。
請參閱「Maps JavaScript API 中的程式庫」。

PlaceAllContentElement
PlaceAllContentElement([options])
參數: 
addEventListener
addEventListener(type, listener[, options])
參數: 
  • type:string區分大小寫的字串,代表要監聽的事件類型。
  • listener:EventListener|EventListenerObject接收通知的物件。這必須是函式或具有 handleEvent 方法的物件
  • options:boolean|AddEventListenerOptions optional。查看選項。自訂事件僅支援 capture 和 passive。
傳回值:  void
設定函式,每當指定事件傳送至目標時,系統就會呼叫該函式。請參閱 addEventListener。
removeEventListener
removeEventListener(type, listener[, options])
參數: 
傳回值:  void
從目標中移除先前使用 addEventListener 註冊的事件監聽器。請參閱 removeEventListener。

PlaceAllContentElementOptions 介面

google.maps.places.PlaceAllContentElementOptions 介面

「PlaceAllContentElement」的選項。

PlaceStandardContentElement 類別

google.maps.places.PlaceStandardContentElement class

設定 PlaceDetailsCompactElement、PlaceDetailsElement 或 PlaceSearchElement,顯示一組標準內容。請將這個元素附加為子項,以便使用。
PlaceDetailsElement 的標準內容包括:

  • 媒體
  • 地址
  • rating
  • 類型
  • 價格
  • 無障礙入口圖示
  • 網站
  • 電話號碼
  • 營業時間
  • 摘要
  • 特定類型的重點
  • 評論
  • 功能清單

PlaceDetailsCompactElement 的標準內容包括:
  • 媒體
  • rating
  • 類型
  • 價格
  • 無障礙入口圖示
  • 營業中狀態

PlaceSearchElement 的標準內容包括:
  • 媒體
  • rating
  • 類型
  • 價格
  • 無障礙入口圖示

例如:
 <gmp-place-details>
  <gmp-place-standard-content></gmp-place-standard-content>
</gmp-place-details>

自訂元素:
<gmp-place-standard-content></gmp-place-standard-content>

這個類別會擴充 HTMLElement。

這個類別會實作 PlaceStandardContentElementOptions。

呼叫 const {PlaceStandardContentElement} = await google.maps.importLibrary("places") 即可存取。
請參閱「Maps JavaScript API 中的程式庫」。

PlaceStandardContentElement
PlaceStandardContentElement([options])
參數: 
addEventListener
addEventListener(type, listener[, options])
參數: 
  • type:string區分大小寫的字串,代表要監聽的事件類型。
  • listener:EventListener|EventListenerObject接收通知的物件。這必須是函式或具有 handleEvent 方法的物件
  • options:boolean|AddEventListenerOptions optional。查看選項。自訂事件僅支援 capture 和 passive。
傳回值:  void
設定函式,每當指定事件傳送至目標時,系統就會呼叫該函式。請參閱 addEventListener。
removeEventListener
removeEventListener(type, listener[, options])
參數: 
傳回值:  void
從目標中移除先前使用 addEventListener 註冊的事件監聽器。請參閱 removeEventListener。

PlaceStandardContentElementOptions 介面

google.maps.places.PlaceStandardContentElementOptions 介面

「PlaceStandardContentElement」的選項。

PlaceMediaElement 類別

google.maps.places.PlaceMediaElement class

設定 PlaceDetailsCompactElement、PlaceDetailsElement 或 PlaceSearchElement,顯示地點的媒體 (例如相片)。如要使用這個元素,請將其附加為 PlaceContentConfigElement 的子項。例如:

 <gmp-place-content-config>
  <gmp-place-media lightbox-preferred></gmp-place-media>
</gmp-place-content-config>

自訂元素:
<gmp-place-media lightbox-preferred preferred-size="small"></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>
preferredSize
類型:  MediaSize optional
預設值: null
支援多種大小時,偏好的媒體大小,例如直向 PlaceSearchElement。如未指定,PlaceSearchElement 產業預設會使用 MediaSize.SMALL。
HTML 屬性:
  • <gmp-place-media preferred-size="small"></gmp-place-media>
  • <gmp-place-media preferred-size="medium"></gmp-place-media>
  • <gmp-place-media preferred-size="large"></gmp-place-media>
addEventListener
addEventListener(type, listener[, options])
參數: 
  • type:string區分大小寫的字串,代表要監聽的事件類型。
  • listener:EventListener|EventListenerObject接收通知的物件。這必須是函式或具有 handleEvent 方法的物件
  • options:boolean|AddEventListenerOptions optional。查看選項。自訂事件僅支援 capture 和 passive。
傳回值:  void
設定函式,每當指定事件傳送至目標時,系統就會呼叫該函式。請參閱 addEventListener。
removeEventListener
removeEventListener(type, listener[, options])
參數: 
傳回值:  void
從目標中移除先前使用 addEventListener 註冊的事件監聽器。請參閱 removeEventListener。

PlaceMediaElementOptions 介面

google.maps.places.PlaceMediaElementOptions 介面

「PlaceMediaElement」的選項。

lightboxPreferred optional
類型:  boolean optional
詳情請參閱《PlaceMediaElement.lightboxPreferred》。
preferredSize optional
類型:  MediaSize optional
詳情請參閱《PlaceMediaElement.preferredSize》。

MediaSize 常數

google.maps.places.MediaSize 常數

支援多種大小時,偏好的媒體大小,例如直向 PlaceSearchElement。

呼叫 const {MediaSize} = await google.maps.importLibrary("places") 即可存取。
請參閱「Maps JavaScript API 中的程式庫」。

LARGE 大型媒體。
MEDIUM 中型媒體。
SMALL 媒體大小較小。

PlaceAddressElement 類別

google.maps.places.PlaceAddressElement class

設定 PlaceDetailsCompactElement、PlaceDetailsElement 或 PlaceSearchElement,顯示地點的地址。如要使用這個元素,請將其附加為 PlaceContentConfigElement 的子項。例如:

 <gmp-place-content-config>
  <gmp-place-address></gmp-place-address>
</gmp-place-content-config>

自訂元素:
<gmp-place-address></gmp-place-address>

這個類別會擴充 HTMLElement。

這個類別會實作 PlaceAddressElementOptions。

呼叫 const {PlaceAddressElement} = await google.maps.importLibrary("places") 即可存取。
請參閱「Maps JavaScript API 中的程式庫」。

PlaceAddressElement
PlaceAddressElement([options])
參數: 
addEventListener
addEventListener(type, listener[, options])
參數: 
  • type:string區分大小寫的字串,代表要監聽的事件類型。
  • listener:EventListener|EventListenerObject接收通知的物件。這必須是函式或具有 handleEvent 方法的物件
  • options:boolean|AddEventListenerOptions optional。查看選項。自訂事件僅支援 capture 和 passive。
傳回值:  void
設定函式,每當指定事件傳送至目標時,系統就會呼叫該函式。請參閱 addEventListener。
removeEventListener
removeEventListener(type, listener[, options])
參數: 
傳回值:  void
從目標中移除先前使用 addEventListener 註冊的事件監聽器。請參閱 removeEventListener。

PlaceAddressElementOptions 介面

google.maps.places.PlaceAddressElementOptions 介面

「PlaceAddressElement」的選項。

PlaceRatingElement 類別

google.maps.places.PlaceRatingElement class

設定 PlaceDetailsCompactElement、PlaceDetailsElement 或 PlaceSearchElement,顯示地點評分。如要使用這個元素,請將其附加為 PlaceContentConfigElement 的子項。例如:

 <gmp-place-content-config>
  <gmp-place-rating></gmp-place-rating>
</gmp-place-content-config>

自訂元素:
<gmp-place-rating></gmp-place-rating>

這個類別會擴充 HTMLElement。

這個類別會實作 PlaceRatingElementOptions。

呼叫 const {PlaceRatingElement} = await google.maps.importLibrary("places") 即可存取。
請參閱「Maps JavaScript API 中的程式庫」。

PlaceRatingElement
PlaceRatingElement([options])
參數: 
addEventListener
addEventListener(type, listener[, options])
參數: 
  • type:string區分大小寫的字串,代表要監聽的事件類型。
  • listener:EventListener|EventListenerObject接收通知的物件。這必須是函式或具有 handleEvent 方法的物件
  • options:boolean|AddEventListenerOptions optional。查看選項。自訂事件僅支援 capture 和 passive。
傳回值:  void
設定函式,每當指定事件傳送至目標時,系統就會呼叫該函式。請參閱 addEventListener。
removeEventListener
removeEventListener(type, listener[, options])
參數: 
傳回值:  void
從目標中移除先前使用 addEventListener 註冊的事件監聽器。請參閱 removeEventListener。

PlaceRatingElementOptions 介面

google.maps.places.PlaceRatingElementOptions 介面

「PlaceRatingElement」的選項。

PlaceTypeElement 類別

google.maps.places.PlaceTypeElement class

設定 PlaceDetailsCompactElement、PlaceDetailsElement 或 PlaceSearchElement,以顯示地點類型。如要使用這個元素,請將其附加為 PlaceContentConfigElement 的子項。例如:

 <gmp-place-content-config>
  <gmp-place-type></gmp-place-type>
</gmp-place-content-config>

自訂元素:
<gmp-place-type></gmp-place-type>

這個類別會擴充 HTMLElement。

這個類別會實作 PlaceTypeElementOptions。

呼叫 const {PlaceTypeElement} = await google.maps.importLibrary("places") 即可存取。
請參閱「Maps JavaScript API 中的程式庫」。

PlaceTypeElement
PlaceTypeElement([options])
參數: 
addEventListener
addEventListener(type, listener[, options])
參數: 
  • type:string區分大小寫的字串,代表要監聽的事件類型。
  • listener:EventListener|EventListenerObject接收通知的物件。這必須是函式或具有 handleEvent 方法的物件
  • options:boolean|AddEventListenerOptions optional。查看選項。自訂事件僅支援 capture 和 passive。
傳回值:  void
設定函式,每當指定事件傳送至目標時,系統就會呼叫該函式。請參閱 addEventListener。
removeEventListener
removeEventListener(type, listener[, options])
參數: 
傳回值:  void
從目標中移除先前使用 addEventListener 註冊的事件監聽器。請參閱 removeEventListener。

PlaceTypeElementOptions 介面

google.maps.places.PlaceTypeElementOptions 介面

「PlaceTypeElement」的選項。

PlacePriceElement 類別

google.maps.places.PlacePriceElement class

設定 PlaceDetailsCompactElement、PlaceDetailsElement 或 PlaceSearchElement,顯示地點的價格等級或價格範圍。如要使用這個元素,請將其附加為 PlaceContentConfigElement 的子項。例如:

 <gmp-place-content-config>
  <gmp-place-price></gmp-place-price>
</gmp-place-content-config>

自訂元素:
<gmp-place-price></gmp-place-price>

這個類別會擴充 HTMLElement。

這個類別會實作 PlacePriceElementOptions。

呼叫 const {PlacePriceElement} = await google.maps.importLibrary("places") 即可存取。
請參閱「Maps JavaScript API 中的程式庫」。

PlacePriceElement
PlacePriceElement([options])
參數: 
addEventListener
addEventListener(type, listener[, options])
參數: 
  • type:string區分大小寫的字串,代表要監聽的事件類型。
  • listener:EventListener|EventListenerObject接收通知的物件。這必須是函式或具有 handleEvent 方法的物件
  • options:boolean|AddEventListenerOptions optional。查看選項。自訂事件僅支援 capture 和 passive。
傳回值:  void
設定函式,每當指定事件傳送至目標時,系統就會呼叫該函式。請參閱 addEventListener。
removeEventListener
removeEventListener(type, listener[, options])
參數: 
傳回值:  void
從目標中移除先前使用 addEventListener 註冊的事件監聽器。請參閱 removeEventListener。

PlacePriceElementOptions 介面

google.maps.places.PlacePriceElementOptions 介面

「PlacePriceElement」的選項。

PlaceAccessibleEntranceIconElement 類別

google.maps.places.PlaceAccessibleEntranceIconElement class

設定 PlaceDetailsCompactElement、PlaceDetailsElement 或 PlaceSearchElement,在地點有無障礙入口時顯示輪椅圖示。如要使用這個元素,請將其附加為 PlaceContentConfigElement 的子項。例如:

 <gmp-place-content-config>
  <gmp-place-accessible-entrance-icon></gmp-place-accessible-entrance-icon>
</gmp-place-content-config>

自訂元素:
<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])
參數: 
addEventListener
addEventListener(type, listener[, options])
參數: 
  • type:string區分大小寫的字串,代表要監聽的事件類型。
  • listener:EventListener|EventListenerObject接收通知的物件。這必須是函式或具有 handleEvent 方法的物件
  • options:boolean|AddEventListenerOptions optional。查看選項。自訂事件僅支援 capture 和 passive。
傳回值:  void
設定函式,每當指定事件傳送至目標時,系統就會呼叫該函式。請參閱 addEventListener。
removeEventListener
removeEventListener(type, listener[, options])
參數: 
傳回值:  void
從目標中移除先前使用 addEventListener 註冊的事件監聽器。請參閱 removeEventListener。

PlaceAccessibleEntranceIconElementOptions 介面

google.maps.places.PlaceAccessibleEntranceIconElementOptions 介面

「PlaceAccessibleEntranceIconElement」的選項。

PlaceOpenNowStatusElement 類別

google.maps.places.PlaceOpenNowStatusElement class

設定 PlaceDetailsCompactElement、PlaceDetailsElement 或 PlaceSearchElement,顯示地點目前是否營業。如要使用這個元素,請將其附加為 PlaceContentConfigElement 的子項。例如:

 <gmp-place-content-config>
  <gmp-place-open-now-status></gmp-place-open-now-status>
</gmp-place-content-config>

自訂元素:
<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])
參數: 
addEventListener
addEventListener(type, listener[, options])
參數: 
  • type:string區分大小寫的字串,代表要監聽的事件類型。
  • listener:EventListener|EventListenerObject接收通知的物件。這必須是函式或具有 handleEvent 方法的物件
  • options:boolean|AddEventListenerOptions optional。查看選項。自訂事件僅支援 capture 和 passive。
傳回值:  void
設定函式,每當指定事件傳送至目標時,系統就會呼叫該函式。請參閱 addEventListener。
removeEventListener
removeEventListener(type, listener[, options])
參數: 
傳回值:  void
從目標中移除先前使用 addEventListener 註冊的事件監聽器。請參閱 removeEventListener。

PlaceOpenNowStatusElementOptions 介面

google.maps.places.PlaceOpenNowStatusElementOptions 介面

「PlaceOpenNowStatusElement」的選項。

PlaceReviewSummaryElement 類別

google.maps.places.PlaceReviewSummaryElement class

設定 PlaceDetailsElement 以顯示地點的評論摘要。如要使用這個元素,請將其附加為 PlaceContentConfigElement 的子項。例如:

 <gmp-place-content-config>
  <gmp-place-review-summary></gmp-place-review-summary>
</gmp-place-content-config>

自訂元素:
<gmp-place-review-summary></gmp-place-review-summary>

這個類別會擴充 HTMLElement。

這個類別會實作 PlaceReviewSummaryElementOptions。

呼叫 const {PlaceReviewSummaryElement} = await google.maps.importLibrary("places") 即可存取。
請參閱「Maps JavaScript API 中的程式庫」。

addEventListener
addEventListener(type, listener[, options])
參數: 
  • type:string區分大小寫的字串,代表要監聽的事件類型。
  • listener:EventListener|EventListenerObject接收通知的物件。這必須是函式或具有 handleEvent 方法的物件
  • options:boolean|AddEventListenerOptions optional。查看選項。自訂事件僅支援 capture 和 passive。
傳回值:  void
設定函式,每當指定事件傳送至目標時,系統就會呼叫該函式。請參閱 addEventListener。
removeEventListener
removeEventListener(type, listener[, options])
參數: 
傳回值:  void
從目標中移除先前使用 addEventListener 註冊的事件監聽器。請參閱 removeEventListener。

PlaceReviewSummaryElementOptions 介面

google.maps.places.PlaceReviewSummaryElementOptions 介面

「PlaceReviewSummaryElement」的選項。

PlaceReviewsElement 類別

google.maps.places.PlaceReviewsElement class

設定 PlaceDetailsElement 以顯示地點評論。如要使用這個元素,請將其附加為 PlaceContentConfigElement 的子項。例如:

 <gmp-place-content-config>
  <gmp-place-reviews></gmp-place-reviews>
</gmp-place-content-config>

自訂元素:
<gmp-place-reviews></gmp-place-reviews>

這個類別會擴充 HTMLElement。

這個類別會實作 PlaceReviewsElementOptions。

呼叫 const {PlaceReviewsElement} = await google.maps.importLibrary("places") 即可存取。
請參閱「Maps JavaScript API 中的程式庫」。

addEventListener
addEventListener(type, listener[, options])
參數: 
  • type:string區分大小寫的字串,代表要監聽的事件類型。
  • listener:EventListener|EventListenerObject接收通知的物件。這必須是函式或具有 handleEvent 方法的物件
  • options:boolean|AddEventListenerOptions optional。查看選項。自訂事件僅支援 capture 和 passive。
傳回值:  void
設定函式,每當指定事件傳送至目標時,系統就會呼叫該函式。請參閱 addEventListener。
removeEventListener
removeEventListener(type, listener[, options])
參數: 
傳回值:  void
從目標中移除先前使用 addEventListener 註冊的事件監聽器。請參閱 removeEventListener。

PlaceReviewsElementOptions 介面

google.maps.places.PlaceReviewsElementOptions 介面

「PlaceReviewsElement」的選項。

PlaceSummaryElement 類別

google.maps.places.PlaceSummaryElement class

設定 PlaceDetailsElement 以顯示地點摘要。如要使用這個元素,請將其附加為 PlaceContentConfigElement 的子項。例如:

 <gmp-place-content-config>
  <gmp-place-summary></gmp-place-summary>
</gmp-place-content-config>

自訂元素:
<gmp-place-summary></gmp-place-summary>

這個類別會擴充 HTMLElement。

這個類別會實作 PlaceSummaryElementOptions。

呼叫 const {PlaceSummaryElement} = await google.maps.importLibrary("places") 即可存取。
請參閱「Maps JavaScript API 中的程式庫」。

addEventListener
addEventListener(type, listener[, options])
參數: 
  • type:string區分大小寫的字串,代表要監聽的事件類型。
  • listener:EventListener|EventListenerObject接收通知的物件。這必須是函式或具有 handleEvent 方法的物件
  • options:boolean|AddEventListenerOptions optional。查看選項。自訂事件僅支援 capture 和 passive。
傳回值:  void
設定函式,每當指定事件傳送至目標時,系統就會呼叫該函式。請參閱 addEventListener。
removeEventListener
removeEventListener(type, listener[, options])
參數: 
傳回值:  void
從目標中移除先前使用 addEventListener 註冊的事件監聽器。請參閱 removeEventListener。

PlaceSummaryElementOptions 介面

google.maps.places.PlaceSummaryElementOptions 介面

「PlaceSummaryElement」的選項。

PlaceFeatureListElement 類別

google.maps.places.PlaceFeatureListElement class

設定 PlaceDetailsElement,在「關於」分頁中顯示地點的特色清單。功能清單可包含無障礙選項、設施、接受的付款方式等。如要使用這個元素,請將其附加為 PlaceContentConfigElement 的子項。例如:

 <gmp-place-content-config>
  <gmp-place-feature-list></gmp-place-feature-list>
</gmp-place-content-config>

自訂元素:
<gmp-place-feature-list></gmp-place-feature-list>

這個類別會擴充 HTMLElement。

這個類別會實作 PlaceFeatureListElementOptions。

呼叫 const {PlaceFeatureListElement} = await google.maps.importLibrary("places") 即可存取。
請參閱「Maps JavaScript API 中的程式庫」。

addEventListener
addEventListener(type, listener[, options])
參數: 
  • type:string區分大小寫的字串,代表要監聽的事件類型。
  • listener:EventListener|EventListenerObject接收通知的物件。這必須是函式或具有 handleEvent 方法的物件
  • options:boolean|AddEventListenerOptions optional。查看選項。自訂事件僅支援 capture 和 passive。
傳回值:  void
設定函式,每當指定事件傳送至目標時,系統就會呼叫該函式。請參閱 addEventListener。
removeEventListener
removeEventListener(type, listener[, options])
參數: 
傳回值:  void
從目標中移除先前使用 addEventListener 註冊的事件監聽器。請參閱 removeEventListener。

PlaceFeatureListElementOptions 介面

google.maps.places.PlaceFeatureListElementOptions 介面

「PlaceFeatureListElement」的選項。

PlaceOpeningHoursElement 類別

google.maps.places.PlaceOpeningHoursElement class

設定 PlaceDetailsElement 以顯示地點的營業時間。如要使用這個元素,請將其附加為 PlaceContentConfigElement 的子項。例如:

 <gmp-place-content-config>
  <gmp-place-opening-hours></gmp-place-opening-hours>
</gmp-place-content-config>

自訂元素:
<gmp-place-opening-hours></gmp-place-opening-hours>

這個類別會擴充 HTMLElement。

這個類別會實作 PlaceOpeningHoursElementOptions。

呼叫 const {PlaceOpeningHoursElement} = await google.maps.importLibrary("places") 即可存取。
請參閱「Maps JavaScript API 中的程式庫」。

addEventListener
addEventListener(type, listener[, options])
參數: 
  • type:string區分大小寫的字串,代表要監聽的事件類型。
  • listener:EventListener|EventListenerObject接收通知的物件。這必須是函式或具有 handleEvent 方法的物件
  • options:boolean|AddEventListenerOptions optional。查看選項。自訂事件僅支援 capture 和 passive。
傳回值:  void
設定函式,每當指定事件傳送至目標時,系統就會呼叫該函式。請參閱 addEventListener。
removeEventListener
removeEventListener(type, listener[, options])
參數: 
傳回值:  void
從目標中移除先前使用 addEventListener 註冊的事件監聽器。請參閱 removeEventListener。

PlaceOpeningHoursElementOptions 介面

google.maps.places.PlaceOpeningHoursElementOptions 介面

「PlaceOpeningHoursElement」的選項。

PlacePhoneNumberElement 類別

google.maps.places.PlacePhoneNumberElement class

設定 PlaceDetailsElement 以顯示地點的電話號碼。如要使用這個元素,請將其附加為 PlaceContentConfigElement 的子項。例如:

 <gmp-place-content-config>
  <gmp-place-phone-number></gmp-place-phone-number>
</gmp-place-content-config>

自訂元素:
<gmp-place-phone-number></gmp-place-phone-number>

這個類別會擴充 HTMLElement。

這個類別會實作 PlacePhoneNumberElementOptions。

呼叫 const {PlacePhoneNumberElement} = await google.maps.importLibrary("places") 即可存取。
請參閱「Maps JavaScript API 中的程式庫」。

addEventListener
addEventListener(type, listener[, options])
參數: 
  • type:string區分大小寫的字串,代表要監聽的事件類型。
  • listener:EventListener|EventListenerObject接收通知的物件。這必須是函式或具有 handleEvent 方法的物件
  • options:boolean|AddEventListenerOptions optional。查看選項。自訂事件僅支援 capture 和 passive。
傳回值:  void
設定函式,每當指定事件傳送至目標時,系統就會呼叫該函式。請參閱 addEventListener。
removeEventListener
removeEventListener(type, listener[, options])
參數: 
傳回值:  void
從目標中移除先前使用 addEventListener 註冊的事件監聽器。請參閱 removeEventListener。

PlacePhoneNumberElementOptions 介面

google.maps.places.PlacePhoneNumberElementOptions 介面

「PlacePhoneNumberElement」的選項。

PlacePlusCodeElement 類別

google.maps.places.PlacePlusCodeElement class

設定 PlaceDetailsElement 以顯示地點的 Plus Code。如要使用這個元素,請將其附加為 PlaceContentConfigElement 的子項。例如:

 <gmp-place-content-config>
  <gmp-place-plus-code></gmp-place-plus-code>
</gmp-place-content-config>

自訂元素:
<gmp-place-plus-code></gmp-place-plus-code>

這個類別會擴充 HTMLElement。

這個類別會實作 PlacePlusCodeElementOptions。

呼叫 const {PlacePlusCodeElement} = await google.maps.importLibrary("places") 即可存取。
請參閱「Maps JavaScript API 中的程式庫」。

addEventListener
addEventListener(type, listener[, options])
參數: 
  • type:string區分大小寫的字串,代表要監聽的事件類型。
  • listener:EventListener|EventListenerObject接收通知的物件。這必須是函式或具有 handleEvent 方法的物件
  • options:boolean|AddEventListenerOptions optional。查看選項。自訂事件僅支援 capture 和 passive。
傳回值:  void
設定函式,每當指定事件傳送至目標時,系統就會呼叫該函式。請參閱 addEventListener。
removeEventListener
removeEventListener(type, listener[, options])
參數: 
傳回值:  void
從目標中移除先前使用 addEventListener 註冊的事件監聽器。請參閱 removeEventListener。

PlacePlusCodeElementOptions 介面

google.maps.places.PlacePlusCodeElementOptions 介面

「PlacePlusCodeElement」的選項。

PlaceTypeSpecificHighlightsElement 類別

google.maps.places.PlaceTypeSpecificHighlightsElement class

設定 PlaceDetailsElement,顯示地點的特定類型重點資訊,例如油價和電動車充電樁供應情形。如要使用這個元素,請將其附加為 PlaceContentConfigElement 的子項。例如:

 <gmp-place-content-config>
  <gmp-place-type-specific-highlights></gmp-place-type-specific-highlights>
</gmp-place-content-config>

自訂元素:
<gmp-place-type-specific-highlights></gmp-place-type-specific-highlights>

這個類別會擴充 HTMLElement。

這個類別會實作 PlaceTypeSpecificHighlightsElementOptions。

呼叫 const {PlaceTypeSpecificHighlightsElement} = await google.maps.importLibrary("places") 即可存取。
請參閱「Maps JavaScript API 中的程式庫」。

addEventListener
addEventListener(type, listener[, options])
參數: 
  • type:string區分大小寫的字串,代表要監聽的事件類型。
  • listener:EventListener|EventListenerObject接收通知的物件。這必須是函式或具有 handleEvent 方法的物件
  • options:boolean|AddEventListenerOptions optional。查看選項。自訂事件僅支援 capture 和 passive。
傳回值:  void
設定函式,每當指定事件傳送至目標時,系統就會呼叫該函式。請參閱 addEventListener。
removeEventListener
removeEventListener(type, listener[, options])
參數: 
傳回值:  void
從目標中移除先前使用 addEventListener 註冊的事件監聽器。請參閱 removeEventListener。

PlaceTypeSpecificHighlightsElementOptions 介面

google.maps.places.PlaceTypeSpecificHighlightsElementOptions 介面

「PlaceTypeSpecificHighlightsElement」的選項。

PlaceWebsiteElement 類別

google.maps.places.PlaceWebsiteElement class

設定 PlaceDetailsElement 以顯示地點的網站。如要使用這個元素,請將其附加為 PlaceContentConfigElement 的子項。例如:

 <gmp-place-content-config>
  <gmp-place-website></gmp-place-website>
</gmp-place-content-config>

自訂元素:
<gmp-place-website></gmp-place-website>

這個類別會擴充 HTMLElement。

這個類別會實作 PlaceWebsiteElementOptions。

呼叫 const {PlaceWebsiteElement} = await google.maps.importLibrary("places") 即可存取。
請參閱「Maps JavaScript API 中的程式庫」。

addEventListener
addEventListener(type, listener[, options])
參數: 
  • type:string區分大小寫的字串,代表要監聽的事件類型。
  • listener:EventListener|EventListenerObject接收通知的物件。這必須是函式或具有 handleEvent 方法的物件
  • options:boolean|AddEventListenerOptions optional。查看選項。自訂事件僅支援 capture 和 passive。
傳回值:  void
設定函式,每當指定事件傳送至目標時,系統就會呼叫該函式。請參閱 addEventListener。
removeEventListener
removeEventListener(type, listener[, options])
參數: 
傳回值:  void
從目標中移除先前使用 addEventListener 註冊的事件監聽器。請參閱 removeEventListener。

PlaceWebsiteElementOptions 介面

google.maps.places.PlaceWebsiteElementOptions 介面

「PlaceWebsiteElement」的選項。

PlaceAttributionElement 類別

google.maps.places.PlaceAttributionElement class

允許自訂 PlaceDetailsCompactElement、PlaceDetailsElement 或 PlaceSearchElement 中的 Google 地圖作者資訊文字。如要使用這個元素,請將其附加為 PlaceContentConfigElement 的子項。如果省略這個元素,出處資訊仍會以預設顏色顯示。例如:

 <gmp-place-content-config>
  <gmp-place-attribution
     light-scheme-color="black"
     dark-scheme-color="white"
  ></gmp-place-attribution>
</gmp-place-content-config>

自訂元素:
<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>
addEventListener
addEventListener(type, listener[, options])
參數: 
  • type:string區分大小寫的字串,代表要監聽的事件類型。
  • listener:EventListener|EventListenerObject接收通知的物件。這必須是函式或具有 handleEvent 方法的物件
  • options:boolean|AddEventListenerOptions optional。查看選項。自訂事件僅支援 capture 和 passive。
傳回值:  void
設定函式,每當指定事件傳送至目標時,系統就會呼叫該函式。請參閱 addEventListener。
removeEventListener
removeEventListener(type, listener[, options])
參數: 
傳回值:  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 白色作者資訊文字。