title: How to show Google Map marker dynamically in a Laravel view page?
body: <p>I found some JavaScript code on the internet. It's helping me to store the latitude and longitude of a place, from the Google Map by moving the marker on my database table.</p>
  
  <p>Database column names are <code>la|lo</code>. Now I want to show the location on a view page. The map should have these properties <code>frameborder="0"</code>,  <code>scrolling="no"</code>, <code>marginheight="0"</code>, <code>marginwidth="0"</code>, <code>width="250"</code>,  <code>height="272"</code>.</p>
  
  <p>I'm a novice and I have poor knowledge on JavaScript. I'm providing the js code of registering the latitude and longitude.</p>
  
  <pre><code>&lt;script
  src="http://maps.googleapis.com/maps/api/js"&gt;
  &lt;/script&gt;
  &lt;script&gt;
  function initialize() {
      var latitude = 23.786758526804636;
      var longitude = 90.39979934692383;
      var zoom = 11;
  
      var LatLng = new google.maps.LatLng(latitude, longitude);
  
    var mapProp = {
      center: LatLng,
      zoom:12,
      mapTypeId:google.maps.MapTypeId.ROADMAP
    };
    var map=new google.maps.Map(document.getElementById("googleMap"), mapProp);
    var marker = new google.maps.Marker({
        position: LatLng,
        map: map,
        title: 'Drag Me!',
        draggable: true
      });
    google.maps.event.addListener(marker, 'dragend', function(event) {
  
        document.getElementById('la').value = event.latLng.lat();
        document.getElementById('lo').value = event.latLng.lng();
  
  
  
  });
  }
  google.maps.event.addDomListener(window, 'load', initialize);
  &lt;/script&gt;
  
          &lt;div id="googleMap" style="width:auto;height:400px;"&gt;&lt;/div&gt;
  
          &lt;input type="hidden" id="la" name="la"&gt;
          &lt;input type="hidden" id="lo" name="lo"&gt;
  </code></pre>