###前提・実現したいこと
localhostでgooglemapを表示させたい
(その際にAPIキーを用いてgooglemapを表示する)
###発生している問題・エラーメッセージ
ファイル(file:///C:/xampp/htdocs/googleMap/googleMap.html)から表示する方法だとマップは表示されるが
localhost(http://localhost/googlemap/googleMap.html)だとエラーが出て表示されない
js?key=AIzaSyDrNMHAvdx-QKNNia9yfaCr7JR9jumCeSk&callback=initMap:43 Google Maps API error: ApiNotActivatedMapError https://developers.google.com/maps/documentation/javascript/error-messages#api-not-activated-map-error
API無
html
1<!DOCTYPE html> 2<html> 3 <head> 4 <meta charset="utf-8"/> 5 <div id="map"></div> 6 <link rel="stylesheet" tPype="googleMap/css" href="googleMap.css"> 7 <script src="googleMap.js"></script> 8 </head> 9 <script src="https://maps.googleapis.com/maps/api/js?callback=initMap"></script> 10 <body> 11 </body> 12</html> 13
APIあり
html
1<!DOCTYPE html> 2<html> 3 <head> 4 <meta charset="utf-8"/> 5 <div id="map"></div> 6 <link rel="stylesheet" tPype="googleMap/css" href="googleMap.css"> 7 <script src="googleMap.js"></script> 8 </head> 9 <script src="https://maps.googleapis.com/maps/api/js?key=APIキー&callback=initMap"></script> 10 <body> 11 </body> 12</html> 13
###試したこと
キーの制限「HTTPリファラー」の設定を(localhost/*)で試してみた

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/10/27 01:17