science This product or feature is in the pre-GA Experimental launch stage (pre-GA). Pre-GA products and features might have limited support, and changes to pre-GA products and features might not be compatible with other pre-GA versions. Pre-GA Offerings are covered by the Google Maps Platform Service Specific Terms. For more information, see the launch stage descriptions.
Stay organized with collections
Save and categorize content based on your preferences.
The Map Management API lets you manage your cloud-based maps styling
resources using RESTful APIs.
Summary of steps
Use the Cloud console to create a map
ID
(limited to JavaScript vector-based maps).
Use the Cloud console to create a map
style. A
map style is used as the link between a map ID and a dataset.
Use either the Cloud Console or the Maps Datasets API to create a
dataset.
Use the Map Management API to associate the dataset with the style ID.
Use the map ID in an application (JS, iOS, or Android) and use the
data-driven styling API to style dataset features.
Types
DatasetStyleAssociation
Type: Object/Proto
Encapsulates the relationship between an existing dataset and an existing Client
Style.
messageDatasetStyleAssociation{option(google.api.resource)={type:"mapstyling.googleapis.com/DatasetStyleAssociation"pattern:"projects/{project}/datasets/{dataset}/clientStyles/{client_style}"plural:"datasetStyleAssociations",singular:"datasetStyleAssociation"};// Resource name.// projects/{project}/datasets/{dataset}/clientStyles/{client_style}stringname=1;// The resource name of the style.// projects/{project}/clientStyles/{client_style}stringclient_style=2;
PERMISSION_DENIED : These errors always detail what resource access is
denied. For example, when the API is not enabled for the supplied project.
ALREADY_EXISTS: Triggered by a Create call when the DatasetStyleAssociation
already exists.
NOT_FOUND: Triggered by any of the above methods when an attempt is made to
access a resource that does not exist, such as a Style, Dataset, or Project.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[],[],null,["# Map Management API Guide and Examples\n\nThe Map Management API lets you manage your cloud-based maps styling\nresources using RESTful APIs.\n\nSummary of steps\n----------------\n\n1. Use the Cloud console to [create a map\n ID](/maps/documentation/javascript/cloud-customization/tut#tut2) (limited to JavaScript vector-based maps).\n2. Use the Cloud console to [create a map\n style](/maps/documentation/javascript/cloud-customization/map-styles). A map style is used as the link between a map ID and a dataset.\n3. Use either the Cloud Console or the Maps Datasets API to [create a\n dataset](/maps/documentation/javascript/dds-datasets/create-dataset).\n4. Use the Map Management API to associate the dataset with the style ID.\n5. Use the map ID in an application (JS, iOS, or Android) and use the data-driven styling API to style dataset features.\n\nTypes\n-----\n\n### DatasetStyleAssociation\n\nType: Object/Proto\n\nEncapsulates the relationship between an existing dataset and an existing Client\nStyle. \n\n message DatasetStyleAssociation {\n option (google.api.resource) = {\n type: \"mapstyling.googleapis.com/DatasetStyleAssociation\"\n pattern: \"projects/{project}/datasets/{dataset}/clientStyles/{client_style}\"\n plural: \"datasetStyleAssociations\",\n singular: \"datasetStyleAssociation\"\n };\n\n // Resource name.\n // projects/{project}/datasets/{dataset}/clientStyles/{client_style}\n string name = 1;\n\n // The resource name of the style.\n // projects/{project}/clientStyles/{client_style}\n string client_style = 2;\n\nMethods\n-------\n\n### CreateDatasetStyleAssociation\n\n rpc CreateDatasetStyleAssociation(CreateDatasetStyleAssociationRequest)\n returns (DatasetStyleAssociation) {\n option (google.api.http) = {\n post: \"/v1/{parent=projects/*/datasets/*}\"\n body: \"dataset_style_association\"\n };\n option (google.api.method_signature) = parent,dataset_style_association\";\n }\n\n### ListDatasetStyleAssociations\n\n rpc ListDatasetStyleAssociations(ListDatasetStyleAssociationsRequest)\n returns (ListDatasetStyleAssociationsResponse) {\n option (google.api.http) = {\n get: \"/v1/{parent=projects/*/datasets/*}\"\n };\n option (google.api.method_signature) = \"parent\";\n }\n\n### DeleteDatasetStyleAssociation\n\n rpc DeleteDatasetStyleAssociation(DeleteDatasetStyleAssociationRequest)\n returns (google.protobuf.Empty) {\n option (google.api.http) = {\n post: \"/v1/{name=projects/*/datasets/*/clientStyles/*}:delete\"\n body: \"*\"\n };\n option (google.api.method_signature) = \"name\";\n }\n\nExample C++ calls\n-----------------\n\n### Sample Call to Create Endpoint\n\n \u003cpre\u003ecurl --http2 -X POST -H 'Content-Type: application/json' -H 'Authorization: Bearer \u003cToken\u003e' https://mapmanagement.googleapis.com/v1/projects/\u003cProject_Number\u003e/datasets/{dataset_id} -d '{name: \"projects/{project_number}/datasets/{dataset_id}/clientStyles/{style_id}\", client_style: \"projects/{project_number}/clientStyles/{style_id}\" }'\u003c/pre\u003e\n\n### Sample Call to List Endpoint\n\n \u003cpre\u003ecurl --http2 -X GET -H 'Content-Type: application/json' -H 'Authorization: Bearer \u003cToken\u003e' https://mapmanagement.googleapis.com/v1/projects/\u003cProject_Number\u003e/datasets/-\u003c/pre\u003e\n\n### Sample Call to List Associated Maps\n\n \u003cpre\u003ecurl --http2 -X GET -H 'Content-Type: application/json' -H 'Authorization: Bearer \u003cToken\u003e' https://mapmanagement.googleapis.com/v1/projects/\u003cProject_Number\u003e/datasets/\u003cdataset-id\u003e/clientStyles/\u003cstyle_id\u003e:listAssociatedMaps\u003c/pre\u003e\n\n### Sample Call to Delete Endpoint\n\n \u003cpre\u003ecurl --http2 -X POST -H 'Content-Type: application/json' -H 'Authorization: Bearer \u003cToken\u003e' https://mapmanagement.googleapis.com/v1/projects/\u003cProject_Number\u003e/datasets/\u003cdataset_id\u003e/clientStyles/\u003cstyle_id\u003e:delete -d '{\"map_ids\": [\"map-id-1\", \"map-id-2\"]}'\u003c/pre\u003e\n\nErrors\n------\n\n- PERMISSION_DENIED : These errors always detail what resource access is\n denied. For example, when the API is not enabled for the supplied project.\n\n- ALREADY_EXISTS: Triggered by a Create call when the DatasetStyleAssociation\n already exists.\n\n- NOT_FOUND: Triggered by any of the above methods when an attempt is made to\n access a resource that does not exist, such as a Style, Dataset, or Project.\n\n- INVALID_ARGUMENT: Request is malformed."]]