title: Google Map Center set user current position
body: <p>I am trying to make marker moving and get lat lng. My code works correctly.but Now I want to set my map center as my current location. I am trying with geo location code but when i add  getCurrentPosition then map not showing.</p>
  
  <p>my moving marker map code is</p>
  
  <pre><code> var marker, map;
  
        function initialize() {
          var myLatlng = new google.maps.LatLng(53.871963457471786,10.689697265625);      
  
                  var mapOptions = {
            zoom: 4,
            center: myLatlng,
            mapTypeId: google.maps.MapTypeId.ROADMAP
          } 
          map = new google.maps.Map(document.getElementById('map_canvas'), mapOptions);
  
          marker = new google.maps.Marker({
              position: myLatlng,
              map: map,
              title: 'Hello World!'
          });
  
        }
        $(function() {
          initialize();
  
          google.maps.event.addListener(map, 'click', function(event) {    
              var lat=event.latLng.lat();
              var lng=event.latLng.lng();
              $('#latlng').val(lat+', '+lng); 
            marker.animateTo(event.latLng);
          });
        }); 
  
     &lt;input type="text" id="latlng" size="40" /&gt;&lt;br /&gt;
      &lt;div id="map_canvas"&gt;&lt;/div&gt;
  </code></pre>