use*_*234 4 google-maps google-maps-api-3 pheatmap
我正面临着谷歌热图的一个奇怪问题.热图在热图数据中增加坐标数量时显示的数据点较少.对于333坐标,热图显示数据点,如:

如您所见,333坐标的数据点数多于9885坐标.但它应该显示更多的大数据数据点.我的代码:
var map = new google.maps.Map(document.getElementById('bcak_track_map'), {
zoom:19,
center:{lat:parseFloat(flat), lng:parseFloat(flon)},
mapTypeId:google.maps.MapTypeId.SATELLITE
});
map.setTilt(45);
var heatMapBounds = new google.maps.LatLngBounds();
var markerCount = 0;
$.each(marker_points, function (key, val) {
var myLatLon = new google.maps.LatLng(parseFloat(val.latitute), parseFloat(val.longtute));
heatArr[markerCount] = {location: myLatLon, weight: 2};
heatMapBounds.extend(myLatLon);
markerCount++;
});
var sheatmap = new google.maps.visualization.HeatmapLayer({
data:new google.maps.MVCArray(heatArr),
radius:30
});
sheatmap.setMap(map);
map.fitBounds(heatMapBounds);
bounds = new google.maps.LatLngBounds(null);
Run Code Online (Sandbox Code Playgroud)
数据进入marker_points
[
Object { latitute="33.65112310998252", longtute="-117.98994390000001"},
Object { latitute="33.650867", longtute="-117.990379"},
Object { latitute="33.650867", longtute="-117.990379"},
Object { latitute="33.650855606216076", longtute="-117.99054136256564"},
Object { latitute="33.650867", longtute="-117.990379"},
Object { latitute="33.651302292183665", longtute="-117.99096972341766"},
Object { latitute="33.65106477008209", longtute="-117.99117056945039"}
......
]
Run Code Online (Sandbox Code Playgroud)
有谁请帮我显示热图正确的数据点?
| 归档时间: |
|
| 查看次数: |
871 次 |
| 最近记录: |