最简单的地图热力图,用的是百度的api,所以取经纬度的时候最好也用百度地图。
这里已经填好百度api的key了,但还是建议大家注册使用自己的key,因为有每日额度,超过访问次数了就不可用了。
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=VNekEeQpPj7NhVX9jxcjiC1onpZUNToQ"></script>
效果展示:
下面是完整代码,注释已经标得很清楚了,直接保存为html文件用浏览器打开就可以了。
<!DOCTYPE html>
<html>
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta name ="viewport" content ="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"><script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=VNekEeQpPj7NhVX9jxcjiC1onpZUNToQ"></script><script type="text/javascript" src="http://api.map.baidu.com/library/Heatmap/2.0/src/Heatmap_min.js"></script><title>XXXXX</title><style type="text/css">ul,li{list-style: none;margin:0;padding:0;float:left;}html{height:100%}body{height:100%;margin:0px;padding:0px;font-family:"微软雅黑";}#allmap{height:100%;width:100%;}</style>
</head>
<body><div id="allmap"></div>
</body>
</html>
<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script>
<script type="text/javascript">// 百度地图API功能var map = new BMap.Map("allmap");
//设置打开后的中心位置,这里设置的是北京var point = new BMap.Point(116.512885,39.847469);
//设置打开后的缩放大小,这里设置的大致为中国版图的大小map.centerAndZoom(point, 5);// 编写自定义函数,创建标注function addMarker(point){var marker = new BMap.Marker(point);map.addOverlay(marker);}
//lat是纬度,lng是经度,count是对应的数值大小
//下列的经纬度基本覆盖了中国各个省份及重要城市var res = [{"count": 61, "lat": 30.5984667364009, "lng":114.311581554732},
{"count": 18, "lat": 30.9306892270182, "lng":113.922510077336},
{"count": 70, "lat": 30.4593588576181, "lng":114.878490484107},
{"count": 2, "lat": 31.6965167723283, "lng":113.389450018221},
{"count": 47, "lat": 30.3408421077429, "lng":112.245522629261},
{"count": 59, "lat": 32.0147968046692, "lng":112.128537201002},
{"count": 86, "lat": 30.2052078489415, "lng":115.045532908943},
{"count": 33, "lat": 30.6974464844923, "lng":111.292549210354},
{"count": 24, "lat": 31.0417325755696, "lng":112.20639298023},
{"count": 68, "lat": 30.3965721733169, "lng":114.90160738827},
{"count": 57, "lat": 29.8470559476464, "lng":114.328519090268},
{"count": 41, "lat": 32.6350618584011, "lng":110.804529560695},
{"count": 76, "lat": 30.3335877511463, "lng":113.449609358563},
{"count": 4, "lat": 30.6696218300994, "lng":113.172409166328},
{"count": 10, "lat": 30.277939575301, "lng":109.494592618575},
{"count": 38, "lat": 30.4083579324189, "lng":112.905474090816},
{"count": 76, "lat": 31.7504960112464, "lng":110.682524850399},
{"count": 90, "lat": 30.5516000646583, "lng":114.348440736587},
{"count": 84, "lat": 22.5484566379841, "lng":114.064551836587},
{"count": 57, "lat": 23.135336306695, "lng":113.271431344459},
{"count": 59, "lat": 22.2765646542492, "lng":113.582554786549},
{"count": 76, "lat": 23.0277587507889, "lng":113.128512195497},
{"count": 58, "lat": 23.0273084116433, "lng":113.758420457876},
{"count": 52, "lat": 22.5223146707905, "lng":113.399422362631},
{"count": 36, "lat": 23.1163588547255, "lng":114.423558016581},
{"count": 99, "lat": 23.3590917177251, "lng":116.688528640548},
{"count": 99, "lat": 21.276723439012, "lng":110.365554413928},
{"count": 30, "lat": 23.0528887711256, "lng":112.47148894063},
{"count": 78, "lat": 22.584603880965, "lng":113.08855619524},
{"count": 96, "lat": 21.8643397261389, "lng":111.988489291812},
{"count": 70, "lat": 24.2941775322062, "lng":116.129537376122},
{"count": 4, "lat": 23.688230292088, "lng":113.062468325272},
{"count": 23, "lat": 23.5557404882755, "lng":116.378512180338},
{"count": 60, "lat": 21.669064031332, "lng":110.931542579969},
{"count": 40, "lat": 24.815881278583, "lng":113.603527345622},
{"count": 7, "lat": 22.7912630365467, "lng":115.38155260365},
{"count": 63, "lat": 23.6626231926158, "lng":116.629470173628},
{"count": 22, "lat": 23.7496843709597, "lng":114.707446272906},
{"count": 77, "lat": 28.0010854044722, "lng":120.706476890355},
{"count": 70, "lat": 30.2530829816934, "lng":120.215511803721},
{"count": 96, "lat": 29.866033045866, "lng":121.628572494341},
{"count": 64, "lat": 28.6621940559961, "lng":121.427434704279},
{"count": 62, "lat": 29.0846393855136, "lng":119.653436190529},
{"count": 33, "lat": 30.7509748309201, "lng":120.76355182586},
{"count": 98, "lat": 30.0363693113069, "lng":120.585478478853},
{"count": 17, "lat": 28.4732781805634, "lng":119.929573058441},
{"count": 37, "lat": 28.975545802265, "lng":118.866596740355},
{"count": 80, "lat": 30.8989639372941, "lng":120.094516609157},
{"count": 76, "lat": 29.9909116801603, "lng":122.21355631852},
{"count": 62, "lat": 32.153014547531, "lng":114.097482833045},
{"count": 75, "lat": 32.9965622046514, "lng":112.534501313513},
{"count": 2, "lat": 34.7534388504544, "lng":113.631419207339},
{"count": 24, "lat": 33.0178424167436, "lng":114.028470781732},
{"count": 84, "lat": 34.4202016658586, "lng":115.662449338262},
{"count": 20, "lat": 33.6318288757022, "lng":114.703482514823},
{"count": 45, "lat": 33.772050748691, "lng":113.199528560521},
{"count": 14, "lat": 35.3096399303368, "lng":113.933600467332},
{"count": 19, "lat": 36.1059409840149, "lng":114.399500421774},
{"count": 73, "lat": 34.0414316116187, "lng":113.858475536855},
{"count": 90, "lat": 33.5877107071022, "lng":114.023420777647},
{"count": 81, "lat": 34.6242627792194, "lng":112.459421298311},
{"count": 26, "lat": 34.8028858112117, "lng":114.314592584971},
{"count": 26, "lat": 35.2209632540389, "lng":113.248547834573},
{"count": 63, "lat": 35.7523574114, "lng":114.303593642476},
{"count": 87, "lat": 34.7783272494599, "lng":111.206533223874},
{"count": 26, "lat": 35.7675930289062, "lng":115.035597470342},
{"count": 29, "lat": 35.0729072268465, "lng":112.608580706207},
{"count": 41, "lat": 34.7717129219314, "lng":113.759384084863},
{"count": 19, "lat": 28.2348893999436, "lng":112.945473195352},
{"count": 32, "lat": 29.3631782939259, "lng":113.135489424221},
{"count": 4, "lat": 27.2452702728085, "lng":111.474432885931},
{"count": 35, "lat": 29.0377499994068, "lng":111.705452179958},
{"count": 70, "lat": 27.7032085969915, "lng":112.001503492884},
{"count": 87, "lat": 27.8335676390164, "lng":113.140470797764},
{"count": 85, "lat": 26.8995761391891, "lng":112.578447213259},
{"count": 67, "lat": 28.5597111784898, "lng":112.36151595471},
{"count": 19, "lat": 26.4258641179, "lng":111.619455057922},
{"count": 7, "lat": 27.5751609029785, "lng":110.008514265372},
{"count": 99, "lat": 25.7766832736018, "lng":113.021460499094},
{"count": 30, "lat": 27.8357022271355, "lng":112.950464180764},
{"count": 99, "lat": 28.3173691047011, "lng":109.745576649466},
{"count": 71, "lat": 29.1228155625518, "lng":110.485532546954},
{"count": 12, "lat": 28.1182699980093, "lng":112.989602543346},
{"count": 21, "lat": 31.8265778336868, "lng":117.233442664976},
{"count": 65, "lat": 32.8960609948522, "lng":115.820436124913},
{"count": 59, "lat": 32.9215237043508, "lng":117.395513328136},
{"count": 42, "lat": 33.8506426957888, "lng":115.784463211274},
{"count": 13, "lat": 30.530956568043, "lng":117.063603904918},
{"count": 94, "lat": 31.7414508153225, "lng":116.526409664185},
{"count": 39, "lat": 31.6762655976091, "lng":118.513579579431},
{"count": 40, "lat": 31.3585366557992, "lng":118.439431376535},
{"count": 11, "lat": 33.6520953264521, "lng":116.970543945612},
{"count": 100, "lat": 33.9616563002763, "lng":116.804537267029},
{"count": 92, "lat": 30.9512332399133, "lng":117.818476794457},
{"count": 49, "lat": 32.6318473990533, "lng":117.006388850716},
{"count": 99, "lat": 30.6708837907645, "lng":117.498420961596},
{"count": 28, "lat": 32.2612708720408, "lng":118.339406135965},
{"count": 60, "lat": 29.7218897865916, "lng":118.345437253147},
{"count": 15, "lat": 30.9466015452929, "lng":118.765534242767},
{"count": 95, "lat": 28.6894552950607, "lng":115.864589442316},
{"count": 26, "lat": 29.7113405590793, "lng":116.00753491163},
{"count": 52, "lat": 27.8235786977885, "lng":114.923534651396},
{"count": 50, "lat": 28.4606259218517, "lng":117.949459603122},
{"count": 69, "lat": 27.8208564218482, "lng":114.423563675906},
{"count": 75, "lat": 25.8351761034976, "lng":114.940503372982},
{"count": 57, "lat": 27.9548922534195, "lng":116.364538768643},
{"count": 51, "lat": 27.6283927093972, "lng":113.861496433754},
{"count": 11, "lat": 27.1197268260704, "lng":115.000510720012},
{"count": 48, "lat": 28.2657870631914, "lng":117.075575427027},
{"count": 45, "lat": 29.2742477110409, "lng":117.184576446385},
{"count": 71, "lat": 30.8136216367076, "lng":108.415558370502},
{"count": 56, "lat": 30.9366112719747, "lng":108.703447500001},
{"count": 3, "lat": 29.5079277155528, "lng":106.51755873943},
{"count": 40, "lat": 29.6128323140802, "lng":106.580415062384},
{"count": 18, "lat": 29.5590901829938, "lng":106.57544006681},
{"count": 79, "lat": 31.1666441131934, "lng":108.39949765612},
{"count": 33, "lat": 30.3332939685, "lng":107.339565874718},
{"count": 52, "lat": 30.3052683893565, "lng":108.044537533855},
{"count": 72, "lat": 29.9781812395342, "lng":106.282541087579},
{"count": 51, "lat": 29.7089458384214, "lng":106.554012965149},
{"count": 93, "lat": 29.0341137483112, "lng":106.657484195451},
{"count": 22, "lat": 30.197314239664, "lng":105.847399036165},
{"count": 36, "lat": 31.0246017665491, "lng":109.470472756309},
{"count": 38, "lat": 29.7239273430066, "lng":106.637559060602},
{"count": 51, "lat": 30.0061086978689, "lng":108.120414166383},
{"count": 80, "lat": 29.8635200673231, "lng":107.087531070068},
{"count": 72, "lat": 31.4048800098582, "lng":109.576402558996},
{"count": 65, "lat": 29.869412789214, "lng":107.737480618198},
{"count": 12, "lat": 29.2229269414888, "lng":106.29811321359},
{"count": 87, "lat": 31.0805188117359, "lng":109.88554550703},
{"count": 80, "lat": 29.5983466073163, "lng":106.233474562674},
{"count": 87, "lat": 29.5026830988349, "lng":106.668429778595},
{"count": 40, "lat": 29.4113073966899, "lng":105.601419799279},
{"count": 2, "lat": 29.490107128556, "lng":106.488533590107},
{"count": 45, "lat": 29.8505087787222, "lng":106.063449494109},
{"count": 4, "lat": 30.6605532550234, "lng":107.77609725763},
{"count": 61, "lat": 29.2958843744649, "lng":106.265597608378},
{"count": 87, "lat": 29.5479422056355, "lng":106.314882870675},
{"count": 72, "lat": 29.362046335949, "lng":105.933499361451},
{"count": 66, "lat": 29.7092781979787, "lng":107.396419797541},
{"count": 92, "lat": 29.4084747397704, "lng":106.547454256962},
{"count": 63, "lat": 31.9533907462925, "lng":108.671611642558},
{"count": 37, "lat": 29.5388125676601, "lng":108.777591198349},
{"count": 23, "lat": 29.5471925165411, "lng":106.464465110925},
{"count": 43, "lat": 29.2994622904425, "lng":108.172578035882},
{"count": 99, "lat": 29.3320268707489, "lng":107.766425189517},
{"count": 48, "lat": 28.453447864286, "lng":109.013573899809},
{"count": 98, "lat": 28.8470402586741, "lng":108.774586007097},
{"count": 19, "lat": 28.9678347896873, "lng":106.931558284422},
{"count": 91, "lat": 31.3035640744417, "lng":120.592412229593},
{"count": 74, "lat": 32.0646528856184, "lng":118.802421721245},
{"count": 90, "lat": 34.212666550113, "lng":117.290575434394},
{"count": 69, "lat": 33.6162953010331, "lng":119.021483670706},
{"count": 92, "lat": 31.4988097326857, "lng":120.318583288106},
{"count": 51, "lat": 32.4606750493083, "lng":119.929566337854},
{"count": 37, "lat": 31.9865494312008, "lng":120.901591738661},
{"count": 58, "lat": 31.8157956533278, "lng":119.981484713278},
{"count": 77, "lat": 34.6022495252672, "lng":119.228621333166},
{"count": 71, "lat": 32.4006769360903, "lng":119.419418908229},
{"count": 78, "lat": 33.3551009176261, "lng":120.167544265761},
{"count": 96, "lat": 33.96774971569, "lng":118.281574035708},
{"count": 56, "lat": 32.1947159205237, "lng":119.430489445673},
{"count": 8, "lat": 36.0722274966632, "lng":120.389455191146},
{"count": 44, "lat": 36.6565542017872, "lng":117.12639941261},
{"count": 96, "lat": 35.4201773945296, "lng":116.593612348539},
{"count": 98, "lat": 35.1106712423651, "lng":118.363533005013},
{"count": 56, "lat": 37.4700383837305, "lng":121.454415417301},
{"count": 93, "lat": 37.5164305480148, "lng":122.127540978313},
{"count": 14, "lat": 36.7126515512675, "lng":119.168377911428},
{"count": 51, "lat": 37.4413084545762, "lng":116.365556743974},
{"count": 98, "lat": 36.2058580448846, "lng":117.094494834795},
{"count": 39, "lat": 36.4627581876941, "lng":115.991587848304},
{"count": 44, "lat": 34.8159940484351, "lng":117.330541944838},
{"count": 77, "lat": 36.8190856833218, "lng":118.061452534898},
{"count": 59, "lat": 35.4228389984376, "lng":119.533415404565},
{"count": 43, "lat": 35.2394074247655, "lng":115.487545033433},
{"count": 63, "lat": 37.3881961960769, "lng":117.977404017146},
{"count": 89, "lat": 30.6558218784164, "lng":104.081533510424},
{"count": 52, "lat": 30.843782508337, "lng":106.117502614872},
{"count": 23, "lat": 30.4617461106789, "lng":106.639552682334},
{"count": 40, "lat": 31.2143077239274, "lng":107.474593858975},
{"count": 9, "lat": 31.8728885859565, "lng":106.751585303164},
{"count": 47, "lat": 31.4736630487458, "lng":104.685561860761},
{"count": 43, "lat": 29.5858865383204, "lng":105.064588024997},
{"count": 97, "lat": 30.0552788435183, "lng":101.96854674579},
{"count": 31, "lat": 28.8776683036072, "lng":105.448524069326},
{"count": 99, "lat": 31.1331150036567, "lng":104.404419364964},
{"count": 41, "lat": 26.588033173333, "lng":101.725541170914},
{"count": 100, "lat": 28.7580070285518, "lng":104.649403704869},
{"count": 49, "lat": 29.3455849213275, "lng":104.784448846717},
{"count": 67, "lat": 27.8877523003697, "lng":102.27350268097},
{"count": 11, "lat": 32.4416163053154, "lng":105.850423181664},
{"count": 56, "lat": 30.016792545706, "lng":103.049542623604},
{"count": 77, "lat": 30.5390976711091, "lng":105.599421530644},
{"count": 83, "lat": 30.082526119421, "lng":103.856563315794},
{"count": 9, "lat": 29.5579407174581, "lng":103.772537603634},
{"count": 10, "lat": 30.1349565592531, "lng":104.634435341644},
{"count": 41, "lat": 31.9055115772665, "lng":102.23141546175},
{"count": 37, "lat": 39.9109245472995, "lng":116.413383697123},
{"count": 29, "lat": 39.9263745230798, "lng":116.449558729501},
{"count": 33, "lat": 39.9654898411007, "lng":116.305434054497},
{"count": 46, "lat": 39.9181236058414, "lng":116.372513581166},
{"count": 81, "lat": 39.7325552365544, "lng":116.348625212231},
{"count": 43, "lat": 39.9109245472995, "lng":116.413383697123},
{"count": 94, "lat": 39.8649371975573, "lng":116.292401887311},
{"count": 72, "lat": 40.2264133715942, "lng":116.23761791731},
{"count": 83, "lat": 39.9551864560804, "lng":116.725840224692},
{"count": 10, "lat": 39.9113538087782, "lng":116.229612667758},
{"count": 49, "lat": 39.7543258397733, "lng":116.149443751842},
{"count": 95, "lat": 40.1363507622307, "lng":116.66142426369},
{"count": 33, "lat": 39.9348272723959, "lng":116.422400977662},
{"count": 28, "lat": 40.3226184042657, "lng":116.638385871429},
{"count": 40, "lat": 39.946146720034, "lng":116.107603555765},
{"count": 72, "lat": 40.4621689737542, "lng":115.981631569015},
{"count": 4, "lat": 39.9109245472995, "lng":116.413383697123},
{"count": 88, "lat": 45.7677178653451, "lng":126.604654038801},
{"count": 24, "lat": 45.8088258279521, "lng":126.541615090316},
{"count": 33, "lat": 46.6600321798244, "lng":126.975356875301},
{"count": 55, "lat": 46.653185895886, "lng":131.16534168078},
{"count": 98, "lat": 45.3008723178238, "lng":130.975618658766},
{"count": 35, "lat": 47.3599771860153, "lng":123.924570868415},
{"count": 27, "lat": 46.8056899908577, "lng":130.327359092573},
{"count": 5, "lat": 46.5936331767217, "lng":125.10865763402},
{"count": 77, "lat": 44.5562457089863, "lng":129.639539778346},
{"count": 6, "lat": 45.7763003215478, "lng":131.011544591027},
{"count": 49, "lat": 47.356056157685, "lng":130.304432898669},
{"count": 6, "lat": 50.4200259550278, "lng":124.15292785448},
{"count": 48, "lat": 50.2512723117501, "lng":127.535489886218},
{"count": 90, "lat": 31.235929042252, "lng":121.480538860176},
{"count": 16, "lat": 31.235929042252, "lng":121.480538860176},
{"count": 3, "lat": 31.2273482924363, "lng":121.550454606831},
{"count": 56, "lat": 31.4102794734761, "lng":121.496563013524},
{"count": 15, "lat": 31.1945567728227, "lng":121.443396352763},
{"count": 20, "lat": 31.2338449304016, "lng":121.453431772768},
{"count": 57, "lat": 31.0371351764644, "lng":121.234479596241},
{"count": 45, "lat": 31.1188425800874, "lng":121.38861193361},
{"count": 74, "lat": 31.2268479682254, "lng":121.43045437545},
{"count": 5, "lat": 30.9237201102853, "lng":121.480503736431},
{"count": 87, "lat": 31.2697466989313, "lng":121.511586454534},
{"count": 28, "lat": 31.265524144657, "lng":121.532519937325},
{"count": 32, "lat": 31.2549733682795, "lng":121.403569349165},
{"count": 46, "lat": 31.3801553396772, "lng":121.272595058352},
{"count": 58, "lat": 31.2372471520636, "lng":121.491585592524},
{"count": 40, "lat": 31.1554543179807, "lng":121.130553104672},
{"count": 43, "lat": 30.7478523765703, "lng":121.348480045121},
{"count": 13, "lat": 31.628569984404, "lng":121.403556862718},
{"count": 27, "lat": 31.235929042252, "lng":121.480538860176},
{"count": 66, "lat": 26.0586607377664, "lng":119.35038995226},
{"count": 48, "lat": 26.080429420698, "lng":119.30346983854},
{"count": 82, "lat": 25.4598654559227, "lng":119.014520978126},
{"count": 77, "lat": 24.8799523304983, "lng":118.682446266804},
{"count": 68, "lat": 24.4854066051763, "lng":118.096435499766},
{"count": 84, "lat": 24.5189297911708, "lng":117.653576452987},
{"count": 7, "lat": 26.6722417114085, "lng":119.554510745428},
{"count": 36, "lat": 26.6477728742032, "lng":118.184369548142},
{"count": 88, "lat": 26.2697365159918, "lng":117.645521167821},
{"count": 53, "lat": 25.0812198448716, "lng":117.023447566775},
{"count": 14, "lat": 26.106339415901, "lng":119.302447477039},
{"count": 95, "lat": 34.2758080060236, "lng":108.960393148751},
{"count": 29, "lat": 34.3472688166239, "lng":108.946465550632},
{"count": 69, "lat": 32.6905127705737, "lng":109.035601082657},
{"count": 54, "lat": 33.0737999078337, "lng":107.029430209264},
{"count": 24, "lat": 34.3354762933685, "lng":108.715422451433},
{"count": 53, "lat": 34.3689156428699, "lng":107.24457536704},
{"count": 32, "lat": 34.5057155167525, "lng":109.516589605258},
{"count": 29, "lat": 34.9026370805029, "lng":108.952404248359},
{"count": 59, "lat": 33.8786338522077, "lng":109.924417881364},
{"count": 61, "lat": 36.5911110352177, "lng":109.496581916126},
{"count": 94, "lat": 38.290883835484, "lng":109.741616033813},
{"count": 16, "lat": 35.4820867873131, "lng":110.449552640117},
{"count": 48, "lat": 34.2459430118156, "lng":108.079533001268},
{"count": 93, "lat": 39.1534851447047, "lng":117.203592781355},
{"count": 93, "lat": 38.0520971098468, "lng":114.469021632649},
{"count": 9, "lat": 38.310215141107, "lng":116.84558075595},
{"count": 15, "lat": 36.631262731204, "lng":114.545628228235},
{"count": 72, "lat": 37.076685950966, "lng":114.511462256129},
{"count": 86, "lat": 39.6365837241473, "lng":118.186459472039},
{"count": 67, "lat": 38.8799877684553, "lng":115.471463837685},
{"count": 21, "lat": 39.5433666627585, "lng":116.690581733425},
{"count": 35, "lat": 40.7732372026915, "lng":114.892572231451},
{"count": 9, "lat": 37.7451914080774, "lng":115.675406137616},
{"count": 32, "lat": 40.957856012338, "lng":117.969397509966},
{"count": 1, "lat": 39.9417481023779, "lng":119.608530633343},
{"count": 40, "lat": 31.6554050548164, "lng":119.747463821144},
{"count": 96, "lat": 22.8226066011871, "lng":108.373450825818},
{"count": 19, "lat": 21.4868364957694, "lng":109.126533212566},
{"count": 36, "lat": 25.2428857248726, "lng":110.203545374579},
{"count": 47, "lat": 24.3319613868524, "lng":109.434421946345},
{"count": 80, "lat": 21.6930052899694, "lng":108.360418838298},
{"count": 64, "lat": 24.6989117312728, "lng":108.091499944986},
{"count": 1, "lat": 22.6598305099531, "lng":110.188453123372},
{"count": 35, "lat": 21.9865935394842, "lng":108.660580168422},
{"count": 1, "lat": 23.1174483820375, "lng":109.605520310333},
{"count": 19, "lat": 23.4827452811351, "lng":111.28551681182},
{"count": 13, "lat": 24.4094509028654, "lng":111.573526314162},
{"count": 68, "lat": 23.9081859342959, "lng":106.624589325653},
{"count": 85, "lat": 23.7565467626072, "lng":109.2274581959},
{"count": 84, "lat": 24.917734785759, "lng":102.474046421598},
{"count": 55, "lat": 24.873998150044, "lng":102.852448365004},
{"count": 79, "lat": 22.0136012547641, "lng":100.803446824556},
{"count": 66, "lat": 24.3577109424462, "lng":102.55356029311},
{"count": 21, "lat": 25.6121284181925, "lng":100.274582840483},
{"count": 24, "lat": 25.4964069315436, "lng":103.802434827946},
{"count": 11, "lat": 27.3440838602468, "lng":103.723511771968},
{"count": 14, "lat": 25.1390387932659, "lng":99.1772732858178},
{"count": 26, "lat": 26.8606574380648, "lng":100.232464529034},
{"count": 65, "lat": 23.3699962476054, "lng":103.381549052579},
{"count": 47, "lat": 24.4380107027581, "lng":98.5913593561141},
{"count": 65, "lat": 22.8309791860102, "lng":100.972569814727},
{"count": 55, "lat": 25.0517735653403, "lng":101.534412480502},
{"count": 19, "lat": 23.8904685562785, "lng":100.095440420148},
{"count": 59, "lat": 23.4059942936117, "lng":104.222568991094},
{"count": 10, "lat": 25.0515622673448, "lng":102.716416075232},
{"count": 51, "lat": 36.2921024798988, "lng":100.626621144459},
{"count": 82, "lat": 18.2587362917478, "lng":109.518556701399},
{"count": 27, "lat": 20.0440494392567, "lng":110.325525471264},
{"count": 94, "lat": 18.7333772333257, "lng":110.402780194249},
{"count": 0, "lat": 19.5271461100441, "lng":109.587455835686},
{"count": 36, "lat": 19.7443486716463, "lng":110.013510910109},
{"count": 7, "lat": 19.2642540199176, "lng":110.48054452595},
{"count": 14, "lat": 19.919474770278, "lng":109.697443014833},
{"count": 100, "lat": 18.5123315956988, "lng":110.044464092547},
{"count": 39, "lat": 19.3039978766842, "lng":109.062464087343},
{"count": 64, "lat": 19.1011047312886, "lng":108.658566526791},
{"count": 78, "lat": 19.6871199479101, "lng":110.365533483409},
{"count": 97, "lat": 19.5935749727566, "lng":110.71832401809},
{"count": 52, "lat": 18.8527220411434, "lng":109.333657041052},
{"count": 51, "lat": 19.0391637891806, "lng":109.84451062847},
{"count": 63, "lat": 18.7558714938548, "lng":109.180507988945},
{"count": 33, "lat": 38.9762854681468, "lng":111.009670739159},
{"count": 61, "lat": 37.6928394097597, "lng":112.759594755659},
{"count": 0, "lat": 35.0327069129092, "lng":111.013389454479},
{"count": 2, "lat": 37.8769890288477, "lng":112.556391491672},
{"count": 80, "lat": 40.0824687161612, "lng":113.306436258586},
{"count": 64, "lat": 35.4962845864725, "lng":112.858578231328},
{"count": 26, "lat": 37.5244977495771, "lng":111.150449675291},
{"count": 21, "lat": 38.4223833851777, "lng":112.740624160238},
{"count": 30, "lat": 36.2012683721548, "lng":113.122558869849},
{"count": 74, "lat": 39.3371083705417, "lng":112.439370939667},
{"count": 15, "lat": 37.8623608478593, "lng":113.587616662875},
{"count": 25, "lat": 36.0937418954197, "lng":111.52553022403},
{"count": 70, "lat": 41.8414652512018, "lng":123.435597856832},
{"count": 96, "lat": 41.6838300691906, "lng":123.471096644822},
{"count": 75, "lat": 38.9189536667856, "lng":121.621631484592},
{"count": 63, "lat": 41.1258752887371, "lng":122.077490090213},
{"count": 49, "lat": 40.7173644363618, "lng":120.843398339928},
{"count": 9, "lat": 41.100931499462, "lng":121.132596300555},
{"count": 66, "lat": 40.0064087055936, "lng":124.36154728159},
{"count": 23, "lat": 42.0280219013184, "lng":121.676407998658},
{"count": 81, "lat": 41.5798208647556, "lng":120.457499497932},
{"count": 31, "lat": 42.2299479971844, "lng":123.732365209177},
{"count": 5, "lat": 41.4929164605529, "lng":123.692507124208},
{"count": 69, "lat": 41.1150535969493, "lng":123.001372513994},
{"count": 25, "lat": 41.2741612904542, "lng":123.243366406513},
{"count": 57, "lat": 40.673136838267, "lng":122.241574664496},
{"count": 93, "lat": 26.7028600153249, "lng":106.673075994352},
{"count": 86, "lat": 26.6533248223097, "lng":106.636576763527},
{"count": 47, "lat": 27.2902150834259, "lng":105.298588795011},
{"count": 32, "lat": 27.7317008789166, "lng":106.933427748018},
{"count": 36, "lat": 26.5988331082574, "lng":104.837554602346},
{"count": 20, "lat": 26.2606161960738, "lng":107.528402705737},
{"count": 63, "lat": 26.6040295449949, "lng":106.714475930885},
{"count": 21, "lat": 26.589702969826, "lng":107.989446240778},
{"count": 84, "lat": 26.2592523787149, "lng":105.954417123889},
{"count": 2, "lat": 25.0939673494165, "lng":104.912492146269},
{"count": 73, "lat": 39.0936678434039, "lng":117.20952321467},
{"count": 9, "lat": 39.7231944829331, "lng":117.316600692476},
{"count": 59, "lat": 39.1344873259551, "lng":117.258412953068},
{"count": 50, "lat": 39.1534851447047, "lng":117.203592781355},
{"count": 37, "lat": 39.1233902532797, "lng":117.2214669949},
{"count": 26, "lat": 39.0936678434039, "lng":117.20952321467},
{"count": 26, "lat": 39.1487266089665, "lng":117.014410179936},
{"count": 50, "lat": 39.1157180822155, "lng":117.229416280019},
{"count": 75, "lat": 39.3369564312272, "lng":117.832393343418},
{"count": 6, "lat": 39.0923323428145, "lng":117.320568507914},
{"count": 16, "lat": 39.0094157736466, "lng":117.71739882966},
{"count": 63, "lat": 39.1441052797677, "lng":117.156515374324},
{"count": 33, "lat": 39.1732856465641, "lng":117.157517883273},
{"count": 85, "lat": 38.9441485681146, "lng":117.36338677903},
{"count": 61, "lat": 39.2303439099184, "lng":117.141402731577},
{"count": 81, "lat": 36.0601736093078, "lng":103.842102034372},
{"count": 79, "lat": 36.0672346935455, "lng":103.840521196336},
{"count": 29, "lat": 34.5874118816506, "lng":105.731416745669},
{"count": 73, "lat": 35.5868329265618, "lng":104.632420083063},
{"count": 30, "lat": 33.4066202299512, "lng":104.928574970711},
{"count": 87, "lat": 36.5508253304145, "lng":104.144450828343},
{"count": 14, "lat": 35.6075621835031, "lng":103.216390565297},
{"count": 96, "lat": 34.9891399099682, "lng":102.917584688258},
{"count": 78, "lat": 35.5492320504635, "lng":106.671442348277},
{"count": 39, "lat": 38.9320660070049, "lng":100.456411474056},
{"count": 18, "lat": 35.715215983562, "lng":107.649385695954},
{"count": 14, "lat": 38.5258200920926, "lng":102.194605686698},
{"count": 40, "lat": 36.0654648873676, "lng":103.832478128122},
{"count": 81, "lat": 43.8435678345792, "lng":126.555634504954},
{"count": 52, "lat": 43.8219535010431, "lng":125.330602075906},
{"count": 73, "lat": 43.171993571561, "lng":124.356481557158},
{"count": 88, "lat": 42.9157430337218, "lng":129.477376320227},
{"count": 68, "lat": 43.8435678345792, "lng":126.555634504954},
{"count": 13, "lat": 42.8940550057463, "lng":125.150425166887},
{"count": 23, "lat": 43.510832663153, "lng":124.829448660709},
{"count": 31, "lat": 41.7338158016134, "lng":125.94660627598},
{"count": 37, "lat": 45.1474041934138, "lng":124.831481875692},
{"count": 62, "lat": 40.8231562324461, "lng":111.772605830819},
{"count": 89, "lat": 39.6144823139488, "lng":109.787443179236},
{"count": 23, "lat": 40.6629287882613, "lng":109.846543507212},
{"count": 58, "lat": 40.8484229971134, "lng":111.755508561709},
{"count": 68, "lat": 49.2184464755648, "lng":119.772370499466},
{"count": 57, "lat": 40.7493594895728, "lng":107.394398083724},
{"count": 11, "lat": 42.2616861034116, "lng":118.895520397519},
{"count": 51, "lat": 41.0007483276738, "lng":113.139467674463},
{"count": 3, "lat": 44.4897594978097, "lng":116.118500540584},
{"count": 96, "lat": 43.6579800839166, "lng":122.250521787376},
{"count": 57, "lat": 39.6620063648907, "lng":106.800391049996},
{"count": 0, "lat": 46.0884637132189, "lng":122.044364525825},
{"count": 90, "lat": 38.4644533465153, "lng":106.171169452141},
{"count": 1, "lat": 38.4924600555095, "lng":106.2384935874},
{"count": 88, "lat": 38.0037129134533, "lng":106.205371266636},
{"count": 26, "lat": 37.5057014187029, "lng":105.203570900887},
{"count": 57, "lat": 36.0216172580109, "lng":106.248577426071},
{"count": 38, "lat": 38.4768779679108, "lng":106.265604807013},
{"count": 95, "lat": 38.989682839915, "lng":106.390600425504},
{"count": 97, "lat": 36.6518621960967, "lng":117.005425418056},
{"count": 81, "lat": 43.7874871155032, "lng":87.6302030143597},
{"count": 1, "lat": 36.6518621960967, "lng":117.005425418056},
{"count": 25, "lat": 36.6518621960967, "lng":117.005425418056},
{"count": 41, "lat": 44.0168541599198, "lng":87.3150016244744},
{"count": 55, "lat": 36.6518621960967, "lng":117.005425418056},
{"count": 71, "lat": 36.6518621960967, "lng":117.005425418056},
{"count": 83, "lat": 42.9569848487712, "lng":89.1972972460079},
{"count": 83, "lat": 41.1750298600774, "lng":80.266943484735},
{"count": 46, "lat": 36.6518621960967, "lng":117.005425418056},
{"count": 67, "lat": 31.8576856026453, "lng":106.775513107711},
{"count": 22, "lat": 36.6271585792345, "lng":101.786461835867},
{"count": 4, "lat": 36.6233846965166, "lng":101.784450170508},
{"count": 58, "lat": 36.9606628241298, "lng":100.907434321455},
{"count": 40, "lat": 22.536151423658, "lng":114.068846455568},
{"count": 69, "lat": 29.6500402747677, "lng":91.1208239154639}];heatmapOverlay = new BMapLib.HeatmapOverlay({"radius":20});map.addOverlay(heatmapOverlay);
//调整max的值效果会不一样,但count值一定要在max值之内heatmapOverlay.setDataSet({data: res,max:100});
</script>