PDA

View Full Version : سوال: کار با لوکیشن و نقشه مبتدی



علیرضا5
دوشنبه 12 اسفند 1398, 18:35 عصر
سلام
بنده نقشه گوگل رو در سایتم بارگذاری کردم

در این آدرس
http://bazarefori.ir/ww2.html
منتهی وقتی صفحه رو بازمیکنم نقشه بارگذاری نمیشه و پیام میده مالک این وب سایت شما هستید

منم خب فیل شکن رو روشن کردم و همه مراحل رو رفتم ولی یه صفحش میپرسه نام کشور که تو کشورها اصلا ایران نیست و پستال کد رو میپرسه

حالامن نمی دونم اگه کلا راه رو درست رفتم کشور و پستال رو چی بنویسم
و اگرم کلا از بیخ اشتبا رفتم خب پس قصه کلا چی هست

باتشکر

Tekyegah
چهارشنبه 03 اردیبهشت 1399, 02:04 صبح
این نمونه کدی هست که گوگل خودش گذاشته تو سایتش به آدرس ( با ف.ی.ل.ت.ر شکن باید وارد شد ) : https://developers.google.com/maps/documentation/javascript/adding-a-google-map


<!DOCTYPE html>
<html>
<head>
<style>
/* Set the size of the div element that contains the map */
#map {
height: 400px; /* The height is 400 pixels */
width: 100%; /* The width is the width of the web page */
}
</style>
</head>
<body>
<h3>My Google Maps Demo</h3>
<!--The div element for the map -->
<div id="map"></div>
<script>
// Initialize and add the map
function initMap() {
// The location of Uluru
var uluru = {lat: -25.344, lng: 131.036};
// The map, centered at Uluru
var map = new google.maps.Map(
document.getElementById('map'), {zoom: 4, center: uluru});
// The marker, positioned at Uluru
var marker = new google.maps.Marker({position: uluru, map: map});
}
</script>
<!--Load the API from the specified URL
* The async attribute allows the browser to render the page while the API loads
* The key parameter will contain your own API key (which is not needed for this tutorial)
* The callback parameter executes the initMap() function
-->
<script async defer
src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap">
</script>
</body>
</html>
در واقع از شما یه YOUR_API_KEY میخواد هااااا !!! شما تو صفحتون از این ساختار استفاده کردید ؟