質問編集履歴
1
コード修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -9,25 +9,24 @@
|
|
9
9
|
|
10
10
|
```ruby
|
11
11
|
<script type="text/javascript">
|
12
|
-
|
12
|
+
handler = Gmaps.build('Google');
|
13
|
-
|
13
|
+
handler.buildMap({ provider: {}, internal: {id: 'map'}}, function(){
|
14
|
-
|
14
|
+
markers = handler.addMarkers([
|
15
|
-
|
15
|
+
{
|
16
|
-
|
16
|
+
"lat": <%= @product.latitude %>,
|
17
|
-
|
17
|
+
"lng": <%= @product.longitude %>,
|
18
|
-
|
18
|
+
"picture": {
|
19
|
-
|
19
|
+
"width": 32,
|
20
|
-
|
20
|
+
"height": 32
|
21
|
-
|
21
|
+
},
|
22
|
-
|
22
|
+
"infowindow": '<%= @product.address %>'
|
23
|
-
|
23
|
+
}
|
24
|
-
|
24
|
+
]);
|
25
|
-
|
25
|
+
handler.bounds.extendWith(markers);
|
26
|
-
|
26
|
+
handler.fitMapToBounds();
|
27
|
-
|
27
|
+
handler.getMap().setZoom(15);
|
28
|
-
|
28
|
+
});
|
29
|
-
|
29
|
+
</script>
|
30
|
-
<% end %>
|
31
30
|
```
|
32
31
|
|
33
32
|
###実現したいこと
|