I am facing a strange problem with google heatmap. Heatmap shows less datapoints on increasing number of coordinates in heatmap data. For 333 coordinates, heatmap shows datapoints like:
And for 9885 coordinates :
As you can see for 333 coordinates there are more datapoints than 9885 coordinates. But it should show more datapoints for large data. My code:
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);
And data getting in 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"}
......
]
anyone please help me to show heatmap correct datapoints ?
dissipating:true and maxIntensity:10 fixed my problem. Thank you everyone helping.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With