Use embedded JSON style declarationsStay organized with collectionsSave and categorize content based on your preferences.
AI-generated Key Takeaways
Customize the appearance of your maps using embedded JSON style declarations for the default map and selectable map types.
Style features and elements within the map by creating an array ofMapTypeStyleobjects defining the desired appearance, with thefeatureType,elementType, andstylersproperties determining specific modifications.
Utilize the Maps Platform Styling Wizard to quickly generate JSON styling objects, simplifying the process of creating custom map styles.
Apply styles to the default map by setting thestylesproperty in theMapOptionsobject during map creation or by using theMap.setOptionsmethod.
Create styled map types by setting the style array to aStyledMapTypeobject, enabling the addition of custom map styles without impacting the default map types.
You can apply customized styling through an embedded JSON style declarations
to the following:
Default map.
Map types that a user can switch between within a single map frame.
Specify styles to features
To apply styles to different features and elements in a map, create an array ofMapTypeStyleobjects that define how the map should be styled.
The array takes the following form:
varstylesArray=[{featureType:'',elementType:'',stylers:[{color:''},{visibility:''},// Add any stylers you need.]},{featureType:'',// Add the stylers you need.}]
For a list of all available values forfeatureType,elementType, andstylers, see theJSON style reference.
The following shows an example default map styled using light-colored text and
icons on a dark background (i.e. dark mode). To see the code sample, go toStyled Maps - Night Mode code sample.
To modify the styles of the default map, set the map'sstylesproperty in theMapOptionsobject to your style array when:
Creating your map.
Or, when calling theMap.setOptionsmethod.
Changes to labels and roads affect all map types including terrain, satellite,
hybrid, and default roadmap types.
Apply styles to a map type
The following shows an added map type calledStyled Mapin the control at
the top left of the map. To see the code sample, go toStyled Map Types.
To create a styled map type, set the style array to aStyledMapTypeobject. Creating a new styled map type does not affect the style of the default
map types.
[[["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-11-10 UTC."],[],["Custom styling for maps can be applied via embedded JSON style declarations to default maps or user-switchable map types. Create an array of `MapTypeStyle` objects specifying `featureType`, `elementType`, and `stylers` to define styling. For consistent styling across apps, use cloud customization with a map ID. Use the Maps Platform Styling Wizard to quickly generate JSON styling or apply styles by setting the map's `styles` property within the `MapOptions` object or the `Map.setOptions` method.\n"]]