質問編集履歴
2
ソースコード追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,6 +1,36 @@
|
|
1
1
|
###前提・実現したいこと
|
2
2
|
WebページにGoogleマップを表示しようとしています。
|
3
3
|
|
4
|
-
このとき、マーカーを
|
4
|
+
このとき、マーカーにマウスを当てたときinfowindowではなくローカルにある画像を表示したいのですが、良い方法はないでしょうか?
|
5
5
|
|
6
|
-
ライブラリはgmaps.jsを使っています。
|
6
|
+
ライブラリはgmaps.jsを使っています。
|
7
|
+
|
8
|
+
#ソースコード
|
9
|
+
```javascript
|
10
|
+
<script type="text/javascript">
|
11
|
+
var map;
|
12
|
+
$(document).ready(function(){
|
13
|
+
map = new GMaps({
|
14
|
+
div: "#map",
|
15
|
+
lat: ,#緯度
|
16
|
+
lng: ,#経度
|
17
|
+
zoom:12,
|
18
|
+
});
|
19
|
+
map.addMarker({
|
20
|
+
lat: ,#緯度
|
21
|
+
lng: ,#経度
|
22
|
+
title: "title",
|
23
|
+
infoWindow: {
|
24
|
+
content: "<p>text</p>"
|
25
|
+
},
|
26
|
+
mouseover: function(e){
|
27
|
+
this.infoWindow.open(this.map, this);
|
28
|
+
},
|
29
|
+
mouseout: function(e){
|
30
|
+
this.infoWindow.close(this.map, this);
|
31
|
+
},
|
32
|
+
click: function(e){
|
33
|
+
window.location.href = "http://~";
|
34
|
+
}
|
35
|
+
});
|
36
|
+
```
|
1
初心者マーク追加
title
CHANGED
File without changes
|
body
CHANGED
File without changes
|