質問編集履歴
1
書式の改善
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,12 +1,16 @@
|
|
1
1
|
お世話になります。
|
2
2
|
|
3
3
|
railsでgoogle mapを表示する方法についてご教示いただきたくお願いいたします。
|
4
|
+
|
5
|
+
(初回質問時に質問書式が醜いとご指摘いただいたので、修正いたしました。ご指摘ありがとうございました。)
|
4
6
|
|
5
7
|
|
6
8
|
|
7
9
|
参考にさせていただいているページは以下になります。
|
8
10
|
|
9
|
-
http://codeal-rails-book.s3-website-ap-northeast-1.amazonaws.com/_book/googleMapsAPI/README.html
|
11
|
+
[Google Maps API連携アプリを開発する](http://codeal-rails-book.s3-website-ap-northeast-1.amazonaws.com/_book/googleMapsAPI/README.html)
|
12
|
+
|
13
|
+
|
10
14
|
|
11
15
|
|
12
16
|
|
@@ -18,19 +22,27 @@
|
|
18
22
|
|
19
23
|
/app/views/layouts/application.html.erbを開いて、
|
20
24
|
|
21
|
-
<head>タグ内に以下を記述しておりますが、うまく表示ができません
|
25
|
+
<head>タグ内に以下を記述しておりますが、うまく表示ができません
|
26
|
+
|
27
|
+
```html
|
22
28
|
|
23
29
|
<script src="//maps.google.com/maps/api/js?v=3.13&sensor=false&libraries=geometry" type="text/javascript"></script>
|
24
30
|
|
25
31
|
<script src='//google-maps-utility-library-v3.googlecode.com/svn/tags/markerclustererplus/2.0.14/src/markerclusterer_packed.js' type='text/javascript'></script>
|
26
32
|
|
33
|
+
```
|
34
|
+
|
27
35
|
|
28
36
|
|
29
37
|
2016年6月下旬から googlemapのAPIキーが必須になったという話も聞いたので、
|
30
38
|
|
39
|
+
|
40
|
+
|
31
|
-
http://nendeb.com/276
|
41
|
+
[API取得](http://nendeb.com/276)
|
32
42
|
|
33
43
|
を参考にさせていただき、キーを取得して、
|
44
|
+
|
45
|
+
```html
|
34
46
|
|
35
47
|
<script src="//maps.google.com/maps/api/js?v=3.13key=[私のkey}&sensor=false&libraries=geometry" type="text/javascript"></script>
|
36
48
|
|
@@ -38,6 +50,38 @@
|
|
38
50
|
|
39
51
|
|
40
52
|
|
41
|
-
|
53
|
+
```
|
42
54
|
|
55
|
+
と書き換えましたが、エラーが出て表示がされません。
|
56
|
+
|
57
|
+
現在はローカル環境で開発をしているのですが、chromeのコンソールで表示されるエラーは、以下の通り5つです。
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
```Console
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
index:6 GET http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerclustererplus/2.0.14/src/markerclusterer_packed.js
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
primitives.self-5b8a3a6….js?body=1:16 Uncaught ReferenceError: MarkerClusterer is not defined
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
Google Maps API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
util.js:211 Google Maps API warning: InvalidVersion https://developers.google.com/maps/documentation/javascript/error-messages#invalid-version
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
util.js:211 Google Maps API warning: SensorNotRequired https://developers.google.com/maps/documentation/javascript/error-messages#sensor-not-required
|
82
|
+
|
83
|
+
```
|
84
|
+
|
85
|
+
|
86
|
+
|
43
|
-
|
87
|
+
解決手段をご教示いただきたくよろしくお願いいたします。
|