總覽
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
使用資料集資料導向樣式,即可上傳自己的地理空間資料集、為資料地圖項目套用自訂樣式,以及在地圖上顯示這些資料地圖項目。此外,您還可藉由點、折線和多邊形幾何圖形,以視覺化的方式呈現資料,並讓資料地圖項目回應點擊事件。資料集資料導向樣式僅適用於向量地圖 (必須提供地圖 ID)。
開始使用資料集資料導向樣式
新增自訂地理空間資料集
您可以使用 Google Cloud 控制台或 Google Cloud Shell 新增自訂資料。每個資料集都有專屬 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 using points, polylines, and polygons.\u003c/p\u003e\n"],["\u003cp\u003eDatasets are managed through Google Cloud Console or Google Cloud Shell and are associated with map styles and IDs for display.\u003c/p\u003e\n"],["\u003cp\u003eYou can customize the visual appearance of data features based on their properties and enable click event interactions.\u003c/p\u003e\n"],["\u003cp\u003eData-driven styling enables the creation of dynamic and interactive data visualizations for highlighting locations, geographical features, and areas on maps.\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 click 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/javascript/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/javascript/dds-datasets/create-dataset#dataset-prerequisites)\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 click 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 click events by adding an event\nlistener."]]