Is any way to control "map object" outside WindyInit function? Plz Help Me
-
Please help me.
When I click the button (outside of map), I want to flyto() to the desired location, but to use this function, windyInit() will be executed again and the map will be reloaded.
Here's my code :
const [moveHere,setMoveHere] = useState([])windyInit(options, windyAPI => {
const {map} = windAPI;
map.flyTo([xx,xx],x)
})Is there a way to use the map object outside the windowInit function?
Or
Is there any other way to use the flyTo() function without reloading?I am currently developing by React.js.
-
@sngy_chan said in Is any way to control "map object" outside WindyInit function? Plz Help Me:
Please help me.
When I click the button (outside of map), I want to flyto() to the desired location, but to use this function, windyInit() will be executed again and the map will be reloaded.
windyInit(options, windyAPI => {
const {map} = windAPI;
map.flyTo([xx,xx],x). // I want this when otherButton Clicked!
})Is there a way to use the map object outside the windowInit function?
Or
Is there any other way to use the flyTo() function without reloading?I am currently developing by React.js.