Skip to content

Commit

Permalink
Merge pull request #6 from solgenomics/topic/fixes_bugs
Browse files Browse the repository at this point in the history
add levelName as parameter
  • Loading branch information
MFlores2021 authored Sep 7, 2022
2 parents 98769f9 + 540a639 commit a98770a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Fieldmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const NO_POLYGON_ERROR = "Please select the area that contain the plots";
const DEFAULT_OPTS = {
brapi_auth: null,
brapi_pageSize: 1000,
brapi_levelName: 'plot',
defaultPos: [0, 0],
defaultZoom: 2,
normalZoom: 16,
Expand Down Expand Up @@ -301,7 +302,7 @@ export default class Fieldmap {
brapi.search_observationunits({
"studyDbIds":[studyDbId],
'pageSize':this.opts.brapi_pageSize,
'observationUnitLevelName' : 'plot'
'observationLevels' : [{ "levelName" : this.opts.brapi_levelName }]
})
.each(ou=>{
ou.X = parseFloat(ou.X);
Expand Down Expand Up @@ -627,7 +628,7 @@ export default class Fieldmap {
let nodes = [];
this.plots.features.forEach((plot)=>{
let params = {
observationUnitPosition: {geoCoordinates: plot},
observationUnitPosition: {geoCoordinates: plot, observationLevel:{levelName: this.opts.brapi_levelName }},
observationUnitDbId: plot.properties.observationUnitDbId
};
// XXX Using internal brapijs method for now
Expand Down

0 comments on commit a98770a

Please sign in to comment.