Google tiled map Black theme

49 Views Asked by At

Am trying to create a map with google tile map service which will be having google night theme in openlayers 7 . But i have found that there is no way to add night theme map in google. Here is my code which i tried.

map = new ol.Map({
  layers : [
    new ol.layer.Tile({
      source : new ol.source.XYZ({
        url : "https://mt0.google.com/vt/lyrs=m&hl=en&x={x}&y={y}&z={z}",
      }),
    }),
  ],
  target : targetDiv,
  view : viewg,
  title : "BaseMap",
  loadTilesWhileAnimating : true,
});

Please help me to add night theme google map in tiled layer

1

There are 1 best solutions below

0
Doyeip On

Google Maps does not officially provide a night mode tile layer through their Maps API. A way to perhaps "simulate" night mode would be through creating "night themed" tiles.