Tính năng tạo kiểu dựa trên dữ liệu cho tập dữ liệu cho phép bạn tải tập dữ liệu không gian địa lý của riêng mình lên, áp dụng kiểu tuỳ chỉnh cho các đối tượng dữ liệu và hiển thị các đối tượng dữ liệu đó trên bản đồ. Với tính năng tạo kiểu dựa trên dữ liệu cho tập dữ liệu, bạn có thể tạo hình ảnh trực quan về dữ liệu dựa trên hình học điểm, đường nhiều đoạn và đa giác, đồng thời làm cho các đối tượng dữ liệu phản hồi các sự kiện nhấn. Chỉ bản đồ vectơ mới hỗ trợ tính năng định kiểu dựa trên dữ liệu cho tập dữ liệu (bạn phải có mã bản đồ).
Thêm dữ liệu tuỳ chỉnh bằng Google Cloud Console hoặc Google Cloud Shell. Mỗi tập dữ liệu đều có một mã nhận dạng riêng biệt mà bạn có thể liên kết với một kiểu bản đồ.
Chúng tôi hỗ trợ các định dạng dữ liệu sau:
GeoJSON
Phân tách bằng dấu phẩy (CSV)
KML
Để biết thông tin chi tiết về các yêu cầu và hạn chế đối với tập dữ liệu, hãy xem phần Tạo và quản lý tập dữ liệu
Giới thiệu về tập dữ liệu công khai
Để tạo kiểu cho một tập dữ liệu, bạn phải liên kết một kiểu bản đồ với một mã bản đồ. Thao tác này cũng liên kết tập dữ liệu với mã bản đồ. Trong một ứng dụng, nhà phát triển có thể tham chiếu mã nhận dạng bản đồ đó, cũng như mọi kiểu bản đồ và dữ liệu không gian địa lý được liên kết với mã nhận dạng đó. Không có chế độ kiểm soát quyền truy cập bổ sung nào được áp dụng cho dữ liệu không gian địa lý, khiến dữ liệu không gian địa lý có hiệu quả khi được cung cấp công khai cho bất kỳ ai có ứng dụng.
Tính năng dữ liệu kiểu
Sau khi tải dữ liệu tuỳ chỉnh lên và liên kết dữ liệu đó với một kiểu bản đồ và mã bản đồ, bạn có thể tạo kiểu cho các đối tượng dữ liệu để tạo hiệu ứng trực quan và khiến các đối tượng phản hồi các sự kiện nhấn.
Tạo kiểu cho dữ liệu điểm để cho thấy các vị trí cụ thể trên bản đồ.
Tạo kiểu cho dữ liệu đường nhiều đoạn để làm nổi bật các đối tượng địa lý.
Tạo kiểu cho dữ liệu đa giác để làm nổi bật các khu vực địa lý.
Làm cho các tính năng dữ liệu phản hồi các sự kiện nhấn bằng cách thêm một trình nghe sự kiện.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-09-05 UTC."],[[["\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."]]