Is your feature request related to a problem? Please describe.
GeoGuess has country mode. It should be great to have other game modes like states picker, continent picker.
Describe the solution you'd like
-
Allow users to create a new mode
- Define areas on the map with GeoJSON
Examples :
- add function set data random pos
Ex:
export function getCountryCodeNameFromLatLng(latLng, errorFunction) {
return axios
.get(
`https://nominatim.openstreetmap.org/reverse?lat=${latLng.lat()}&lon=${latLng.lng()}&zoom=5&addressdetails=1&format=json&extratags=1`
)
.then(({status, data}) => {
if (status === 200 && data) {
if(data.extratags['ISO3166-1:alpha2'])
return data.extratags['ISO3166-1:alpha2'];
return data.address['country_code'].toUpperCase();
}
})
.catch(() => {
errorFunction();
return undefined;
});
}
- Add function isPositionIsTrue
/**
* Return is area select is the right
* @param {object} propertyAreaSelect geojson feature property of the area select
* @param {LatLng} randomPos
* @return {boolean} true if is the right area
*/
function isPositionIsTrue(propertyAreaSelect, randomPos)
propertyAreaSelect = {"code":"93","nom":"Provence-Alpes-Côte d'Azur"}
Additional context
In the futures, we will save official modes on https://github.com/GeoGuess/GeoGuess-Maps
Is your feature request related to a problem? Please describe.
GeoGuess has country mode. It should be great to have other game modes like states picker, continent picker.
Describe the solution you'd like
Allow users to create a new mode
Examples :
Ex:
Additional context
In the futures, we will save official modes on https://github.com/GeoGuess/GeoGuess-Maps