Skip to content

Commit

Permalink
fix bug causing maps with ?lat ?lon variables to fail
Browse files Browse the repository at this point in the history
  • Loading branch information
Abbe98 committed Mar 21, 2023
1 parent c92b199 commit 27ef7d3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,11 @@ function renderMap() {

let geometry;
if (item['lat'] && item['lon']) {
geometry = `${item['lat'].value} ${item['lon'].value}`;
geometry = `${item['lat'].value},${item['lon'].value}`.split(' ');
} else {
geometry = item['geometry'].value.split(' ');
}

geometry = item['geometry'].value.split(' ');
geometry = geometry.map(point => {
return point.split(',').map(xOrY => {
return parseFloat(xOrY);
Expand Down

0 comments on commit 27ef7d3

Please sign in to comment.