I'm close to achieving what I need in this map, I added a Heatmap layer to show heat maps and a Data layer to draw polygons from the geojson data. If you take a closer look in the image below, you can see the heatmaps are hidden behind the polygons,, All I need is some help to bring the Heatmap layer to Top. Thanks in Advance! :)
And This is the result if I reduce the opacity of polygons, but heatmap layer is still behind so its just not enough :/
Following is the Code I'm using:
var map = new google.maps.Map(document.getElementById('map'), {
center: {lat: 37.0902 , lng: -95.7129},
zoom: 4 });
map.data.loadGeoJson('http://localhost/gz_2010_us_040_00_500k.json');
var heatMapData = [
{location: new google.maps.LatLng(37.785, -122.447), weight: 3},
{location: new google.maps.LatLng(46.965260, -109.533691), weight: 3},
{location: new google.maps.LatLng(40.273502, -86.126976), weight: 1},
{location: new google.maps.LatLng(38.573936, -92.603760), weight: 9},
{location: new google.maps.LatLng(27.994402, -81.760254), weight: 2},
{location: new google.maps.LatLng(39.876019, -117.224121), weight: 9},
{location: new google.maps.LatLng(45.367584, -68.972168), weight: 4},
{location: new google.maps.LatLng(44.182205, -84.506836), weight: 6},
{location: new google.maps.LatLng(33.247875, -83.441162), weight: 1},
{location: new google.maps.LatLng(21.289373, -157.917480), weight: 8},
{location: new google.maps.LatLng(66.160507, -153.369141), weight: 3},
{location: new google.maps.LatLng(35.860119, -86.660156), weight: 9},
];
heatmap = new google.maps.visualization.HeatmapLayer({
data: heatMapData,
map: map
});




