總覽
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
使用資料集資料導向樣式,即可上傳自己的地理空間資料集、為資料地圖項目套用自訂樣式,以及在地圖上顯示這些資料地圖項目。此外,您還可藉由點、折線和多邊形幾何圖形,以視覺化的方式呈現資料,並讓資料地圖項目回應輕觸事件。資料集資料導向樣式僅適用於向量地圖 (必須提供地圖 ID)。
開始使用資料集資料導向樣式
新增自訂地理空間資料集
您可以使用 Google Cloud 控制台或 Google Cloud Shell 新增自訂資料。每個資料集都有專屬 ID,可與地圖樣式建立關聯。支援的資料格式如下:
如要進一步瞭解資料集的相關規定和限制,請參閱「建立及管理資料集」一文
關於公開資料集
如要設定資料集樣式,您必須將地圖樣式與地圖 ID 建立關聯,這也會將資料集與地圖 ID 建立關聯。在應用程式中,開發人員可以參照該地圖 ID,以及與其相關聯的任何地圖樣式和地理空間資料。系統不會對地理空間資料套用任何額外的存取權控管,因此應用程式的使用者都能存取地理空間資料。
設定資料地圖項目樣式
上傳自訂資料並與地圖樣式和地圖 ID 建立關聯後,您就可以設定資料地圖項目的樣式來營造視覺效果,以及讓地圖項目回應輕觸事件。
設定點資料的樣式,在地圖上顯示特定位置。
設定折線資料的樣式,凸顯地貌。
設定多邊形資料的樣式,凸顯地理區域。
新增事件監聽器,讓資料地圖項目回應輕觸事件。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-31 (世界標準時間)。
[null,null,["上次更新時間:2025-08-31 (世界標準時間)。"],[[["\u003cp\u003eData-driven styling allows you to upload custom geospatial datasets (GeoJSON, CSV, KML) and visualize them on vector maps with custom styles based on their geometries.\u003c/p\u003e\n"],["\u003cp\u003eYou can apply unique styling to point, polyline, and polygon data, enabling visualization of locations, geographical features, and areas, respectively.\u003c/p\u003e\n"],["\u003cp\u003eDatasets associated with map IDs are effectively public, accessible to anyone with the app referencing that ID.\u003c/p\u003e\n"],["\u003cp\u003eData features can be made interactive by adding event listeners, allowing them to respond to user interactions like taps.\u003c/p\u003e\n"],["\u003cp\u003eTo get started, you'll need to upload your data using Google Cloud Console or Google Cloud Shell and then associate it with a map style and ID.\u003c/p\u003e\n"]]],[],null,["Select platform: [Android](/maps/documentation/android-sdk/dds-datasets/overview \"View this page for the Android platform docs.\") [iOS](/maps/documentation/ios-sdk/dds-datasets/overview \"View this page for the iOS platform docs.\") [JavaScript](/maps/documentation/javascript/dds-datasets/overview \"View this page for the JavaScript platform docs.\")\n\n\u003cbr /\u003e\n\nData-driven styling for datasets lets you upload your own geospatial datasets,\napply custom styling to their data features, and display those data features on\nmaps. With data-driven styling for datasets, you can create data visualizations\nbased on point, polyline, and polygon geometries, and make data features respond\nto tap events. Data-driven styling for datasets is supported on vector maps\nonly (a map ID is required).\n\n[Get started with data-driven styling for datasets](/maps/documentation/ios-sdk/dds-datasets/start)\n\nAdd custom geospatial datasets\n\nAdd your custom data using Google Cloud Console or Google Cloud\nShell. Each dataset has a unique ID, which you can associate with a map style.\nThe following data formats are supported:\n\n- GeoJSON\n- Comma-separated (CSV)\n- KML\n\nFor details about dataset requirements and limitations, see\n[Create and manage a dataset](/maps/documentation/ios-sdk/dds-datasets/create-dataset#dataset-prerequisites)\n\nAbout public datasets\n\nIn order to style a dataset you must associate a map style with a map ID, which\nalso associates the dataset to the map ID. In an app, developers can reference\nthat map ID, and any map style and geospatial data associated with it. No\nadditional access control is applied to the geospatial data, making the\ngeospatial data effectively publicly available to anyone with the app.\n\nStyle data features\n\nOnce your custom data has been uploaded and associated to a map\nstyle and map ID, you can style data features for visual impact, and make\nfeatures respond to tap events.\n\nStyle point data to show specific locations on the map.\n\nStyle polyline data to highlight geographical features.\n\nStyle polygon data to highlight geographical areas.\n\nMake data features respond to tap events by adding an event\nlistener."]]