In PHP I am querying my database and creating a XML document. that has the following layout.
<markers>
<mark traffic="" latitude ="" longitude =""></mark>
<mark traffic="" latitude ="" longitude =""></mark>
</markers>
I have created the following code trying to read these attributes to display into google maps here is my Jquery
$.get('/PHP/SQL_Maindata.PHP', function(d){ $(d).find('marker').each(function()
{
//gets Google LatLng
var latlng = new google.maps.LatLng($(this).attr('latitude'),$(this).attr('longitude'));
var myMarker = new google.maps.Marker({position: latlng,map: map,title:$(this).attr('traffic')});
});
});