// map.enableScrollWheelZoom(); //// var point = new BMap.Point(116.404, 39.915); // map.centerAndZoom(city_name, 13); // var max=0; // var min=10000; // var result=[]; // query_city={ // "cityName":city_name, // "startDate":startDate, // "endDate":endDate // }; // $.get(dataService+"/ondoorDaily/heatMapDetail",query_city,function(data){ // JSON.parse(data).forEach(function(e){ // console.log(e); // if(max<e.tradeCount&&city_name!=e.regionName){ // max=e.tradeCount; // } // if(min>e.tradeCount&&e.tradeCount!=0){ // min=e.tradeCount; // } // var item = {cityLongitude: e.cityLongitude, cityLatitude: e.cityLatitude, tradeCount:e.tradeCount}; // result.push(item); // }); // for(var i in result){ // var obj = result[i]; // if(obj.tradeCount>0){ // var rm=new BMapLib.TextIconOverlay(new BMap.Point(obj.cityLongitude, obj.cityLatitude), obj.tradeCount,max,min); // map.addOverlay(rm); // } // } //// var markerClusterer = new BMapLib.MarkerClusterer(map, {markers:markers}); //// console.log(markerClusterer.getGridSize()); // });
百度地图
最新推荐文章于 2023-07-01 00:45:00 发布
本文介绍了一种使用JavaScript和BMap库实现热力图数据加载与展示的方法。通过GET请求从服务器获取指定城市的热力图数据详情,并对获取到的数据进行处理,最终在地图上展示各地区的交易热度。
9745

被折叠的 条评论
为什么被折叠?



