質問編集履歴
1
コード追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -3,3 +3,93 @@
|
|
3
3
|
IE10やchromなど他のブラウザでは問題なく開くのですが...
|
4
4
|
|
5
5
|
どなたか解決法わかる方おられましたらよろしくお願いします。
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
```
|
10
|
+
|
11
|
+
$(function (){
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
// マップ設定
|
16
|
+
|
17
|
+
var latLng = new google.maps.LatLng(xx.xxxxx,xxx.xxxxxx);
|
18
|
+
|
19
|
+
map = new google.maps.Map(
|
20
|
+
|
21
|
+
document.getElementById("xxx"),
|
22
|
+
|
23
|
+
{
|
24
|
+
|
25
|
+
zoom: 15,
|
26
|
+
|
27
|
+
center: latLng,
|
28
|
+
|
29
|
+
scrollwheel: false
|
30
|
+
|
31
|
+
}
|
32
|
+
|
33
|
+
);
|
34
|
+
|
35
|
+
// マーカー設定
|
36
|
+
|
37
|
+
var markerImg = {
|
38
|
+
|
39
|
+
url: 'img/xxxxx.svg'
|
40
|
+
|
41
|
+
};
|
42
|
+
|
43
|
+
var marker = new google.maps.Marker({
|
44
|
+
|
45
|
+
position: latLng,
|
46
|
+
|
47
|
+
map: map,
|
48
|
+
|
49
|
+
icon: markerImg
|
50
|
+
|
51
|
+
});
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
//デザインカスタマイズ
|
56
|
+
|
57
|
+
var mapStyle =
|
58
|
+
|
59
|
+
[
|
60
|
+
|
61
|
+
{
|
62
|
+
|
63
|
+
"stylers": [
|
64
|
+
|
65
|
+
{ "saturation": -100 }
|
66
|
+
|
67
|
+
]
|
68
|
+
|
69
|
+
}
|
70
|
+
|
71
|
+
];
|
72
|
+
|
73
|
+
var mapType = new google.maps.StyledMapType(mapStyle);
|
74
|
+
|
75
|
+
map.mapTypes.set('xxxxxx', mapType);
|
76
|
+
|
77
|
+
map.setMapTypeId('xxxxxx');
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
//地図の中心
|
82
|
+
|
83
|
+
google.maps.event.addDomListener(window, "resize", function() {
|
84
|
+
|
85
|
+
var center = map.getCenter();
|
86
|
+
|
87
|
+
google.maps.event.trigger(map, "resize");
|
88
|
+
|
89
|
+
map.setCenter(center);
|
90
|
+
|
91
|
+
});
|
92
|
+
|
93
|
+
});
|
94
|
+
|
95
|
+
```
|