Open possec20 opened 2 years ago
This is the code I already have (mostly Choropleth source code):
<!DOCTYPE html>
It formatted a bit weird, so here is a photo:
@possec20 you should just need to invoke polygonAltitude
when you want that logic to change, for example on country selection. For instance if your select box has a onCountrySelection
, you could do something like:
onCountrySelection(country => world.polygonAltitude(d => d.properties.NAME = country ? 0.4 : 0.06))
Now it just says, that "world" is not defined
@possec20 where you're declaring that function, the variable world
is not in scope.
So it isn't a globle variable. I tried puttting the declaration of "world" out of the "fetch", but of course that breaks the whole thing. How can I make it to a globle variable, so I can access it everywhere?
I want to be able to have an input where you can write the name of a country, and then it elevates. However, I can't figure out how I can trigger it. I only found onclick and onhover functions and was wondering, what I could do. Something like that: