I am having a Google Map with lots of markers added using websockets. I am using custom marker images based on data availability. I want to make sure the newest marker stays
You have to set the marker option "optimized" to false in combination with the zIndex option.
var marker=new google.maps.Marker({ position:pin2, optimized: false, zIndex:99999999 });
This should solve your problem.