Вы можете использовать API Google Maps JavaScript для создания карты и отображения ее на веб-странице. Вот пример фрагмента кода для создания карты с центром на определенной широте и долготе с маркером в этом месте:
<!DOCTYPE html> <html> <head> <title>Google Maps JavaScript API Example</title> <script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY"></script> <script> function initMap() { // Define the location to center the map var myLatLng = {lat: 37.7749, lng: -122.4194}; // Create a map object and set the center and zoom level var map = new google.maps.Map(document.getElementById('map'), { center: myLatLng, zoom: 12 }); // Add a marker to the map var marker = new google.maps.Marker({ position: myLatLng, map: map, title: 'San Francisco' }); } </script> </head> <body onload="initMap()"> <div id="map" style="height: 500px; width: 100%;"></div> </body> </html>
Обратите внимание, что вам нужно будет заменить YOUR_API_KEY
в исходном коде скрипта вашим собственным ключом Google Maps API. Вы можете получить ключ API, следуя инструкциям в документации API Google Maps JavaScript.