Places Data

Place 類別

類別 google.maps.places.Place 實作 PlaceOptions
程式庫 "places"

const {Place} = await google.maps.importLibrary("places");
Place
Place(options)
參數:
searchByText
searchByText(request)
參數:
傳回值: Promise<{places:Array<Place>}>
根據文字查詢搜尋地點。
searchNearby
searchNearby(request)
參數:
傳回值: Promise<{places:Array<Place>}>
搜尋附近地點。
accessibilityOptions
readonly
類型: AccessibilityOptions optional
這個地點的無障礙選項。如果尚未從伺服器呼叫無障礙選項資料,則為 undefined。
addressComponents
readonly
類型: Array<AddressComponent> optional
這個地點位置的地址元件集合。如果沒有已知的地址資料,則為空白物件。如果尚未從伺服器呼叫地址資料,則為 undefined。
addressDescriptor
readonly
類型: AddressDescriptor optional
這個地點的地址描述元。地址描述元包含額外資訊,可協助使用地標和區域描述位置。如要查看地址描述元的區域涵蓋範圍,請前往 https://developers.google.com/maps/documentation/geocoding/address-descriptors/coverage。
adrFormatAddress
readonly
類型: string optional
地點地址的 adr 微格式表示法。
allowsDogs
readonly
類型: boolean optional
attributions
readonly
類型: Array<Attribution> optional
必須為地點顯示的資料供應商。
businessStatus
readonly
類型: BusinessStatus optional
地點的營業狀態。如果沒有已知狀態,則為 null。如果尚未從伺服器載入狀態資料,則為 undefined。
consumerAlert
readonly
類型: ConsumerAlert optional
這個地點的消費者快訊。
containingPlaces
readonly
類型: Array<Place> optional
這個地點所含地點的清單。包含地點是指包含該地點的地點。
currentOpeningHours
readonly
類型: OpeningHours optional
未來七天 (含今天) 的營業時間。包括假日和不定期公休等特殊營業時間。
currentSecondaryOpeningHours
readonly
類型: Array<SecondaryOpeningHours> optional
這個地點目前的次要營業時間,包括未來七天內的特殊營業時間,例如節慶和不定期店休。次要營業時間與地點的主要營業時間不同。舉例來說,餐廳可以將得來速或外送服務時間設為次要營業時間。
displayName
readonly
類型: string optional
地點的顯示名稱。如果沒有名稱,則為 null。如果尚未從伺服器載入名稱資料,則為 undefined。
displayNameLanguageCode
readonly
類型: string optional
地點顯示名稱的語言。如果沒有名稱,則為 null。如果尚未從伺服器載入名稱資料,則為 undefined。
editorialSummary
readonly
類型: string optional
這個地點的編輯摘要。如果沒有編輯摘要,則顯示 null。如果尚未要求這個欄位,則為 undefined。
editorialSummaryLanguageCode
readonly
類型: string optional
這個地點編輯摘要的語言。如果沒有編輯摘要,則顯示 null。如果尚未要求這個欄位,則為 undefined。
evChargeAmenitySummary
readonly
類型: EVChargeAmenitySummary optional
這個地點的 EVChargeAmenitySummary。
evChargeOptions
readonly
類型: EVChargeOptions optional
地點提供的電動車充電選項。如果尚未從伺服器呼叫電動車充電選項,則為 undefined。
formattedAddress
readonly
類型: string optional
地點的完整地址。
fuelOptions
readonly
類型: FuelOptions optional
地點提供的燃料選項。如果尚未從伺服器呼叫燃料選項,則為 undefined。
futureOpeningDate
readonly
類型: Date optional
如果 businessStatus 為 FUTURE_OPENING,則為這個地點的開幕日期。如果未要求這個欄位,系統就不會定義這個欄位。否則,這個欄位會填入開幕日期 (如有),否則會填入空值。
generativeSummary
readonly
類型: GenerativeSummary optional
這個地點的 GenerativeSummary。
googleMapsURI
readonly
類型: string optional
這個地點的 Google 官方頁面網址。這是 Google 自有的頁面,內含該地點的實用資訊。
hasCurbsidePickup
readonly
類型: boolean optional
地點是否提供店外取貨服務。如果值已知,則傳回「true」或「false」。如果值不明,則傳回「null」。如果尚未要求這個欄位,則會傳回「undefined」。
hasDelivery
readonly
類型: boolean optional
地點是否提供外送服務。如果值已知,則傳回「true」或「false」。如果值不明,則傳回「null」。如果尚未要求這個欄位,則會傳回「undefined」。
hasDineIn
readonly
類型: boolean optional
地點是否提供內用服務。如果值已知,則傳回「true」或「false」。如果值不明,則傳回「null」。如果尚未要求這個欄位,則會傳回「undefined」。
hasLiveMusic
readonly
類型: boolean optional
hasMenuForChildren
readonly
類型: boolean optional
hasOutdoorSeating
readonly
類型: boolean optional
hasRestroom
readonly
類型: boolean optional
hasTakeout
readonly
類型: boolean optional
地點是否提供外帶服務。如果值已知,則傳回「true」或「false」。如果值不明,則傳回「null」。如果尚未要求這個欄位,則會傳回「undefined」。
iconBackgroundColor
readonly
類型: string optional
地點類別的預設十六進位顏色代碼。
id
readonly
類型: string
專屬地點 ID。
internationalPhoneNumber
readonly
類型: string optional
地點的電話號碼 (國際電話號碼格式)。國際通用格式包含國碼,而且前置字元為加號 (+)。
isGoodForChildren
readonly
類型: boolean optional
isGoodForGroups
readonly
類型: boolean optional
isGoodForWatchingSports
readonly
類型: boolean optional
isPureServiceAreaBusiness
readonly
類型: boolean optional
指出地點是否為完全無店面區域商家。完全無店面區域商家會直接配送或到場服務,但不在公司地址為顧客提供服務。舉例來說,清潔或水電服務等商家可能沒有實體地址,或在 Google 地圖上沒有地點。
isReservable
readonly
類型: boolean optional
地點是否可預約。如果值已知,則傳回「true」或「false」。如果值不明,則傳回「null」。如果尚未要求這個欄位,則會傳回「undefined」。
location
readonly
類型: LatLng optional
地點的位置。
nationalPhoneNumber
readonly
類型: string optional
地點的電話號碼,格式取決於號碼的地方慣例。
neighborhoodSummary
readonly
類型: NeighborhoodSummary optional
這個地點的 NeighborhoodSummary。
parkingOptions
readonly
類型: ParkingOptions optional
地點提供的停車選項。如果尚未從伺服器呼叫停車選項資料,則為 undefined。
paymentOptions
readonly
類型: PaymentOptions optional
地點提供的付款方式。如果尚未從伺服器呼叫付款方式資料,則為 undefined。
photos
readonly
類型: Array<Photo> optional
這個地點的相片。集合最多可包含十個 Photo 物件。
plusCode
readonly
類型: PlusCode optional
postalAddress
readonly
類型: PostalAddress optional
priceLevel
readonly
類型: PriceLevel optional
地點的價格等級。這項屬性可傳回下列任一值:
  • Free
  • Inexpensive
  • Moderate
  • Expensive
  • Very Expensive
priceRange
readonly
類型: PriceRange optional
這個地點的價格範圍。endPrice 可能未設定,表示範圍沒有上限 (例如「超過 $100 美元」)。
primaryType
readonly
類型: string optional
地點的主要類型。如果沒有類型,則為 null。如果尚未從伺服器載入類型資料,則為 undefined。
primaryTypeDisplayName
readonly
類型: string optional
地點的主要類型顯示名稱。如果沒有類型,則為 null。如果尚未從伺服器載入類型資料,則為 undefined。
primaryTypeDisplayNameLanguageCode
readonly
類型: string optional
地點主要類型顯示名稱的語言。如果沒有類型,則為 null。如果尚未從伺服器載入類型資料,則為 undefined。
rating
readonly
類型: number optional
根據使用者對這個地點的評論,給予 1.0 到 5.0 的評分。
regularOpeningHours
readonly
類型: OpeningHours optional
這個地點的一般營業時間。不包括假日等特殊營業時間。
regularSecondaryOpeningHours
readonly
類型: Array<SecondaryOpeningHours> optional
這個地點的一般次要營業時間,不含假日和不定期休假等特殊營業時間。次要營業時間與地點的主要營業時間不同。舉例來說,餐廳可以將得來速或外送服務時間設為次要營業時間。
requestedLanguage
類型: string optional
這個地點要求的語言。
requestedRegion
類型: string optional
這個地點的要求區域。
resourceName
readonly
類型: string
不重複的地點資源名稱。
reviews
readonly
類型: Array<Review> optional
這個地點的評論清單。
reviewSummary
readonly
類型: ReviewSummary optional
這個地點的 ReviewSummary。
servesBeer
readonly
類型: boolean optional
地點是否供應啤酒。如果值已知,則傳回「true」或「false」。如果值不明,則傳回「null」。如果尚未要求這個欄位,則會傳回「undefined」。
servesBreakfast
readonly
類型: boolean optional
地點是否供應早餐。如果值已知,則傳回「true」或「false」。如果值不明,則傳回「null」。如果尚未要求這個欄位,則會傳回「undefined」。
servesBrunch
readonly
類型: boolean optional
地點是否供應早午餐。如果值已知,則傳回「true」或「false」。如果值不明,則傳回「null」。如果尚未要求這個欄位,則會傳回「undefined」。
servesCocktails
readonly
類型: boolean optional
servesCoffee
readonly
類型: boolean optional
servesDessert
readonly
類型: boolean optional
servesDinner
readonly
類型: boolean optional
地點是否供應晚餐。如果值已知,則傳回「true」或「false」。如果值不明,則傳回「null」。如果尚未要求這個欄位,則會傳回「undefined」。
servesLunch
readonly
類型: boolean optional
地點是否供應午餐。如果值已知,則傳回「true」或「false」。如果值不明,則傳回「null」。如果尚未要求這個欄位,則會傳回「undefined」。
servesVegetarianFood
readonly
類型: boolean optional
地點是否供應素食餐點。如果值已知,則傳回「true」或「false」。如果值不明,則傳回「null」。如果尚未要求這個欄位,則會傳回「undefined」。
servesWine
readonly
類型: boolean optional
地點是否供應葡萄酒。如果值已知,則傳回「true」或「false」。如果值不明,則傳回「null」。如果尚未要求這個欄位,則會傳回「undefined」。
shortFormattedAddress
readonly
類型: string optional
地點的簡短地址。
subDestinations
readonly
類型: Array<Place> optional
這個地點的子目的地清單。子目的地是與主要地點相關聯的特定地點。如果使用者搜尋的地點範圍較大或較複雜 (例如機場、國家公園、大學或體育場),這些圖釘可提供更具體的位置。
svgIconMaskURI
readonly
類型: string optional
SVG 圖片遮罩資源的 URI,可用來代表地點類別。
timeZone
readonly
類型: TimeZone optional
這個地點的時區。
transitStation
readonly
類型: TransitStation optional
大眾運輸站點的相關資訊。如果尚未從伺服器載入大眾運輸資料,則為 undefined。
types
readonly
類型: Array<string> optional
這個地點的類型陣列 (例如 ["political", "locality"] 或 ["restaurant", "establishment"])。
userRatingCount
readonly
類型: number optional
使用者對這個地點的評分數量,這些評分會影響地點的 Place.rating。
utcOffsetMinutes
readonly
類型: number optional
地點目前時區與世界標準時間 (UTC) 的時差,以分鐘為單位。舉例來說,澳洲東部標準時間 (GMT+10) 在日光節約時間比世界標準時間早 11 小時,因此 utc_offset_minutes 會是 660。如果時區晚於世界標準時間,偏移量為負值。舉例來說,維德角的 utc_offset_minutes 是 -60。
viewport
readonly
類型: LatLngBounds optional
在地圖上顯示這個地點時,優先使用的可視區域。
websiteURI
readonly
類型: string optional
這個地點的官方網站,例如商家的首頁。
openingHours
readonly
類型: OpeningHours optional
hasWiFi
readonly
類型: boolean optional
fetchFields
fetchFields(options)
參數:
傳回值: Promise<{place:Place}>
BetagetNextOpeningTime
getNextOpeningTime([date])
參數:
  • date: Date optional
傳回值: Promise<Date optional>
使用地點的 Place.regularOpeningHours 計算下一個營業時間的 Date。如果資料不足,無法計算結果,或這個地點未營業,則會傳回 undefined。
BetaisOpen
isOpen([date])
參數:
  • date: Date optional 預設為目前時間。
傳回值: Promise<boolean optional>
檢查該地點在指定 Date 是否營業。如果地點的已知資料不足,無法計算這項資訊 (例如未登記營業時間),則會解析為 undefined。
沿用: toJSON

PlaceOptions 介面

介面 google.maps.places.PlaceOptions
由 Place 實作

建構地點的選項。

id
選填
類型: string optional
專屬地點 ID。
requestedLanguage
選填
類型: string optional
語言 ID,用於指定傳回詳細資料時使用的語言。請參閱支援語言清單。
requestedRegion
選填
類型: string optional
使用者所在區域的區域代碼。這可能會影響傳回的相片,以及其他內容。區碼接受 ccTLD (「頂層網域」) 的兩位字元值。多數 ccTLD 代碼與 ISO 3166-1 代碼相同,只有少數例外。舉例來說,英國的 ccTLD 是「uk」(.co.uk),而 ISO 3166-1 代碼則是「gb」(技術上代表「大不列顛暨北愛爾蘭聯合王國」)。
resourceName
選填
類型: string optional
不重複的地點資源名稱。

AccessibilityOptions 類別

class google.maps.places.AccessibilityOptions
library "places"

const {AccessibilityOptions} = await google.maps.importLibrary("places");
hasWheelchairAccessibleEntrance
readonly
類型: boolean optional
地點是否有無障礙入口。如果值已知,則傳回「true」或「false」。如果值不明,則傳回「null」。
hasWheelchairAccessibleParking
readonly
類型: boolean optional
地點是否提供無障礙停車位。如果值已知,則傳回「true」或「false」。如果值不明,則傳回「null」。
hasWheelchairAccessibleRestroom
readonly
類型: boolean optional
地點是否設有無障礙洗手間。如果值已知,則傳回「true」或「false」。如果值不明,則傳回「null」。
hasWheelchairAccessibleSeating
readonly
類型: boolean optional
地點是否提供無障礙座位。如果值已知,則傳回「true」或「false」。如果值不明,則傳回「null」。

AddressComponent 類別

class google.maps.places.AddressComponent
library "places"

地點位置的地址元件。

const {AddressComponent} = await google.maps.importLibrary("places");
longText
readonly
類型: string optional
地址元件的全文。
shortText
readonly
類型: string optional
指定地址元件的縮寫短文字。
types
readonly
類型: Array<string>
表示這個地址元件類型的字串陣列。如要查看有效類型清單,請按這裡。
沿用: toJSON

AddressDescriptor 類別

class google.maps.places.AddressDescriptor
library "places"

位置的相對描述。包含一組經過排序的附近地標、精確的涵蓋區域,以及這些區域與目標位置的關係。

const {AddressDescriptor} = await google.maps.importLibrary("places");
areas
readonly
類型: Array<Area>
包含或相鄰區域的排名清單。最容易辨識且精確的區域會排在最前面。
landmarks
readonly
類型: Array<Landmark>
附近地標的排名清單。最知名且鄰近的地標會優先顯示。
沿用: toJSON

Area 類別

class google.maps.places.Area
library "places"

區域資訊,以及該區域與指定地區的關係。

const {Area} = await google.maps.importLibrary("places");
containment
readonly
類型: Containment optional
定義指定地區與區域之間的空間關係。
place
readonly
類型: Place
區域的地點。
沿用: toJSON

Attribution 類別

class google.maps.places.Attribution
library "places"

地點資料供應商的相關資訊。

const {Attribution} = await google.maps.importLibrary("places");
provider
readonly
類型: string optional
地點資料供應商的名稱。
providerURI
readonly
類型: string optional
地點資料供應商的 URI。
沿用: toJSON

AuthorAttribution 類別

class google.maps.places.AuthorAttribution
library "places"

使用者原創內容作者的相關資訊。

const {AuthorAttribution} = await google.maps.importLibrary("places");
displayName
readonly
類型: string
這項結果的作者名稱。
photoURI
readonly
類型: string optional
這項結果的作者相片 URI。系統不一定會顯示選項。
uri
readonly
類型: string optional
這筆結果的作者個人資料 URI。
沿用: toJSON

ConnectorAggregation 類別

class google.maps.places.ConnectorAggregation
library "places"

電動車充電資訊,依相同類型和充電速率的接頭匯總。

const {ConnectorAggregation} = await google.maps.importLibrary("places");
availabilityLastUpdateTime
readonly
類型: Date optional
上次更新這個匯總資料中連接器可用性資訊的時間。
availableCount
readonly
類型: number optional
這個匯總中目前可用的連接器數量。
count
readonly
類型: number
這個匯總中的連接器數量。
maxChargeRateKw
readonly
類型: number
匯總中每個接頭的靜態最大充電速率 (單位為 kW)。
outOfServiceCount
readonly
類型: number optional
這個匯總中目前無法使用的連接器數量。
type
readonly
類型: EVConnectorType optional
這個匯總的連接器類型。

ConsumerAlert 類別

class google.maps.places.ConsumerAlert
library "places"

消費者快訊訊息。所有文字都會以 languageCode 欄位指定的語言顯示。

const {ConsumerAlert} = await google.maps.importLibrary("places");
details
readonly
類型: ConsumerAlertDetails optional
消費者快訊訊息的詳細資料。
languageCode
readonly
類型: string optional
消費者快訊訊息的語言代碼。
overview
readonly
類型: string optional
消費者快訊訊息總覽。
沿用: toJSON

ConsumerAlertDetails 類別

class google.maps.places.ConsumerAlertDetails
library "places"

消費者快訊訊息的詳細資料。

const {ConsumerAlertDetails} = await google.maps.importLibrary("places");
aboutLinkTitle
readonly
類型: string optional
連結顯示的標題,用於提供更多資訊。
aboutLinkURI
readonly
類型: string optional
提供更多資訊的連結 URI。
description
readonly
類型: string optional
消費者快訊訊息的說明。
title
readonly
類型: string optional
與詳細說明一併顯示的標題。

Containment 常數

constants google.maps.places.Containment
library "places"

定義指定地區與區域之間的空間關係。詳情請參閱網路服務說明文件。

這些常數也可以做為字串使用。在 TypeScript 中,字串常值是由 ContainmentString 類型定義。

const {Containment} = await google.maps.importLibrary("places");
NEAR 指定地區不在區域內,但距離不遠。詳情請參閱網路服務說明文件。
OUTSKIRTS 目標位置位於區域內,靠近邊緣。詳情請參閱網路服務說明文件。
WITHIN 目標位置位於區域內,靠近中心。詳情請參閱網路服務說明文件。

ContentBlock 類別

class google.maps.places.ContentBlock
library "places"

ContentBlock 會說明摘要內容和來源。

const {ContentBlock} = await google.maps.importLibrary("places");
content
readonly
類型: string optional
與主題相關的內容。
contentLanguageCode
readonly
類型: string optional
內容的語言代碼。
referencedPlaces
readonly
類型: Array<Place>
參照的 Place 清單。首次擷取時,每個地點的 id 欄位只會包含地點 ID。
沿用: toJSON

EVChargeAmenitySummary 類別

class google.maps.places.EVChargeAmenitySummary
library "places"

AI 生成的電動車充電站附近設施摘要。這項設定僅適用於類型為 electric_vehicle_charging_station 的地點。

const {EVChargeAmenitySummary} = await google.maps.importLibrary("places");
coffee
readonly
類型: ContentBlock optional
附近咖啡店的摘要。
disclosureText
readonly
類型: string optional
與這份摘要相關的揭露聲明文字。
disclosureTextLanguageCode
readonly
類型: string optional
揭露事項文字的語言代碼。
flagContentURI
readonly
類型: string optional
用於回報摘要問題的 URI。
overview
readonly
類型: ContentBlock optional
可用設施總覽。
restaurant
readonly
類型: ContentBlock optional
附近餐廳的摘要。
store
readonly
類型: ContentBlock optional
附近商店摘要。
沿用: toJSON

EVChargeOptions 類別

class google.maps.places.EVChargeOptions
library "places"

地點內電動車充電站的相關資訊。

const {EVChargeOptions} = await google.maps.importLibrary("places");
connectorAggregations
readonly
電動車充電接頭匯總清單,其中包含相同類型和相同充電速率的接頭。
connectorCount
readonly
類型: number
這個充電站的連接器數量。部分充電座可能有多個連接器,但一次只能為一部車充電,因此連接器數量可能會大於可同時充電的車輛總數。
沿用: toJSON

EVConnectorType 常數

constants google.maps.places.EVConnectorType
library "places"

如要進一步瞭解電動車充電接頭類型,請參閱 http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=6872107。詳情請參閱網路服務說明文件。

這些常數也可以做為字串使用。在 TypeScript 中,字串常值是由 EVConnectorTypeString 類型定義。

const {EVConnectorType} = await google.maps.importLibrary("places");
CCS_COMBO_1 整合式充電系統 (AC 和 DC)。詳情請參閱網路服務說明文件。
CCS_COMBO_2 整合式充電系統 (AC 和 DC)。詳情請參閱網路服務說明文件。
CHADEMO CHAdeMO 類型接頭。詳情請參閱網路服務說明文件。
J1772 J1772 1 型接頭。詳情請參閱網路服務說明文件。
NACS 北美充電標準 (NACS),標準化為 SAE J3400。詳情請參閱網路服務說明文件。
OTHER 其他連接器類型。詳情請參閱網路服務說明文件。
TESLA 一般 TESLA 連接器。詳情請參閱網路服務說明文件。
TYPE_2 IEC 62196 Type 2 接頭。詳情請參閱網路服務說明文件。
UNSPECIFIED_GB_T GB/T 類型對應中國的 GB/T 標準。詳情請參閱網路服務說明文件。
UNSPECIFIED_WALL_OUTLET 未指定的電源插座。詳情請參閱網路服務說明文件。

EVSearchOptions 介面

介面 google.maps.places.EVSearchOptions

可為 Place Search 要求指定的電動車相關選項。

connectorTypes
選填
類型: Array<EVConnectorType> optional
偏好的電動車充電插頭類型清單。不支援任何所列接頭類型的地點會遭到篩除。
minimumChargingRateKw
選填
類型: number optional
最低充電速率 (單位為千瓦)。系統會篩除充電速率低於指定速率的地點。

FetchFieldsRequest 介面

介面 google.maps.places.FetchFieldsRequest

擷取 Place 欄位的選項。

fields
類型: Iterable<string>
要擷取的欄位清單。
internalUsageAttributionIds
選填
類型: Iterable<string> optional
用於將呼叫歸因於特定套件或 OSS 程式庫的 ID。

FuelOptions 類別

class google.maps.places.FuelOptions
library "places"

加油站燃料選項的最新資訊。這項資訊會定期更新。

const {FuelOptions} = await google.maps.importLibrary("places");
fuelPrices
readonly
類型: Array<FuelPrice>
這間加油站提供的各種燃料價格清單,每種燃料類型一個項目。
沿用: toJSON

FuelPrice 類別

class google.maps.places.FuelPrice
library "places"

特定燃料類型的燃料價格資訊。

const {FuelPrice} = await google.maps.importLibrary("places");
price
readonly
類型: Money optional
燃料價格。
type
readonly
類型: FuelType optional
燃料類型。
updateTime
readonly
類型: Date optional
上次更新油價的時間。

FuelType 常數

constants google.maps.places.FuelType
library "places"

燃料類型。詳情請參閱網路服務說明文件。

這些常數也可以做為字串使用。在 TypeScript 中,字串常值是由 FuelTypeString 類型定義。

const {FuelType} = await google.maps.importLibrary("places");
BIO_DIESEL 生質柴油。詳情請參閱網路服務說明文件。
DIESEL 柴油。詳情請參閱網路服務說明文件。
DIESEL_PLUS 柴油和燃料。詳情請參閱網路服務說明文件。
E100 E 100。詳情請參閱網路服務說明文件。
E80 E 80。詳情請參閱網路服務說明文件。
E85 E 85。詳情請參閱網路服務說明文件。
LPG 液化石油氣。詳情請參閱網路服務說明文件。
METHANE 甲烷。詳情請參閱網路服務說明文件。
MIDGRADE 中級。詳情請參閱網路服務說明文件。
PREMIUM 實惠價格,詳情請參閱網路服務說明文件。
REGULAR_UNLEADED 一般無鉛汽油。詳情請參閱網路服務說明文件。
SP100 SP 100。詳情請參閱網路服務說明文件。
SP91 SP 91. 詳情請參閱網路服務說明文件。
SP91_E10 SP 91 E10。詳情請參閱網路服務說明文件。
SP92 SP 92。詳情請參閱網路服務說明文件。
SP95 SP 95。詳情請參閱網路服務說明文件。
SP95_E10 SP95 E10。詳情請參閱網路服務說明文件。
SP98 SP 98. 詳情請參閱網路服務說明文件。
SP99 SP 99。詳情請參閱網路服務說明文件。
TRUCK_DIESEL 卡車柴油。詳情請參閱網路服務說明文件。

GenerativeSummary 類別

class google.maps.places.GenerativeSummary
library "places"

AI 生成的地點摘要。

const {GenerativeSummary} = await google.maps.importLibrary("places");
disclosureText
readonly
類型: string optional
與這份摘要相關的揭露聲明文字。
disclosureTextLanguageCode
readonly
類型: string optional
揭露事項文字的語言代碼。
flagContentURI
readonly
類型: string optional
用於回報摘要問題的 URI。
overview
readonly
類型: string optional
地點總覽。
overviewLanguageCode
readonly
類型: string optional
簡介的語言代碼。
沿用: toJSON

class google.maps.places.GoogleMapsLinks
library "places"

觸發不同 Google 地圖動作的連結。

const {GoogleMapsLinks} = await google.maps.importLibrary("places");
directionsURI
readonly
類型: string optional
在 Google 地圖上顯示前往該地點路線的連結。連結只會填入目的地位置,並使用預設交通方式 DRIVE。
photosURI
readonly
類型: string optional
Google 地圖上顯示該地點相片的連結。
placeURI
readonly
類型: string optional
在 Google 地圖上顯示地點的連結。
reviewsURI
readonly
類型: string optional
這個連結會顯示 Google 地圖上該地點的評論。
writeAReviewURI
readonly
類型: string optional
在 Google 地圖上撰寫地點評論的連結。
沿用: toJSON

Landmark 類別

class google.maps.places.Landmark
library "places"

地標的基本資訊,以及地標與目標位置的關係。地標是可用來描述位置的知名地點。

const {Landmark} = await google.maps.importLibrary("places");
place
readonly
類型: Place
地標的位置。
spatialRelationship
readonly
目標位置與地標之間的空間關係。
straightLineDistanceMeters
readonly
類型: number
目標中心點與地標中心點之間的直線距離,以公尺為單位。在某些情況下,這個值可能會超過 travelDistanceMeters。
travelDistanceMeters
readonly
類型: number optional
沿著路網從目標到地標的移動距離 (以公尺為單位,如果已知)。這個值不會考量交通方式,例如步行、開車、騎單車。
沿用: toJSON

Money 類別

class google.maps.places.Money
library "places"

代表金額及其幣別。

const {Money} = await google.maps.importLibrary("places");
currencyCode
readonly
類型: string
ISO 4217 定義的三碼貨幣代碼。
nanos
readonly
類型: number
金額的奈米 (10^-9) 單位數量。
units
readonly
類型: number
金額的整數單位。舉例來說,如果 Money.currencyCode 為「USD」,則 1 個單位為 1 美元。
toString
toString()
參數:無
傳回值: string
傳回人類可讀的金額表示法,並附上貨幣符號。
沿用: toJSON

NeighborhoodSummary 類別

class google.maps.places.NeighborhoodSummary
library "places"

AI 生成的地點附近搜尋點摘要。

const {NeighborhoodSummary} = await google.maps.importLibrary("places");
description
readonly
類型: ContentBlock optional
鄰近地區的詳細說明。
disclosureText
readonly
類型: string optional
與這份摘要相關的揭露聲明文字。
disclosureTextLanguageCode
readonly
類型: string optional
揭露事項文字的語言代碼。
flagContentURI
readonly
類型: string optional
用於回報摘要問題的 URI。
overview
readonly
類型: ContentBlock optional
街區簡介。
沿用: toJSON

OpeningHours 類別

類別 google.maps.places.OpeningHours
由 SecondaryOpeningHours 擴充
程式庫 "places"

地點的營業時間資訊。

const {OpeningHours} = await google.maps.importLibrary("places");
periods
readonly
涵蓋一週每天的營業時段,從週日開始,按時間順序排列。不含地點未營業的日子。
specialDays
readonly
類型: Array<Date>
代表目前期間內特殊日期的日期陣列。特殊日期會影響地點的營業時間,例如聖誕節或一次性停業。如有特殊營業時間,請設定 currentOpeningHours 和 currentSecondaryOpeningHours。
weekdayDescriptions
readonly
類型: Array<string>
包含七個字串的陣列,以特定格式表示一週內每天的營業時間。Places 服務會配合目前語言調整營業時間格式,並將時間在地化。這個陣列中的元素順序取決於語言。有些語言是以週一做為每週起始日,有些則是週日。
沿用: toJSON

OpeningHoursPeriod 類別

class google.maps.places.OpeningHoursPeriod
library "places"

地點的營業時間。

const {OpeningHoursPeriod} = await google.maps.importLibrary("places");
close
readonly
類型: OpeningHoursPoint optional
地點的關閉時間。
open
readonly
地點的營業時間。
沿用: toJSON

OpeningHoursPoint 類別

class google.maps.places.OpeningHoursPoint
library "places"

地點變更營業狀態的時間點。

const {OpeningHoursPoint} = await google.maps.importLibrary("places");
day
readonly
類型: number
星期幾,以 [0, 6] 範圍內的數字表示,從星期日開始。例如,2 表示週二。
hour
readonly
類型: number
OpeningHoursPoint.time 的小時,以數字表示,範圍為 [0, 23]。系統回報的是以地點的時區為準。
minute
readonly
類型: number
OpeningHoursPoint.time 的分鐘,以數字表示,範圍為 [0, 59]。系統回報的是以地點的時區為準。
沿用: toJSON

SecondaryOpeningHours 類別

class google.maps.places.SecondaryOpeningHours extends OpeningHours
library "places"

地點次要營業時間的相關資訊。

const {SecondaryOpeningHours} = await google.maps.importLibrary("places");
type
readonly
類型: string optional
次要營業時間的類型。這代表次要營業時間適用的服務,例如外帶、外送或自取。如需有效值清單,請參閱 SecondaryHoursType。
繼承: periods、specialDays、weekdayDescriptions
沿用: toJSON

ParkingOptions 類別

class google.maps.places.ParkingOptions
library "places"

const {ParkingOptions} = await google.maps.importLibrary("places");
hasFreeGarageParking
readonly
類型: boolean optional
地點是否提供免費室內停車場。如果值已知,則傳回「true」或「false」。如果值不明,則傳回「null」。
hasFreeParkingLot
readonly
類型: boolean optional
地點是否提供免費停車場。如果值已知,則傳回「true」或「false」。如果值不明,則傳回「null」。
hasFreeStreetParking
readonly
類型: boolean optional
地點是否提供免費路邊車位。如果值已知,則傳回「true」或「false」。如果值不明,則傳回「null」。
hasPaidGarageParking
readonly
類型: boolean optional
地點是否提供付費室內停車場。如果值已知,則傳回「true」或「false」。如果值不明,則傳回「null」。
hasPaidParkingLot
readonly
類型: boolean optional
地點是否提供付費停車場。如果值已知,則傳回「true」或「false」。如果值不明,則傳回「null」。
hasPaidStreetParking
readonly
類型: boolean optional
地點是否提供付費路邊車位。如果值已知,則傳回「true」或「false」。如果值不明,則傳回「null」。
hasValetParking
readonly
類型: boolean optional
地點是否提供代客泊車服務。如果值已知,則傳回「true」或「false」。如果值不明,則傳回「null」。

PaymentOptions 類別

class google.maps.places.PaymentOptions
library "places"

const {PaymentOptions} = await google.maps.importLibrary("places");
acceptsCashOnly
readonly
類型: boolean optional
地點是否只接受現金付款。如果值已知,則傳回「true」或「false」。如果值不明,則傳回「null」。
acceptsCreditCards
readonly
類型: boolean optional
地點是否接受信用卡付款。如果值已知,則傳回「true」或「false」。如果值不明,則傳回「null」。
acceptsDebitCards
readonly
類型: boolean optional
地點是否接受簽帳金融卡付款。如果值已知,則傳回「true」或「false」。如果值不明,則傳回「null」。
acceptsNFC
readonly
類型: boolean optional
地點是否接受 NFC 付款。如果值已知,則傳回「true」或「false」。如果值不明,則傳回「null」。

Photo 類別

class google.maps.places.Photo
library "places"

地點相片的相關資訊。

const {Photo} = await google.maps.importLibrary("places");
authorAttributions
readonly
這張相片要顯示的作者資訊文字。
flagContentURI
readonly
類型: string optional
使用者可透過這個連結檢舉相片問題。
googleMapsURI
readonly
類型: string optional
在 Google 地圖上顯示相片的連結。
heightPx
readonly
類型: number
相片高度 (以像素為單位)。
widthPx
readonly
類型: number
相片寬度 (以像素為單位)。
getURI
getURI([options])
參數:
傳回值: string
傳回與指定選項對應的圖片網址。
沿用: toJSON

PlusCode 類別

class google.maps.places.PlusCode
library "places"

地點的 Plus Code。詳情請參閱 https://plus.codes/。

const {PlusCode} = await google.maps.importLibrary("places");
compoundCode
readonly
類型: string optional
Plus Code 的範圍為 1/8000 度乘以 1/8000 度,其中前四個字元 (區碼) 會移除,並替換為位置說明。例如「9G8F+5W Zurich, Switzerland」。
globalCode
readonly
類型: string optional
Plus Code,面積為 1/8000 度 x 1/8000 度。例如「8FVC9G8F+5W」。
沿用: toJSON

PostalAddress 類別

類別 google.maps.places.PostalAddress 實作 PostalAddressLiteral
程式庫 "places"

代表郵寄地址 (例如郵政服務遞送物品的地址)。注意:JavaScript API 會使用 PostalAddress 例項化物件,代表 Web Service 傳回的資料。

const {PostalAddress} = await google.maps.importLibrary("places");
addressLines
readonly
類型: Array<string>
非結構化的地址行,說明地址的低層級項目。
administrativeArea
readonly
類型: string optional
國家/地區或區域郵寄地址使用的最高行政區劃。
languageCode
readonly
類型: string optional
這個地址內容的 BCP-47 語言代碼。例如:「zh-Hant」、「ja」、「ja-Latn」、「en」。
locality
readonly
類型: string optional
通常是指地址中的城市/鄉鎮部分。
organization
readonly
類型: string optional
地址中的機構名稱。
postalCode
readonly
類型: string optional
地址的郵遞區號。
recipients
readonly
類型: Array<string>
地址的收件者。
regionCode
readonly
類型: string
地址所在國家/地區的 CLDR 地區代碼。例如:瑞士為「CH」。詳情請參閱 https://cldr.unicode.org/ 和 https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html。
sortingCode
readonly
類型: string optional
地址的排序代碼。
sublocality
readonly
類型: string optional
地址的子區域,例如鄰里、行政區或地區。
沿用: toJSON

PostalAddressLiteral 介面

介面 google.maps.places.PostalAddressLiteral
由 PostalAddress 實作

用於填入 PostalAddress 的資料。

regionCode
類型: string
詳情請參閱《PostalAddress.regionCode》。
addressLines
選填
類型: Iterable<string> optional
詳情請參閱《PostalAddress.addressLines》。
administrativeArea
選填
類型: string optional
詳情請參閱《PostalAddress.administrativeArea》。
languageCode
選填
類型: string optional
詳情請參閱《PostalAddress.languageCode》。
locality
選填
類型: string optional
詳情請參閱《PostalAddress.locality》。
organization
選填
類型: string optional
詳情請參閱《PostalAddress.organization》。
postalCode
選填
類型: string optional
詳情請參閱《PostalAddress.postalCode》。
recipients
選填
類型: Iterable<string> optional
詳情請參閱《PostalAddress.recipients》。
sortingCode
選填
類型: string optional
詳情請參閱《PostalAddress.sortingCode》。
sublocality
選填
類型: string optional
詳情請參閱《PostalAddress.sublocality》。

PriceLevel 常數

constants google.maps.places.PriceLevel
library "places"

地點的價格等級。詳情請參閱網路服務說明文件。

這些常數也可以做為字串使用。在 TypeScript 中,字串常值是由 PriceLevelString 類型定義。

const {PriceLevel} = await google.maps.importLibrary("places");
EXPENSIVE 地點提供高價服務。詳情請參閱網路服務說明文件。
FREE 地點提供免費服務。詳情請參閱網路服務說明文件。
INEXPENSIVE 地點提供平價服務。詳情請參閱網路服務說明文件。
MODERATE 地點提供中等價位的服務。詳情請參閱網路服務說明文件。
VERY_EXPENSIVE 地點提供非常昂貴的服務。詳情請參閱網路服務說明文件。

PriceRange 類別

class google.maps.places.PriceRange
library "places"

與地點相關聯的價格範圍。endPrice 可能未設定,表示範圍沒有上限 (例如「超過 $100 美元」)。

const {PriceRange} = await google.maps.importLibrary("places");
endPrice
readonly
類型: Money optional
價格範圍上限 (含)。價格應低於這個金額。
startPrice
readonly
類型: Money
價格範圍的低端值 (含)。價格應等於或高於這個金額。
沿用: toJSON

Review class

class google.maps.places.Review
library "places"

地點評論的相關資訊。

const {Review} = await google.maps.importLibrary("places");
authorAttribution
readonly
類型: AuthorAttribution optional
評論者。
flagContentURI
readonly
類型: string optional
使用者可透過這個連結檢舉評論問題。
googleMapsURI
readonly
類型: string optional
在 Google 地圖上顯示評論的連結。
originalText
readonly
類型: string optional
評論原文。
originalTextLanguageCode
readonly
類型: string optional
網際網路工程任務組 (IETF) 語言代碼,指出評論的原始語言。
publishTime
readonly
類型: Date optional
rating
readonly
類型: number optional
這則評論的評分,介於 1.0 至 5.0 (含) 之間。
relativePublishTimeDescription
readonly
類型: string optional
近期時間的格式化字串,以適合語言和國家/地區的形式,表示評論時間與目前時間的相對關係。例如 `"a month ago"'。
text
readonly
類型: string optional
評論的本地化文字。
textLanguageCode
readonly
類型: string optional
網際網路工程任務組 (IETF) 語言代碼,指出評論的本地化語言。
visitDateMonth
readonly
類型: number optional
評論作者造訪地點的月份。這個欄位以 0 為基準,0 代表 1 月,11 代表 12 月。
visitDateYear
readonly
類型: number optional
評論作者造訪地點的年份。
沿用: toJSON

ReviewSummary 類別

class google.maps.places.ReviewSummary
library "places"

AI 生成的地點使用者評論摘要。

const {ReviewSummary} = await google.maps.importLibrary("places");
disclosureText
readonly
類型: string optional
與這份摘要相關的揭露聲明文字。
disclosureTextLanguageCode
readonly
類型: string optional
揭露事項文字的語言代碼。
flagContentURI
readonly
類型: string optional
用於回報摘要問題的 URI。
reviewsURI
readonly
類型: string optional
在 Google 地圖上顯示這個地點評論的 URI。
text
readonly
類型: string optional
使用者評論摘要。
textLanguageCode
readonly
類型: string optional
使用者評論摘要的語言代碼。
沿用: toJSON

SearchByTextRequest 介面

介面 google.maps.places.SearchByTextRequest

Place.searchByText 的要求介面。

fields
類型: Array<string>
要納入回應的欄位,這些欄位會計費。如果傳入 ['*'],系統會傳回所有可用的欄位並據此收費 (不建議用於實際工作環境部署作業)。您可以要求 Place 類別中的任何屬性做為欄位。
evSearchOptions
選填
類型: EVSearchOptions optional
可為 Place Search 要求指定的電動車相關選項。
futureOpeningBusinessesIncluded
選填
類型: boolean optional
包含尚未營業但預計未來會營業的地點。
includedType
選填
類型: string optional
要求的地點類型。如需支援類型的完整清單,請前往 https://developers.google.com/maps/documentation/places/web-service/place-types。僅支援一個納入類型。查看「SearchByTextRequest.useStrictTypeFiltering」
internalUsageAttributionIds
選填
類型: Iterable<string> optional
用於將呼叫歸因於特定套件或 OSS 程式庫的 ID。
isOpenNow
選填
類型: boolean optional
預設值: false
用於將搜尋範圍限制在目前營業中的地點。
language
選填
類型: string optional
系統會盡可能以偏好語言顯示地點詳細資料。預設為瀏覽器的語言偏好設定。目前支援的語言清單:https://developers.google.com/maps/faq#languagesupport。
locationBias
選填
要搜尋的區域。這個位置會做為偏好設定,也就是說,系統可能會傳回指定位置附近的結果。無法與 locationRestriction 一起設定。
locationRestriction
選填
要搜尋的區域。這個位置會做為限制,也就是說,系統不會傳回指定位置以外的結果。無法與 locationBias 一起設定。
maxResultCount
選填
類型: number optional
要傳回的結果數上限。必須介於 1 到 20 之間 (含 1 和 20)。
minRating
選填
類型: number optional
篩除平均使用者評分低於此限制的結果。有效值必須是介於 0 至 5 (含) 之間的浮點數,且間隔為 0.5,也就是 [0, 0.5, 1.0, ... , 5.0] (含)。輸入的評分會無條件進位至最接近的 0.5。舉例來說,如果評分為 0.6,系統會排除所有評分低於 1.0 的結果。
priceLevels
選填
類型: Array<PriceLevel> optional
用於將搜尋範圍限制在標示為特定價格等級的地點。您可以選擇任何價格等級組合。預設為所有價格等級。
pureServiceAreaBusinessesIncluded
選填
類型: boolean optional
如果欄位設為 true,則納入完全無店面區域商家。完全無店面區域商家會直接配送或到場服務,但不在公司地址為顧客提供服務。舉例來說,清潔或水電服務等商家可能沒有實體地址,或未在 Google 地圖上列出地點。Places 不會傳回這些商家的 location、plusCode 和其他位置相關欄位。
query
選填
類型: string optional
BetarankBy
選填
類型: SearchByTextRankPreference optional
rankPreference
選填
類型: SearchByTextRankPreference optional
預設值: SearchByTextRankPreference.RELEVANCE
回應中結果的排序方式。
region
選填
類型: string optional
要求來源位置的 Unicode 國家/地區代碼 (CLDR)。這個參數用於顯示 Place Details,例如特定區域的地點名稱 (如有)。這項參數可能會根據適用法律影響結果。詳情請參閱 https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html。請注意,目前不支援 3 位數的區域代碼。
textQuery
選填
類型: string optional
如果不使用 SearchByTextRequest.query,則必須提供。Text Search 的文字查詢。
useStrictTypeFiltering
選填
類型: boolean optional
預設值: false
用於設定 SearchByTextRequest.includedType 的嚴格類型篩選。如果設為 True,系統只會傳回相同類型的結果。

SearchByTextRankPreference 常數

constants google.maps.places.SearchByTextRankPreference
library "places"

回應中結果的排序方式。詳情請參閱網路服務說明文件。

這些常數也可以做為字串使用。在 TypeScript 中,字串常值是由 SearchByTextRankPreferenceString 類型定義。

const {SearchByTextRankPreference} = await google.maps.importLibrary("places");
DISTANCE 依距離排序結果。詳情請參閱網路服務說明文件。
RELEVANCE 依關聯性排序結果。詳情請參閱網路服務說明文件。

SearchNearbyRequest 介面

介面 google.maps.places.SearchNearbyRequest

Place.searchNearby 的要求介面。如要進一步瞭解要求,請參閱 Places API 參考資料。

fields
類型: Array<string>
要納入回應的欄位,這些欄位會計費。如果傳入 ['*'],系統會傳回所有可用的欄位並據此收費 (不建議用於實際工作環境部署作業)。您可以要求 Place 類別中的任何屬性做為欄位。
locationRestriction
要搜尋的區域,以圓形表示,並指定中心點和半徑。系統不會傳回指定位置以外的結果。
excludedPrimaryTypes
選填
類型: Array<string> optional
排除的主要地點類型。請參閱支援類型的完整清單。一個地點只能有一個主要類型。最多可指定 50 種類型。如果您在 included 和 excluded 清單中指定相同類型,系統會傳回 INVALID_ARGUMENT 錯誤。
excludedTypes
選填
類型: Array<string> optional
排除的地點類型。請參閱支援類型的完整清單。一個地點可以有多種不同的地點類型。最多可指定 50 種類型。如果您在 included 和 excluded 清單中指定相同類型,系統會傳回 INVALID_ARGUMENT 錯誤。
futureOpeningBusinessesIncluded
選填
類型: boolean optional
包含尚未營業但預計未來會營業的地點。
includedPrimaryTypes
選填
類型: Array<string> optional
包含的主要地點類型。請參閱支援類型的完整清單。一個地點只能有一個主要類型。最多可指定 50 種類型。如果您在 included 和 excluded 清單中指定相同類型,系統會傳回 INVALID_ARGUMENT 錯誤。
includedTypes
選填
類型: Array<string> optional
包含的地點類型。請參閱支援類型的完整清單。一個地點可以有多種不同的地點類型。最多可指定 50 種類型。如果您在 included 和 excluded 清單中指定相同類型,系統會傳回 INVALID_ARGUMENT 錯誤。
internalUsageAttributionIds
選填
類型: Iterable<string> optional
用於將呼叫歸因於特定套件或 OSS 程式庫的 ID。
language
選填
類型: string optional
系統會盡可能以偏好語言顯示地點詳細資料。預設為瀏覽器的語言偏好設定。目前支援的語言清單:https://developers.google.com/maps/faq#languagesupport。
maxResultCount
選填
類型: number optional
要傳回的結果數上限。如要瞭解可接受的值和預設值,請參閱 Places API 參考資料。
rankPreference
選填
類型: SearchNearbyRankPreference optional
預設值: SearchNearbyRankPreference.POPULARITY
回應中結果的排序方式。
region
選填
類型: string optional
要求來源位置的 Unicode 國家/地區代碼 (CLDR)。這個參數用於顯示 Place Details,例如特定區域的地點名稱 (如有)。這項參數可能會根據適用法律影響結果。詳情請參閱 https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html。請注意,目前不支援 3 位數的區域代碼。

SearchNearbyRankPreference 常數

constants google.maps.places.SearchNearbyRankPreference
library "places"

回應中結果的排序方式。詳情請參閱網路服務說明文件。

這些常數也可以做為字串使用。在 TypeScript 中,字串常值是由 SearchNearbyRankPreferenceString 類型定義。

const {SearchNearbyRankPreference} = await google.maps.importLibrary("places");
DISTANCE 依距離排序結果。詳情請參閱網路服務說明文件。
POPULARITY 依熱門程度排序結果。詳情請參閱網路服務說明文件。

SpatialRelationship 常數

constants google.maps.places.SpatialRelationship
library "places"

定義目標位置和地標之間的空間關係。詳情請參閱網路服務說明文件。

這些常數也可以做為字串使用。在 TypeScript 中,字串常值是由 SpatialRelationshipString 類型定義。

const {SpatialRelationship} = await google.maps.importLibrary("places");
ACROSS_THE_ROAD 目標位於地標正對面,在道路另一側。詳情請參閱網路服務說明文件。
AROUND_THE_CORNER 與地標不在同一條路線上,但只要轉一次彎就會到。詳情請參閱網路服務說明文件。
BEHIND 靠近地標建築,但距離街道入口較遠。詳情請參閱網路服務說明文件。
BESIDE 目標緊鄰地標。詳情請參閱網路服務說明文件。
DOWN_THE_ROAD 與地標位於同一條路線上,但不在地標旁邊或對面。詳情請參閱網路服務說明文件。
NEAR 如果下方沒有更具體的關係,則預設為此關係。詳情請參閱網路服務說明文件。
WITHIN 地標具有空間幾何圖形,且目標位於其範圍內。詳情請參閱網路服務說明文件。

TimeZone 類別

class google.maps.places.TimeZone
library "places"

代表 IANA 時區資料庫 (https://www.iana.org/time-zones) 中的時區。

const {TimeZone} = await google.maps.importLibrary("places");
id
readonly
類型: string optional
IANA 時區資料庫時區。例如「America/New_York」。
version
readonly
類型: string optional
IANA 時區資料庫版本號碼。例如「2019a」。
沿用: toJSON

TransitAgency 類別

class google.maps.places.TransitAgency
library "places"

代表運輸公司。

const {TransitAgency} = await google.maps.importLibrary("places");
displayName
類型: string optional
以要求語言顯示的代理商名稱。
displayNameLanguageCode
類型: string optional
代理商名稱文字的 BCP-47 語言代碼,例如「en-US」或「sr-Latn」。詳情請參閱 http://www.unicode.org/reports/tr35/#Unicode_locale_identifier。
fareURL
類型: URL optional
代理商票價詳細資料頁面的網址。
icon
類型: TransitIcon optional
大眾運輸系統的本地化品牌圖示。
lines
類型: Array<TransitLine>
這家運輸公司營運的大眾運輸路線。
url
類型: URL optional
代理商首頁的網址。
沿用: toJSON

TransitIcon 類別

class google.maps.places.TransitIcon
library "places"

代表大眾運輸圖示。

const {TransitIcon} = await google.maps.importLibrary("places");
nameIncluded
類型: boolean optional
圖示是否包含名稱,且不需要在圖示旁顯示名稱。
url
類型: URL optional
圖示的網址。
沿用: toJSON

TransitLine 類

class google.maps.places.TransitLine
library "places"

代表大眾運輸路線。

const {TransitLine} = await google.maps.importLibrary("places");
backgroundColor
類型: string optional
這條大眾運輸路線標籤的背景顏色,以十六進位格式表示 (例如「#909CE1」)。這個顏色也可用於繪製這條大眾運輸路線的形狀。
displayName
類型: string optional
這條大眾運輸路線的全名 (例如「Sunnydale local」)。
displayNameLanguageCode
類型: string optional
大眾運輸路線全名文字的 BCP-47 語言代碼,例如「en-US」或「sr-Latn」。詳情請參閱 http://www.unicode.org/reports/tr35/#Unicode_locale_identifier。
icon
類型: TransitIcon optional
這條路線的圖示。
id
類型: string optional
大眾運輸路線的 ID,可用於在同一大眾運輸站點中,區分該路線與其他大眾運輸路線。這個 ID 不保證在不同回應中保持穩定。
shortDisplayName
類型: string optional
這條大眾運輸路線的簡稱 (例如「S2」)。
shortDisplayNameLanguageCode
類型: string optional
大眾運輸路線簡稱文字的 BCP-47 語言代碼,例如「en-US」或「sr-Latn」。詳情請參閱 http://www.unicode.org/reports/tr35/#Unicode_locale_identifier。
textColor
類型: string optional
這條大眾運輸路線標籤的文字顏色,格式為十六進位 (例如「#909CE1」)。
url
類型: URL optional
網頁網址,內含這條路線的詳細資料。
vehicleIcon
類型: TransitIcon optional
這個特定交通工具類型的圖示。
vehicleType
類型: TransitVehicleType optional
使用的車輛類型。
沿用: toJSON

TransitStation 類別

class google.maps.places.TransitStation
library "places"

代表地點的大眾運輸相關資訊。

const {TransitStation} = await google.maps.importLibrary("places");
agencies
類型: Array<TransitAgency>
服務這個車站的運輸公司。
displayName
類型: string optional
車站的當地語言名稱。
displayNameLanguageCode
類型: string optional
當地顯示名稱文字的 BCP-47 語言代碼,例如「en-US」或「sr-Latn」。詳情請參閱 http://www.unicode.org/reports/tr35/#Unicode_locale_identifier。
stops
類型: Array<TransitStop>
大眾運輸工具會在這個車站停靠。
沿用: toJSON

TransitStop 類別

class google.maps.places.TransitStop
library "places"

代表大眾運輸停靠站。

const {TransitStop} = await google.maps.importLibrary("places");
displayName
類型: string optional
停靠站名稱 (以要求的語言顯示)。
displayNameLanguageCode
類型: string optional
停靠站名稱,以所要求語言的 BCP-47 語言代碼表示,例如「en-US」或「sr-Latn」。詳情請參閱 http://www.unicode.org/reports/tr35/#Unicode_locale_identifier。
hasWheelchairAccessibleEntrance
類型: boolean optional
這個欄位指出從車站外到停靠站是否有無障礙通道。不代表能否從該站上車。
id
類型: string optional
大眾運輸停靠站的 ID,可用於區分同一大眾運輸站點中的其他停靠站。這個 ID 不保證在不同回應中保持穩定。
location
類型: LatLngAltitude optional
停靠點的位置。
platformCode
類型: string optional
這個停靠站代表的月台代碼。格式不限 (例如「2」、「Platform 2」、「2-4」或「1x」)。
platformCodeLanguageCode
類型: string optional
平台代碼文字的 BCP-47 語言代碼,例如「en-US」或「sr-Latn」。詳情請參閱 http://www.unicode.org/reports/tr35/#Unicode_locale_identifier。
signageText
類型: string optional
月台看板上所寫的全文 (例如「往市中心」或「東城和布魯克林」)。如果沒有 platformCode,這個欄位可能是平台的唯一 ID。不過,platformCode 和 signageText 可以同時設定。
signageTextLanguageCode
類型: string optional
標誌文字的 BCP-47 語言代碼,例如「en-US」或「sr-Latn」。詳情請參閱 http://www.unicode.org/reports/tr35/#Unicode_locale_identifier。
stopCode
類型: string optional
人類可讀的停靠站 ID,運輸公司會使用這個 ID 區分名稱相同的停靠站。
stopCodeLanguageCode
類型: string optional
停靠站代碼文字的 BCP-47 語言代碼,例如「en-US」或「sr-Latn」。詳情請參閱 http://www.unicode.org/reports/tr35/#Unicode_locale_identifier。
沿用: toJSON

TransitVehicleType 常數

constants google.maps.places.TransitVehicleType
library "places"

大眾運輸路線的交通工具類型。詳情請參閱網路服務說明文件。

這些常數也可以做為字串使用。在 TypeScript 中,字串常值是由 TransitVehicleTypeString 類型定義。

const {TransitVehicleType} = await google.maps.importLibrary("places");
AIRPLANE 飛機。詳情請參閱網路服務說明文件。
BUS 公車。詳情請參閱網路服務說明文件。
CABLE_CAR 纜車。詳情請參閱網路服務說明文件。
COACH 教練。詳情請參閱網路服務說明文件。
COMMUTER_TRAIN 區間車。詳情請參閱網路服務說明文件。
FERRY 渡輪。詳情請參閱網路服務說明文件。
FUNICULAR 登山纜車。詳情請參閱網路服務說明文件。
GONDOLA_LIFT 空中纜車。詳情請參閱網路服務說明文件。
HEAVY_RAIL 重軌電車。詳情請參閱網路服務說明文件。
HIGH_SPEED_TRAIN 高速火車。詳情請參閱網路服務說明文件。
HORSE_CARRIAGE 馬車。詳情請參閱網路服務說明文件。
INTERCITY_BUS 城際巴士。詳情請參閱網路服務說明文件。
LONG_DISTANCE_TRAIN 長途火車。詳情請參閱網路服務說明文件。
METRO_RAIL 捷運。詳情請參閱網路服務說明文件。
MONORAIL 單軌電車。詳情請參閱網路服務說明文件。
RAIL 鐵路。詳情請參閱網路服務說明文件。
SHARE_TAXI 共乘計程車。詳情請參閱網路服務說明文件。
SPECIAL 特殊。詳情請參閱網路服務說明文件。
SUBWAY 地鐵。詳情請參閱網路服務說明文件。
TRAM 電車。詳情請參閱網路服務說明文件。
TROLLEYBUS 無軌電車。詳情請參閱網路服務說明文件。