Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
1.1 kB
1
Indexable
Never
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>My Google Map</title>
    <style>
        #map {
            height: 600px;
            width: 100%;
        }
    </style>
</head>

<body>
    <h1>My Google Map</h1>
    <div id="map"></div>
    <script>
        function initMap() {
            const izmit = { lat: 40.765470, lng: 29.940592 };

            var options = {
                zoom: 15,
                center: { lat: 40.765470, lng: 29.940592 },
            }
            const map = new google.maps.Map(document.getElementById("map"), options);

            const marker = new google.maps.Marker({
                position: izmit,
                map: map,
                draggable:true,
            });
        }
    </script>
    <script
        src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAn1m17AAhjM7pKbqe3lFNyqwZpuqMLUh4&callback=initMap&v=weekly"
        async></script>
</body>

</html>