LoginSignup
8
6

More than 5 years have passed since last update.

GoogleMapAPI のヒートマップの色を変える

Posted at

レインボー

    var heatmap = new google.maps.visualization.HeatmapLayer({
            fillOpacity: 1.1,
            radius: 50,
            gradient: ['#fff', '#f00', '#f80', '#8f0', '#0f0', '#0f8', '#08f', '#00f', '#80f', '#f08', 'black']
    });
    heatmap.setData(point);
    heatmap.setMap(map);

rain.png

青白

    var heatmap = new google.maps.visualization.HeatmapLayer({
            fillOpacity: 1.1,
            radius: 50,
            gradient: ['white', '#00f', '#0ff']
    });
    heatmap.setData(point);
    heatmap.setMap(map);

bg.png

8
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
6