2017-10-22 17 views
0

私はGoogleマップ上の場所を表示する簡単なコードを持っています。しかし、いくつかの理由でそれは暗い画面を示しています。何が起きているのか?js google maps暗い画面を表示

<html> 
    <head> 
    <title> Using Google Maps API in PHP- InfoTuts </title> 
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> 
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/> 
<link rel="stylesheet" type="text/css" href="style.css" media="screen" /> 
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> 
<script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script> 

</head> 




    <div id="display_map" style="width:450px;height:350px; "></div> 

<div id="myad"> 
<script type="text/javascript"><!-- 
google_ad_client = "ca-pub-9165168790934890"; 
/* top */ 
google_ad_slot = "6414226949"; 
google_ad_width = 728; 
google_ad_height = 90; 
//--> 
</script> 
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> 
</script> 
</div> 

screenshot

これはコンソールです: screenshot

+2

コードを投稿してください。そうしないと、回答が得られません。 – skobaljic

答えて

0

あなたがGoogleのアプリケーションキーを持っていますか?

<script src="https://maps.googleapis.com/maps/api/js?key=<your app key>&callback=<your endpoint>"></script> 
+0

はい、私はそれを持っていますが、私はどこに私のスクリプトに入れて見つけることができませんでした。私はあなたのスクリプトを試してみますが、それは問題のようです。 –

+0

また、GoogleコンソールであなたのURLを許可する必要があります。私のサイトマップを見てもうまくいく[リンク](https://juliet.life/sitemap/) – Interreto

関連する問題