File tree Expand file tree Collapse file tree 1 file changed +15
-9
lines changed Expand file tree Collapse file tree 1 file changed +15
-9
lines changed Original file line number Diff line number Diff line change 63
63
dojos_earth . each do |dojo |
64
64
# 活動していない道場は除外
65
65
#
66
- # stage:
67
- # 0: In planning
68
- # 1: Open, come along
69
- # 2: Register ahead
70
- # 3: 満員
71
- # 4: 活動していません
72
- if dojo [ :geoPoint ] && dojo [ :country ] && dojo [ :stage ] != 4
66
+ # stage: => Clubs API (renewal in 2023/12)
67
+ # 0: In planning => PENDING
68
+ # 1: Open, come along => OPEN
69
+ # 2: Register ahead => ?
70
+ # 3: 満員 => ?
71
+ # 4: 活動していません => ?
72
+ #
73
+ # MEMO: The first conditions when using the outdated CoderDojo API (aka Zen API).
74
+ # if dojo[:geoPoint] && dojo[:country] && dojo[:stage] != 4
75
+
76
+ # Skip dojos that don't have required params to point on DojoMap
77
+ if dojo [ :latitude ] && dojo [ :longitude ] && dojo [ :stage ] . eql? ( 'OPEN' )
78
+ #pp dojo
73
79
74
80
# Show only active dojos in Japan area on DojoMap
75
- if dojo [ :country ] [ :countryName ] == "Japan "
81
+ if dojo [ :countryCode ] == "JP "
76
82
77
83
# Skip if not existing or marked as inactive by Japan DB
78
84
next if zen2japan [ dojo [ :name ] ] . nil?
110
116
type : "Feature" ,
111
117
geometry : {
112
118
type : "Point" ,
113
- coordinates : [ dojo [ :geoPoint ] [ :lon ] , dojo [ :geoPoint ] [ :lat ] ] ,
119
+ coordinates : [ dojo [ :longitude ] , dojo [ :latitude ] ] ,
114
120
} ,
115
121
properties : {
116
122
'marker-size' => 'small' , # small, medium, large
You can’t perform that action at this time.
0 commit comments