Skip to content

Commit

Permalink
Fix issues with undefined lat and long on world map (#1466)
Browse files Browse the repository at this point in the history
  • Loading branch information
lawik authored Aug 23, 2024
1 parent c774eb0 commit ca2db8d
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions assets/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,18 +167,20 @@ Hooks.WorldMap = {
for (let i = 0; i < markers.length; i++) {
let marker = markers[i];
let location = marker["location"];
let newMarker = {
type: "Feature",
properties: {
name: marker["identifier"],
status: marker["status"],
},
geometry: {
type: "Point",
coordinates: [location["longitude"], location["latitude"]]
if (location["longitude"] !== undefined && location["latitude"] !== undefined) {
let newMarker = {
type: "Feature",
properties: {
name: marker["identifier"],
status: marker["status"],
},
geometry: {
type: "Point",
coordinates: [location["longitude"], location["latitude"]]
}
}
devices.push(newMarker);
}
devices.push(newMarker);
}

var markerConnectedOptions = {
Expand Down

0 comments on commit ca2db8d

Please sign in to comment.