公告:Google 地圖平台即將推出新版基本地圖樣式。新版地圖樣式內建全新的預設調色盤、現代化的圖釘,並且提升地圖體驗、改善服務的可用性。所有地圖樣式都將於 2025 年 3 月自動更新。請參閱「
Google 地圖平台新版地圖樣式」一文,進一步瞭解適用範圍及如何提早啟用。
總覽
使用資料集資料導向樣式,即可上傳自己的地理空間資料集、為資料地圖項目套用自訂樣式,以及在地圖上顯示這些資料地圖項目。此外,您還可藉由點、折線和多邊形幾何圖形,以視覺化的方式呈現資料,並讓資料地圖項目回應點擊事件。資料集資料導向樣式僅適用於向量地圖 (必須提供地圖 ID)。
開始使用資料集資料導向樣式
新增自訂地理空間資料集
您可以使用 Google Cloud 控制台或 Google Cloud Shell 新增自訂資料。每個資料集都有專屬 ID,可與地圖樣式建立關聯。支援的資料格式如下:
如要進一步瞭解資料集的相關規定和限制,請參閱「建立及管理資料集」一文
設定資料地圖項目樣式
上傳自訂資料並與地圖樣式和地圖 ID 建立關聯後,您就可以設定資料地圖項目的樣式來營造視覺效果,以及讓地圖項目回應點擊事件。
設定點資料的樣式,在地圖上顯示特定位置。
設定折線資料的樣式,凸顯地貌。
設定多邊形資料的樣式,凸顯地理區域。
新增事件監聽器,讓資料地圖項目回應點擊事件。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-01-14 (世界標準時間)。
[null,null,["上次更新時間:2025-01-14 (世界標準時間)。"],[[["Data-driven styling allows you to upload custom geospatial datasets (GeoJSON, CSV, KML) and visualize them on vector maps using points, polylines, and polygons."],["Datasets are managed through Google Cloud Console or Google Cloud Shell and are associated with map styles and IDs for display."],["You can customize the visual appearance of data features based on their properties and enable click event interactions."],["Data-driven styling enables the creation of dynamic and interactive data visualizations for highlighting locations, geographical features, and areas on maps."]]],[]]