-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stylers dont work anymore #286
Comments
Same here! |
For version 0.21.0, I can confirm that styles and dark mode still work for me. Here's an example of my implementation: <google-map
ref="mapRef"
:api-key="config.GOOGLE_MAPS_API_KEY"
:street-view-control="false"
:styles="mapOptions.styles"
style="width: 100%; height: 100%"
/> const mapOptions = computed(() => ({
styles: isDark.value ? darkMapStyle : lightMapStyle,
}));
const darkMapStyle = [
{ elementType: 'geometry', stylers: [{ color: '#212121' }] },
{ elementType: 'labels.text.stroke', stylers: [{ color: '#212121' }] },
{ elementType: 'labels.text.fill', stylers: [{ color: '#757575' }] },
{ featureType: 'poi', stylers: [{ visibility: 'off' }] },
];
const lightMapStyle = [
{ featureType: 'poi', stylers: [{ visibility: 'off' }] },
]; |
@Guziq this only works if you dont use the id prop in the google-map But that is required.. |
Running into this as well, can't set style with the error:
Swapping them at runtime I get:
Seems to be a more underlying issue where you have to create a new map instance. Just wanted to share. |
I recently updated google maps to 0.21.0, afterwards de stylers of the map dont work anymore.
This doesnt work icw advanced marker and map id
What I tried:
and
Darkmode is not working after the update, and the remove labels (POI companies) dont work anymore...
The text was updated successfully, but these errors were encountered: