File tree Expand file tree Collapse file tree 3 files changed +9
-12
lines changed Expand file tree Collapse file tree 3 files changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -23,11 +23,10 @@ api.issue do
23
23
api.total_spent_hours(@issue.total_spent_hours)
24
24
end
25
25
26
- unless @issue.geom.nil?
27
- api.geom RGeo::GeoJSON.encode RGeo::GeoJSON::EntityFactory.instance.feature(
28
- RGeo::WKRep::WKBParser.new().parse(@issue.geom), @issue.id)
26
+ if @issue.geom
27
+ api.geojson @issue.geojson(simple: true)
29
28
else
30
- api.geom ""
29
+ api.geojson ""
31
30
end
32
31
33
32
render_api_custom_values @issue.visible_custom_field_values, api
Original file line number Diff line number Diff line change @@ -8,11 +8,10 @@ api.project do
8
8
api.status @project.status
9
9
api.is_public @project.is_public?
10
10
11
- unless @project.geom.nil?
12
- api.geom RGeo::GeoJSON.encode RGeo::GeoJSON::EntityFactory.instance.feature(
13
- RGeo::WKRep::WKBParser.new().parse(@project.geom), @project.id)
11
+ if @project.geom
12
+ api.geojson @project.geojson(simple: true)
14
13
else
15
- api.geom ""
14
+ api.geojson ""
16
15
end
17
16
18
17
render_api_custom_values @project.visible_custom_field_values, api
Original file line number Diff line number Diff line change @@ -9,11 +9,10 @@ api.user do
9
9
api.api_key @user.api_key if User.current.admin? || (User.current == @user)
10
10
api.status @user.status if User.current.admin?
11
11
12
- unless @user.geom.nil?
13
- api.geom RGeo::GeoJSON.encode RGeo::GeoJSON::EntityFactory.instance.feature(
14
- RGeo::WKRep::WKBParser.new().parse(@user.geom), @user.id)
12
+ if @user.geom
13
+ api.geojson @user.geojson(simple: true)
15
14
else
16
- api.geom ""
15
+ api.geojson ""
17
16
end
18
17
19
18
render_api_custom_values @user.visible_custom_field_values, api
You can’t perform that action at this time.
0 commit comments