JSFiddle - React, Tailwind, and code Playground

HTML

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Heatmaps</title>
    <style>
      html, body, #map-canvas {
        height: 100%;
        margin: 0px;
        padding: 0px
      }
      #panel {
        position: absolute;
        top: 5px;
        left: 50%;
        margin-left: -180px;
        z-index: 5;
        background-color: #fff;
        padding: 5px;
        border: 1px solid #999;
      }
    </style>
    <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=visualization"></script>
        <script src="//code.jquery.com/jquery-1.11.1.min.js"></script>   
    <script>
// Adding 500 Data Points
var map, pointarray, heatmap;
 var url = "http://data.cityofnewyork.us/resource/3q43-55fe?$limit=10000"
  data = $.ajax({
  url: url,
  dataType: 'json',
  async: false,
  success: function(data) {
  }
  });
  data = data.responseJSON
  
  
var taxiData = [];
        for (var i=0;i<data.length;i++) {      
          if (data[i].latitude && data[i].longitude) {
            taxiData.push(new google.maps.LatLng(data[i].latitude, data[i].longitude)) 
          }
        }
function initialize() {
  var mapOptions = {
    zoom: 11,
    center: new google.maps.LatLng(40.80166105919204,-73.96212137536531),
    mapTypeId: google.maps.MapTypeId.SATELLITE
  };

  
  map = new google.maps.Map(document.getElementById('map-canvas'),
      mapOptions);

  var pointArray = new google.maps.MVCArray(taxiData);

  heatmap = new google.maps.visualization.HeatmapLayer({
    data: pointArray
  });

  heatmap.setMap(map);
}

function toggleHeatmap() {
  heatmap.setMap(heatmap.getMap() ? null : map);
}

function changeGradient() {
  var gradient = [
    'rgba(0, 255, 255, 0)',
    'rgba(0, 255, 255, 1)',
    'rgba(0, 191, 255, 1)',
    'rgba(0, 127, 255, 1)',
    'rgba(0, 63, 255, 1)',
    'rgba(0, 0, 255, 1)',
    'rgba(0, 0, 223, 1)',
    'rgba(0, 0, 191, 1)',
    'rgba(0, 0, 159, 1)',
    'rgba(0, 0, 127, 1)',
    'rgba(63, 0, 91, 1)',
   ...