Google Maps Marker bug in Firefox 7.0.1? <pre><code>var map; var infoWindow; var markersArray = []; var newMarkersArray = []; var pickup_marker; $(document).ready(function() { initialize(); }); function setMarkers() { var row_length = $('#hidden_coords tr').size(); // Values of the markers are hidden within the cells of this table var marker = []; for (var z = 0; z &lt; row_length; z++) { var lng = $('#coords_lng'+z).val().trim(); var lat = $('#coords_lat'+z).val().trim(); var coord = parseFloat(lng); var coord2 = parseFloat(lat); var pos = new google.maps.LatLng(coord,coord2); marker[z] = new google.maps.Marker({ position: pos, map: map }); markersArray.push(marker[z]); } if (markersArray) { for (i in markersArray) { markersArray[i].setMap(map); } } } function initialize() { var myLatLng = new google.maps.LatLng(14.640808,121.097224); var myOptions = { maxZoom: 22, minZoom: 1, zoom: 12, center: myLatLng, mapTypeId: google.maps.MapTypeId.ROADMAP }; map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); infowindow = new google.maps.InfoWindow(); setMarkers(); google.maps.event.addListener(map, 'click', showInfoWindow); google.maps.event.addListener(map, 'click', function(event) { addMarker(event.latLng); }); } function addMarker(location) { //alert(location); var lat = location.lat(); var lng = location.lng(); $('#just_clicked_lat').val(lat); $('#just_clicked_lon').val(lng); marker = new google.maps.Marker({ position: location, map: map, icon: markerIcon }); if (newMarkersArray) { for (i in newMarkersArray) { newMarkersArray[i].setMap(null); } newMarkersArray.length = 0; } newMarkersArray.push(marker); } </code></pre> <p>This is my code. Function initialize() is called whenever the browser refreshes. Function setMarkers() makes the markers visible on the map. Function addMarker()adds a marker whenever I click on the map.</p> <p>I created two arrays, first the markersArray[], where the values of the stored lnglat that was retrieved from the database are placed. On the other hand, the newMarkersArray[] is where the new markers are placed (clicking on the map results into a marker being created).</p> <p>When creating a new marker, I make sure that only one new marker is displayed at a time. What happens if you create a marker is that an infowindow will popup which prompts the user to enter the name and address of the location. Once finished, the user should click the button which triggers an ajax function which calls a php method to save the values of the newly created marker to the sql database. Once its successfully saved, it is returned to the ajax function and the browser is reloaded using window.location.reload().</p> <p>Take note that this code works, on ALL OTHER BROWSERS except Firefox. The latest version I'm using is FF7.0.1. Please help! :(</p>