forked from MapComplete/MapComplete
Use latlon2country instead of codegrid
This commit is contained in:
parent
89b2dc8a10
commit
c2b1f6643b
6 changed files with 44 additions and 30 deletions
23
test.ts
23
test.ts
|
@ -1,20 +1,17 @@
|
|||
//*
|
||||
|
||||
import CountryCoder from "latlon2country/lib/countryCoder";
|
||||
|
||||
import Direction from "./UI/Input/DirectionInput";
|
||||
import {UIEventSource} from "./Logic/UIEventSource";
|
||||
import {VariableUiElement} from "./UI/Base/VariableUIElement";
|
||||
|
||||
const d = new UIEventSource("90");
|
||||
new Direction(d).AttachTo("maindiv")
|
||||
new VariableUiElement(d.map(d => "" + d + "°")).AttachTo("extradiv")
|
||||
|
||||
UIEventSource.Chronic(25, () => {
|
||||
const degr = (Number(d.data) + 1) % 360;
|
||||
d.setData(""+ degr);
|
||||
return true;
|
||||
})
|
||||
f
|
||||
unction pr(countries) {
|
||||
console.log(">>>>>", countries.join(";"))
|
||||
}
|
||||
|
||||
coder.CountryCodeFor(3.2, 51.2, pr)
|
||||
coder.CountryCodeFor(4.2, 51.2, pr);
|
||||
coder.CountryCodeFor(4.92119, 51.43995, pr)
|
||||
coder.CountryCodeFor(4.93189, 51.43552, pr)
|
||||
coder.CountryCodeFor(34.2581, 44.7536, pr)
|
||||
/*/
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue