por que no me anda este????
filename es el XML.... en el momoento de qe vuelvo a leer desde el XML, coloco setMAP... y no me los borra....
Código PHP:
MYMAP.borrar = function(filename) {
$.get(filename, function(xml){
// var markers = [];
$(xml).find("marker").each(function(){
// create a new LatLng point for the marker
var lat = $(this).find('latitud').text();
var lng = $(this).find('longitud').text();
var point = new google.maps.LatLng(parseFloat(lat),parseFloat(lng));
// extend the bounds to include the new point
MYMAP.bounds.extend(point);
var marker = new google.maps.Marker({
position: point
//map: MYMAP.map
});
marker.setMap(null);
MYMAP.map.fitBounds(MYMAP.bounds);
});
});
}