Maps SDK for Android 政策

本主題提供所有使用 Maps SDK for Android 開發應用程式的作者資訊規定,包括該 API 中的 Place Autocomplete 服務。如要查看更多 Google 地圖平台條款,請參閱《Google 地圖平台服務條款》。

提供使用條款和隱私權政策

如果您開發 Maps SDK for Android 應用程式,就必須透過符合 Google 協議中規範的應用程式,提供《使用條款》和《隱私權政策》:

  • 使用條款》和《隱私權政策》必須對外公開。
  • 您必須在應用程式的《使用條款》中明確說明,使用您的應用程式時,使用者必須遵守 Google 的《服務條款》
  • 您必須在《隱私權政策》中通知使用者您正在使用 Google Maps API,並參考《Google 隱私權政策》的規定。

建議您視應用程式的平台而定,提供《使用條款》和《隱私權政策》的建議方法。

行動應用程式

開發行動應用程式時,建議您在相關應用程式商店的應用程式下載頁面和應用程式設定選單中,提供使用條款隱私權政策的連結。

網頁應用程式

如要開發網頁應用程式,建議您在網站的頁尾提供使用條款隱私權政策的連結。

預先擷取、快取或儲存內容

使用 Maps SDK for Android 的應用程式必須遵守您與 Google 的協議條款。依據您的「協議」條款,您不得預先擷取、索引、儲存或快取任何「內容」,除非這些條款另有限制。

顯示 Maps SDK for Android 結果

您也可以在 Google 地圖上顯示 Maps SDK for Android 結果,甚至沒有地圖。如果想在地圖上顯示 Maps SDK for Android 結果,這些內容就必須顯示在 Google 地圖上。禁止在非 Google 地圖地圖中使用 Maps SDK for Android 資料。

如果您的應用程式在 Google 地圖上顯示資料,Google 標誌將被納入,且無法修改。在同一個畫面中顯示 Google 資料的應用程式與 Google 地圖時,不需要進一步歸因給 Google。

如果您的應用程式在沒有顯示 Google 地圖的頁面或檢視畫面中顯示資料,您必須一併顯示該資料的 Google 標誌。舉例來說,如果您的應用程式在某個分頁中顯示 Google 資料,而 Google 地圖在另一個分頁中顯示該資料,第一個分頁就必須顯示 Google 標誌。如果應用程式使用搜尋欄位 (無論是否有自動完成功能),標誌必須以內嵌方式顯示。

Google 標誌應放在地圖的左下角,並將作者資訊放在右下角,這兩個資訊必須呈現在地圖上,不得位於地圖下方或其他位置下方。以下地圖範例顯示地圖左下方的 Google 標誌,以及位於右下方。

下列 ZIP 檔案包含的 Google 標誌大小正確,適用於電腦、Android 和 iOS 應用程式。請勿使用任何方法修改標誌或調整標誌的大小。

下載: google_logo.zip

請勿修改屬性。請勿移除、遮蓋或裁剪作者資訊資訊,您無法使用內嵌 Google 標誌 (例如「這些地圖來自 [Google_logo])。

關閉歸因。如果使用直接嵌入以外的 Google 圖像螢幕截圖,請加入圖片中顯示的標準作者資訊。如有需要,您可以自訂作者資訊文字的樣式和位置,只要文字靠近內容附近,且一般觀眾或讀者清楚易讀即可。請勿將作者資訊從內容中移除,例如書籍結尾、檔案或節目的製作人員名單,或是網站頁尾。

加入第三方資料供應商。對應產品中的某些資料和圖片是由 Google 以外的供應商提供。如要使用這類圖像,作者資訊文字必須註明「Google」及相關資料供應商,例如「地圖資料:Google、Maxar Technologies」。如有第三方資料供應商引用的圖像,其中只提及「Google」或 Google 標誌,則不符合出處。

如果您在無法使用歸因顯示功能的裝置上使用 Google 地圖平台,請 與 Google 銷售團隊聯絡,討論符合您用途的授權。

其他作者資訊相關規定

請按照下列操作說明擷取第三方歸因,並在應用程式中顯示作者資訊。

從地點擷取作者資訊

如果應用程式顯示透過呼叫取得地點 ID 取得的資訊,應用程式也必須針對取得的地點詳細資料顯示第三方歸因。

API 會傳回 Place 物件。如要從 Place 物件擷取歸因,請呼叫 Place.getAttributions()。這個方法會傳回 String;如果沒有可顯示的歸因,就會傳回空白字串。

String placeId = "INSERT_PLACE_ID_HERE";
List<Place.Field> placeFields = Arrays.asList(Place.Field.ID, Place.Field.NAME);
FetchPlaceRequest request = FetchPlaceRequest.newInstance(placeId, placeFields);

placesClient.fetchPlace(request).addOnSuccessListener((response) -> {
    Place place = response.getPlace();
    textView.append("Place found: " + place.getName());
    textView.append("Attributions: " + place.getAttributions());
}).addOnFailureListener((exception) -> {
    if (exception instanceof ApiException) {
        // Handle the error.
    }
});

顯示相片的作者資訊

如果應用程式顯示相片,您必須為每張相片顯示作者資訊。PhotoMetadata,可包含兩種歸因類型:

如要取得相片的字串作者資訊,請呼叫 PhotoMetadata.getAttributions()。此方法會傳回 HTML 字元序列;如果沒有可顯示的作者資訊,就會傳回空白字串。

// Get the photo metadata from the Place object.
PhotoMetadata photoMetadata = place.getPhotoMetadatas().get(0);

// Get the attribution text.
String attributions = photoMetadata.getAttributions();

如要取得相片的作者作者資訊,請呼叫 PhotoMetadata.getAuthorAttributions()。這個方法會回傳 AuthorAttributions 物件。這個物件包含 AuthorAttribution 物件的 List,每個作者歸因各一個。

// Get the photo metadata from the Place object.
PhotoMetadata photoMetadata = place.getPhotoMetadatas().get(0);

// Get the author attributions object.
AuthorAttributions authorAttributions = photoMetadata.getAuthorAttributions();
List<AuthorAttribution> authorAttributionList = authorAttributions.asList();

顯示評論

Place 物件最多可包含五則評論,其中每則評論都以 Review 物件表示。您也可以選擇在應用程式中顯示這些評論。

Google 也建議您向使用者顯示評論的排序方式。

如要查看評論,請呼叫 Place.getReviews()

// Specify the fields to return.
final List<Place.Field> placeFields = Arrays.asList(Place.Field.REVIEWS);

// Construct a request object, passing the place ID and fields array.
final FetchPlaceRequest request = FetchPlaceRequest.newInstance("INSERT_PLACE_ID_HERE", placeFields);

placesClient.fetchPlace(request).addOnSuccessListener((response) -> {
    Place place = response.getPlace();
    List<Review> reviews = place.getReviews();
    // For loop for iterating over the List
    for (int i = 0; i < reviews.size(); i++) {
      // For each review, get the Review object.
        Review placeReview = reviews.get(i);

      // Get any attribution and author attribution.
        String reviewAttribution = placeReview.getAttribution();
        AuthorAttribution authorAttribution = placeReview.getAuthorAttribution();

        // Display the review contents and attributions as necessary.
    }
}).addOnFailureListener((exception) -> {
    if (exception instanceof ApiException) {
        // Handle the error.
    }
});

顯示第三方出處

第三方供應商的作者資訊包含 HTML 格式的內容與連結,您必須以提供的格式保留並向使用者顯示。Google 建議在地點詳細資料下方顯示這類資訊。

API 會針對應用程式使用的所有地點產生歸因。屬性是依據 API 呼叫提供,而非每個地點。

顯示作者資訊的其中一種方法是使用 TextView。例如:

TextView attributionsText = (TextView) findViewById(R.id.attributions);
String thirdPartyAttributions = place.getAttributions();
attributionsText.setText(thirdPartyAttributions);

第三方歸因範例

Listings by <a href="https://www.example.com/">Example Company</a>

請注意,用於識別地點的地點 ID 不受快取限制的約束,因此您可以無限期儲存地點 ID 值。地點 ID 會傳回 Maps SDK for Android 回應的 place_id 欄位中。

Google 歸因分析樣式規範

如果您無法使用可下載的 Google 標誌,以下是 CSS 和 HTML 中的 Google 作者資訊樣式規範。

周圍留空

鎖定圖文標誌周圍的預留空間大小應等於或大於 Google 中「G」的高度。

作者資訊副本和 Google 標誌之間的間距應為「G」的一半。

易讀性

標語應一律清晰、易於辨識,且能針對特定背景的正確顏色變化顯示。請務必為您選取的標誌變化版本提供足夠的對比度。

顏色

請在白色或淺色背景上使用 Google Material 灰色 700 文字,色調最大為 0% 至 40%。

Google
#5F6368
RGB 95 99 104
HSL 213 5 39
HSB 213 9 41

在較暗的背景、攝影或非繁忙圖案上,請用白色文字表示署名和作者資訊。

Google
#FFFFFF
RGB 255 255 255
HSL 0 0 100
HSB 0 0 100

Font

使用 Roboto 字型。

CSS 範例

以下 CSS 套用至「Google」文字時,會在白色或淺色背景上,以適當字型、顏色和間距顯示「Google」。

font-family: Roboto;
font-style: normal;
font-weight: 500;
font-size: 16px;
line-height: 16px;
padding: 16px;
letter-spacing: 0.0575em; /* 0.69px */
color: #5F6368;