title: Google Maps API Does Not center the correct location
body: <p><br>
  I have been through every possible question related to my problem and tried many solutions, none seem to help. I am using the Map API of Google and the map is not centering to the correct lat long pair. It is pointing at (0,0) which is some where in the middle of South Pacific Ocean. Upon doing geolocation of my Lat Long pairs, it give the correct address.<br>
  Here is my code:</p>
  
  <pre><code> $(document).ready(function(){
      var loc = {lat:0,long:0};
      if (navigator.geolocation){
      navigator.geolocation.getCurrentPosition(showPosition);
      }else{
      alert("Geolocation is not supported by this browser.");
      }
      console.log(loc);
      function showPosition(position){ 
      loc.lat=position.coords.latitude;
      loc.long=position.coords.longitude;
      var geocoder = new google.maps.Geocoder();
      var latLng = new google.maps.LatLng(loc.lat, loc.long);
      console.log(latLng);
      if (geocoder) {
          geocoder.geocode({ 'latLng': latLng}, function (results, status) {
          if (status == google.maps.GeocoderStatus.OK) {
            console.log(results[0].formatted_address); 
            alert('Address:'+results[0].formatted_address);
          }else {
              console.log("Geocoding failed: " + status);
          }
         }); //geocoder.geocode()
      } 
      }
      var latLong = new google.maps.LatLng(loc.lat, loc.long);
      var mapOptions = {
      center: latLong,
      useCurrentLocation : true,
      zoom: 14,
      mapTypeId: google.maps.MapTypeId.ROADMAP
      };
      var mapMsg = new google.maps.Map(document.getElementById("local_map"), mapOptions);
      google.maps.event.addDomListener(window, 'load');
      var markerOptions = new google.maps.Marker({
      clickable: true,
      flat: true,
      map: mapMsg,
      position: latLong,
      title: "You are here",
      visible:true,
      icon:'http://maps.google.com/mapfiles/ms/icons/blue-dot.png',
      });
  });
  </code></pre>
  
  <p><br>
  Here is the screenshot of Firefox's console showing the correct Location address and lat long.<br><br>
  <img src="https://i.stack.imgur.com/cO85U.png" alt="Firefox Console"><br><br>
  the First two Lines in the console are the Coordinates, the third line is the Geocoded location.<br>
  Please tell me where I'm wrong. I know this would be a silly mistake, but I'm new to it.</p>
  
  <p>Regards</p>