Skip to content

Commit

Permalink
feat: added weight
Browse files Browse the repository at this point in the history
  • Loading branch information
Chandram-Dutta committed Feb 17, 2024
1 parent bc5116a commit ddfefa5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ async function getPoints() {
let url = "https://suzi-backend.onrender.com/gheatmap/test";
let response = await fetch(url);
let data = await response.json();
let locations = data.map((location: { latitude: number | google.maps.LatLng | google.maps.LatLngLiteral; longitude: number | boolean | null | undefined; }) => {
return new google.maps.LatLng(location.latitude, location.longitude);
let locations = data.map((location: { latitude: number | google.maps.LatLng | google.maps.LatLngLiteral; longitude: number | boolean | null | undefined; rating: number | boolean | null | undefined }) => {
return { location: new google.maps.LatLng(location.latitude, location.longitude), weight: location.rating }
});
return locations;
}
Expand Down

0 comments on commit ddfefa5

Please sign in to comment.