Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
906 B
4
Indexable
Never
<script>

      function initMap() {
        
        var lat = "{{$lat}}";
        var long = "{{$lat}}";
        var tempat = {lat: lat, lng: long};
        
        
        var map = new google.maps.Map(document.getElementById('map'), {
          zoom: 9,
          center: tempat
        });

        // mebuat konten untuk info window
        var contentString = '<h4>{{$nama_pengembang}}</h4>';

        // membuat objek info window
        var infowindow = new google.maps.InfoWindow({
          content: contentString,
          position: tempat
        });
        
        
        var marker = new google.maps.Marker({
          position: tempat,
          map: map,
          title: 'Pengembang'
        });
        
        
        marker.addListener('click', function() {
          infowindow.open(map, marker);
        });
        
      }
    </script>
Leave a Comment