File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 60
60
features = [ ]
61
61
description = ''
62
62
japan_count = 0
63
+ marked_dojos = [ ]
63
64
dojos_earth . each do |dojo |
64
65
# Skip dojos that don't have required params to point on DojoMap
65
66
if dojo [ :latitude ] && dojo [ :longitude ]
83
84
# Show only active dojos in Japan area on DojoMap
84
85
if dojo [ :countryCode ] == "JP"
85
86
86
- # Skip if not existing or marked as inactive by Japan DB
87
+ # Skip if not existing OR marked as 'Inactive' by Japan DB
87
88
next if zen2japan [ dojo [ :name ] ] . nil?
88
89
next if name2is_active [ zen2japan [ dojo [ :name ] ] ] == false
89
90
90
91
# Convert Zen name into Japan name by Hash
91
92
dojo [ :name ] = zen2japan [ dojo [ :name ] ] if zen2japan [ dojo [ :name ] ]
92
93
93
94
# Count active dojo in Japan displayed on DojoMap for debugging
94
- japan_count = japan_count . succ
95
+ # japan_count = japan_count.succ
95
96
#p "#{japan_count.to_s.rjust(3, '0')}: #{dojo[:name]}"
96
97
end
97
98
106
107
HTML
107
108
else
108
109
# for Dojos regeisted in coderdojo.jp
110
+
111
+ # Skip if multiple-dojos-in-one style in Japan DB to be unique
112
+ # e.g. '西宮・梅田', '藤井寺・柏原', '大田・邑南、他'
113
+ next if marked_dojos . include? dojo [ :name ]
114
+ marked_dojos << dojo [ :name ]
115
+
109
116
description = <<~HTML
110
117
#{ name2logo [ dojo [ :name ] ] } < br >
111
118
< b > #{ dojo [ :name ] } </ b> < br >
115
122
HTML
116
123
end
117
124
125
+ # Mark dojo to DojoMap
118
126
features << {
119
127
type : "Feature" ,
120
128
geometry : {
You can’t perform that action at this time.
0 commit comments