Skip to content

Commit

Permalink
Update building.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Beakerboy authored May 15, 2024
1 parent 924e7cd commit ce392e6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/building.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class Building {
this.type = 'relation';
}
if (this.isValidData(outerElementXml)) {
this.buildNodeList();
this.nodelist = this.buildNodeList(this.fullXmlData);
this.setHome();
this.repositionNodes();
if (this.type === 'way') {
Expand Down Expand Up @@ -98,8 +98,8 @@ class Building {
/**
* build an array of all the lat/long values of the nodes
*/
buildNodeList() {
const nodeElements = this.fullXmlData.getElementsByTagName('node');
static buildNodeList(fullXmlData) {
const nodeElements = fullXmlData.getElementsByTagName('node');
let id = 0;
var node;
var coordinates = [];
Expand All @@ -111,7 +111,7 @@ class Building {
coordinates = [node.getAttribute('lon'), node.getAttribute('lat')];
nodeList[id] = coordinates;
}
this.nodeList = nodeList;
return nodeList;
}

/**
Expand Down

0 comments on commit ce392e6

Please sign in to comment.