gmaps4rails 0.0.10 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/app/views/gmaps4rails/gmaps/index.xml.builder +56 -12
- metadata +3 -3
|
@@ -2,20 +2,65 @@ xml.instruct! :xml, :version=>"1.0"
|
|
|
2
2
|
xml.kml do
|
|
3
3
|
xml.Document do
|
|
4
4
|
#if @objects.first.respond_to?('gmaps4rails_marker')
|
|
5
|
-
xml.Style('id' => '
|
|
5
|
+
xml.Style('id' => 'normalPlacemark') do
|
|
6
6
|
xml.IconStyle do
|
|
7
7
|
xml.Icon "<href>" + @objects.first.gmaps4rails_marker + "</href>"
|
|
8
8
|
end
|
|
9
9
|
end
|
|
10
|
-
|
|
10
|
+
|
|
11
|
+
xml.Style('id' => 'highlightPlacemark') do
|
|
12
|
+
xml.IconStyle do
|
|
13
|
+
xml.Icon "<href>" + @objects.first.gmaps4rails_marker_hover + "</href>"
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
xml.Style('id' => 'customMap') do
|
|
18
|
+
xml.Pair do
|
|
19
|
+
xml.key 'normal'
|
|
20
|
+
xml.StyleUrl '#normalPlacemark'
|
|
21
|
+
end
|
|
22
|
+
xml.Pair do
|
|
23
|
+
xml.key 'highlight'
|
|
24
|
+
xml.StyleUrl '#highlightPlacemark'
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
11
28
|
|
|
12
|
-
# <
|
|
13
|
-
#
|
|
14
|
-
# <
|
|
15
|
-
#
|
|
16
|
-
#
|
|
17
|
-
#
|
|
18
|
-
#
|
|
29
|
+
# <Document>
|
|
30
|
+
# <name>Highlighted Icon</name>
|
|
31
|
+
# <description>Place your mouse over the icon to see it display the new icon</description>
|
|
32
|
+
# <Style id="highlightPlacemark">
|
|
33
|
+
# <IconStyle>
|
|
34
|
+
# <Icon>
|
|
35
|
+
# <href>http://maps.google.com/mapfiles/kml/paddle/red-stars.png</href>
|
|
36
|
+
# </Icon>
|
|
37
|
+
# </IconStyle>
|
|
38
|
+
# </Style>
|
|
39
|
+
# <Style id="normalPlacemark">
|
|
40
|
+
# <IconStyle>
|
|
41
|
+
# <Icon>
|
|
42
|
+
# <href>http://maps.google.com/mapfiles/kml/paddle/wht-blank.png</href>
|
|
43
|
+
# </Icon>
|
|
44
|
+
# </IconStyle>
|
|
45
|
+
# </Style>
|
|
46
|
+
# <StyleMap id="exampleStyleMap">
|
|
47
|
+
# <Pair>
|
|
48
|
+
# <key>normal</key>
|
|
49
|
+
# <styleUrl>#normalPlacemark</styleUrl>
|
|
50
|
+
# </Pair>
|
|
51
|
+
# <Pair>
|
|
52
|
+
# <key>highlight</key>
|
|
53
|
+
# <styleUrl>#highlightPlacemark</styleUrl>
|
|
54
|
+
# </Pair>
|
|
55
|
+
# </StyleMap>
|
|
56
|
+
# <Placemark>
|
|
57
|
+
# <name>Roll over this icon</name>
|
|
58
|
+
# <styleUrl>#exampleStyleMap</styleUrl>
|
|
59
|
+
# <Point>
|
|
60
|
+
# <coordinates>-122.0856545755255,37.42243077405461,0</coordinates>
|
|
61
|
+
# </Point>
|
|
62
|
+
# </Placemark>
|
|
63
|
+
# </Document>
|
|
19
64
|
|
|
20
65
|
if @objects.first.respond_to?('gmaps4rails_info')
|
|
21
66
|
@objects.each do |object|
|
|
@@ -24,7 +69,7 @@ xml.kml do
|
|
|
24
69
|
desc = object.gmaps4rails_info
|
|
25
70
|
lat = object.gmaps4rails_latitude.nil? ? "" : object.gmaps4rails_latitude
|
|
26
71
|
long = object.gmaps4rails_longitude.nil? ? "" : object.gmaps4rails_longitude
|
|
27
|
-
xml.styleUrl "#
|
|
72
|
+
xml.styleUrl "#customMap"
|
|
28
73
|
xml.description desc
|
|
29
74
|
xml.Point do
|
|
30
75
|
str = long + "," + lat + ",0"
|
|
@@ -36,8 +81,7 @@ xml.kml do
|
|
|
36
81
|
@objects.each do |object|
|
|
37
82
|
xml.Placemark do
|
|
38
83
|
desc = object.gmaps4rails_picture.nil? ? "" : '<img width="40" heigth="40" src="' + object.gmaps4rails_picture + '">'
|
|
39
|
-
xml.
|
|
40
|
-
xml.styleUrl "#specmarker"
|
|
84
|
+
xml.styleUrl "#customMap"
|
|
41
85
|
desc += object.gmaps4rails_description.nil? ? "" : object.gmaps4rails_description
|
|
42
86
|
lat = object.gmaps4rails_latitude.nil? ? "" : object.gmaps4rails_latitude
|
|
43
87
|
long = object.gmaps4rails_longitude.nil? ? "" : object.gmaps4rails_longitude
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gmaps4rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 9
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 0
|
|
9
|
-
-
|
|
10
|
-
version: 0.0.
|
|
9
|
+
- 11
|
|
10
|
+
version: 0.0.11
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Benjamin Roth
|