View Single Post
Old 09-04-2012, 03:20 PM   PM User | #6
xelawho
Senior Coder

 
xelawho's Avatar
 
Join Date: Nov 2010
Posts: 2,437
Thanks: 52
Thanked 453 Times in 451 Posts
xelawho will become famous soon enoughxelawho will become famous soon enough
right. so if your code is how I imagine it, and if you have an empty heatMapData array to push objects onto, wouldn't it be something like this:

Code:
var markers = xml.documentElement.getElementsByTagName("marker");
  for (var i = 0; i < markers.length; i++) {
    var int = markers[i].getAttribute("intensity");
    var point = new google.maps.LatLng(
        parseFloat(markers[i].getAttribute("lat")),
        parseFloat(markers[i].getAttribute("lng")));
    var hObj = {
      location: point,
      weight: int
    }
heatMapData.push(hObj);
}
xelawho is offline   Reply With Quote
Users who have thanked xelawho for this post:
egregious (09-04-2012)