質問編集履歴
3
細かい修正2
title
CHANGED
File without changes
|
body
CHANGED
@@ -30,6 +30,6 @@
|
|
30
30
|
・
|
31
31
|
|
32
32
|
var contentString = shopN.title;
|
33
|
-
var
|
33
|
+
var infowindowN = new google.maps.InfoWindow({ content: contentString });
|
34
|
-
google.maps.event.addListener(shopN, 'click', function() {
|
34
|
+
google.maps.event.addListener(shopN, 'click', function() { infowindowN.open(map,shopN); });
|
35
35
|
```
|
2
細かい修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -18,12 +18,12 @@
|
|
18
18
|
|
19
19
|
```
|
20
20
|
var contentString = shop1.title;
|
21
|
-
var
|
21
|
+
var infowindow1 = new google.maps.InfoWindow({ content: contentString });
|
22
|
-
google.maps.event.addListener(shop1, 'click', function() {
|
22
|
+
google.maps.event.addListener(shop1, 'click', function() { infowindow1.open(map,shop1); });
|
23
23
|
|
24
24
|
var contentString = shop2.title;
|
25
|
-
var
|
25
|
+
var infowindow2 = new google.maps.InfoWindow({ content: contentString });
|
26
|
-
google.maps.event.addListener(shop2, 'click', function() {
|
26
|
+
google.maps.event.addListener(shop2, 'click', function() { infowindow2.open(map,shop2); });
|
27
27
|
|
28
28
|
・
|
29
29
|
・
|
1
Infowindowの後にもショップの配列番号●●が必要だったので追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -9,8 +9,8 @@
|
|
9
9
|
|
10
10
|
// 店舗情報を元に「shop●●」を自動出力
|
11
11
|
var contentString = shop●●.title;
|
12
|
-
var infowindow = new google.maps.InfoWindow({ content: contentString });
|
12
|
+
var infowindow●● = new google.maps.InfoWindow({ content: contentString });
|
13
|
-
google.maps.event.addListener(shop●●, 'click', function() { infowindow.open(map,shop●●); });
|
13
|
+
google.maps.event.addListener(shop●●, 'click', function() { infowindow●●.open(map,shop●●); });
|
14
14
|
```
|
15
15
|
|
16
16
|
[参考]
|