Skip to content

Commit

Permalink
fix: handling diff between referent and poi mondial relay
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianRid committed Jul 5, 2021
1 parent 9329d80 commit 200d154
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tumeplay-app/src/screens/components/global/OpenStreetMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,15 @@ export default function OpenStreetMap(props) {
}

const newItems = items.map((item) => {
const latToFloat = item.latitude
const longToFloat = item.longitude
let latToFloat;
let longToFloat;
if (item.Latitude) {
latToFloat = parseFloat(item.Latitude.replace(',','.'))
longToFloat = parseFloat(item.Longitude.replace(',','.'))
} else {
latToFloat = item.latitude
longToFloat = item.longitude
}
item.coordinates = {...{latitude: latToFloat, longitude: longToFloat}}
return item
})
Expand Down

0 comments on commit 200d154

Please sign in to comment.