googlemaps / googlemaps/js-samples

[Question] Migration to Cloud Maps Styles

Open
#1,793 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
805
Forks
836
PR merge metrics
No merged PRs in 30d

Description

Hello, everyone! 👋
I has been noticed recently that there is migration to [Cloud Map as on March of 2025.](https://cloud.google.com/blog/products/maps-platform/next-generation-of-cloud-based-maps-styling-now-generally-available-with-new-zoom-level-customization-and-usability-improvements)

I'm currently using hardcoded styling at my app, like so:
```javascript
const mapOptions = {
center: { lat: -33.8688, lng: 151.2195 },
zoom: 12,
styles: [
{
featureType: 'water',
elementType: 'geometry',
stylers: [
{
color: '#e9e9e9'
},
{
lightness: 17
}
]
},
{
featureType: 'landscape',
elementType: 'geometry',
stylers: [
{
color: '#f5f5f5'
},
{
lightness: 20
}
]
}
]
};

const map = new google.maps.Map(document.getElementById('map'), mapOptions);
```

## Questions

1) Will I be able to use hard-coded styling of maps after March of 2025?
2) Can I import a JSON with my style to create a new Cloud Map Style?

I'm confused about migration to Cloud Styles and I'm not sure how to import my hard-coded styles.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.