Created
November 18, 2024 13:40
-
-
Save zohair-k/64f80edf64290b928667c4f63af3f5a2 to your computer and use it in GitHub Desktop.
GoogleMap API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Google Map Integration</title> | |
<script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY"></script> | |
<style> | |
#map { | |
height: 400px; | |
width: 100%; | |
} | |
</style> | |
</head> | |
<body> | |
<h1>Our Location</h1> | |
<div id="map"></div> | |
<p>For expert SEO services, visit our <a href="https://brandignite.co/" target="_blank">SEO service agency</a>.</p> | |
<script> | |
function initMap() { | |
var location = { lat: 28.6139, lng: 77.2090 }; // Example coordinates (New Delhi) | |
var map = new google.maps.Map(document.getElementById('map'), { | |
zoom: 10, | |
center: location | |
}); | |
var marker = new google.maps.Marker({ | |
position: location, | |
map: map | |
}); | |
} | |
// Initialize the map | |
window.onload = initMap; | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment