-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from MatteoFra/main
- Loading branch information
Showing
8 changed files
with
144 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
[ | ||
{ | ||
"longitude": "6.477635", | ||
"latitude": "46.373565", | ||
"CITY": "Thonon les bains" | ||
}, | ||
{ | ||
"longitude": "6.575", | ||
"latitude": "46.0625", | ||
"CITY": "Cluses" | ||
}, | ||
{ | ||
"longitude": "6.2069", | ||
"latitude": "46.1853", | ||
"CITY": "Gaillard" | ||
}, | ||
{ | ||
"longitude": "0.107929", | ||
"latitude": "49.49437", | ||
"CITY": "Le Havre" | ||
}, | ||
{ | ||
"longitude": "6.234158", | ||
"latitude": "46.193253", | ||
"CITY": "Annemasse" | ||
}, | ||
{ | ||
"longitude": "6.26667", | ||
"latitude": "46.166672", | ||
"CITY": "Vetraz Monthoux" | ||
}, | ||
{ | ||
"longitude": "6.33333", | ||
"latitude": "46.299999", | ||
"CITY": "Ballaison" | ||
}, | ||
{ | ||
"longitude": "6.1673232", | ||
"latitude": "45.8615248", | ||
"CITY": "Annecy" | ||
}, | ||
{ | ||
"longitude": "6.409053", | ||
"latitude": "46.078025", | ||
"CITY": "Bonneville" | ||
}, | ||
{ | ||
"longitude": "6.25000", | ||
"latitude": "46.200001", | ||
"CITY": "Ville la Grand" | ||
}, | ||
{ | ||
"longitude": "6.3062", | ||
"latitude": "46.1546", | ||
"CITY": "Nangy" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export default interface City { | ||
longitude: string | ||
latitude: string | ||
CITY: string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import citiesData from "../assets/cities.json" | ||
|
||
import City from "../interfaces/city" | ||
|
||
const cities: any = citiesData | ||
|
||
// Filtrer les données de la ville pour ne retourner que le nom et les valeurs [lat,lng]. | ||
const filteredCityData = cities.map((city: City) => { | ||
return { | ||
name: city.CITY, | ||
latlng: [ | ||
parseFloat(city.latitude).toFixed(1), | ||
parseFloat(city.longitude).toFixed(1), | ||
], | ||
} | ||
}) | ||
|
||
export const citiesWithLatLng = filteredCityData |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters