Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google maps night mode embed iframe

Tags:

google-maps

I want to embed a Google map night mode using iframe, I saw some code which can done using Google maps API, but does anyone know is that able to embed maps night mode using simple iframe?

enter image description here

like image 934
Suneth Kalhara Avatar asked Feb 25 '17 14:02

Suneth Kalhara


2 Answers

You can use CSS filter invert():

<iframe style="filter: invert(90%)" src="https://www.google.com/maps/embed?..."></iframe>
like image 53
GMP Avatar answered Sep 29 '22 16:09

GMP


No, styling, such as is needed to implement night mode, is not available through the Embed API. As you point out, it is available through the JS API.

https://developers.google.com/maps/documentation/javascript/styling

like image 33
Rob Avatar answered Sep 29 '22 15:09

Rob