title: Get Current Location On Google Map
body: <p>I'm having some trouble when i want to get current location.</p>
  
  <p>This is my first time using this GM API, and there are so much things i don't understand.</p>
  
  <p>Here is my code, and i want </p>
  
  <pre class="lang-js prettyprint-override"><code>var geocoder = new google.maps.Geocoder();
  
  function initialize() {
    var latLng = new google.maps.LatLng(-7.7801502, 110.3846387);
    var map = new google.maps.Map(document.getElementById('mapCanvas'), {
      zoom: 15,
      center: latLng,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    });
  
    var marker = new google.maps.Marker({
      position: latLng,
      title: 'Ambarrukmo Plaza Yogyakarta',
      map: map,
      draggable: true
    });
  }
  </code></pre>
  
  <p>The problem is, i  want to change -7.7801502 and 110.3846387 value automatically based on user's current position. Can i do that?</p>
  
  <p>Thanks before for your help and explanation.</p>
  
  <p>Another question :
  -> What if i'm going to change those value based on a device embedded with GPS?</p>