I have a requirement to add linear gradient to google maps . Is there any way of achieving the same? My Code looks like below.
HTML
<div id="map"></div>
CSS
#map{
height:100vh;
background: linear-gradient(90deg, #f7f8fa 0%, rgba(247, 248, 250, 0) 18.73%),
linear-gradient(180deg, #f7f8fa 0%, rgba(247, 248, 250, 0) 30.66%);
}
Script
new google.maps.Map(document.getElementById("map"), {
center: val,
zoom: 12,
streetViewControl: false,
});
But the gradient effect is hidden/not showing.
One alternate way I figured is to use an overlay and add the gradient effect but the map zoom and other functionalities not working as a layer is overlaid on top.
Is there any way of applying the effect on google maps container?