Skip to content

Commit 574d006

Browse files
committed
Clean sample_map.json
1 parent 37362d1 commit 574d006

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

app/controllers/genomes_controller.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,11 @@ def recalculate_miga
7777
end
7878

7979
# GET /genomes/1/sample_map
80+
# GET /genomes/1/sample_map.json
8081
def sample_map
8182
@crumbs = [['Genomes', genomes_url], [@genome.title(''), @genome], 'Map']
8283
@sample_set = @genome.sample_set
83-
render('sample_map', layout: !params[:content].present?)
84+
render(layout: !params[:content].present?)
8485
end
8586

8687
private

app/views/genomes/sample_map.json.jbuilder

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11

22
# GeoJSON list of coordinates
3-
locs = @sample_set.locations_complete
43
json.type 'FeatureCollection'
54
json.features(
6-
locs.map do |lat_lon|
5+
@sample_set.locations_complete.map do |lat_lon|
76
{
87
type: 'Feature',
98
geometry: {

0 commit comments

Comments
 (0)