Skip to content

Commit

Permalink
var
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-blackson committed Feb 28, 2024
1 parent 9a7e865 commit db29be9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ Choose your country, and afterwards the region you want the warnings for. If you

## Changelog

### 3.0.1 (2024-02-26)
* (jack-blackson) Bugfix for location names
* (jack-blackson) Removed necessity to choose country, this is now automatically detected


### 3.0.0 (2024-02-26)
* (jack-blackson) Breaking change: switch to locations instead of choosing geocodes to be able to also handle warnings coming with polygons (e.g. Switzerland)

Expand Down
8 changes: 7 additions & 1 deletion admin/index_m.html
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,13 @@
let countryFound = crs[i].properties.country
if (checkIfInPoly(polygon)){
locationArray.push(loccode)
geocodeNameArray.push(geocodeLocation)
if (geocodeNameArray.length == 0){
geocodeNameArray.push(geocodeLocation)
}
else{
geocodeNameArray.push(' ' + geocodeLocation)

}
country = countryFound
console.log('Country: ' + country)
}
Expand Down
5 changes: 4 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,10 @@ function initialSetup(){

geocodeLocationConfig = adapter.config.geocodeLocation
geocodeCountry = adapter.config.geocodeCountry
adapter.log.debug('TT: ' + geocodeCountry)
if (geocodeCountry == ''){
// could be the case for the people who tested version 3.0.0
geocodeCountry = locationArray[0]+locationArray[1]
}
// check if there is a space after the comma, and if not, add it

/*
Expand Down

0 comments on commit db29be9

Please sign in to comment.