Navigation

    Windy Community

    • Register
    • Login
    • Search
    • Unread
    • Categories
    • Groups
    • Go to windy.com

    Is any way to control "map object" outside WindyInit function? Plz Help Me

    Developers
    1
    2
    49
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      sngy_chan last edited by

      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.

      S 1 Reply Last reply Reply Quote 0
      • S
        sngy_chan @sngy_chan last edited by

        @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.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Windyty, S.E. - all rights reserved. Powered by excellent NodeBB
        NodeBB & contributors, OSM & contributors, HERE maps
        Terms and Conditions     Privacy Policy