Windy Community
    • Unread
    • Categories
    • Groups
    • Go to windy.com
    • Register
    • Login

    How can I use leaflet-active-area plugin in WindyMap?

    Scheduled Pinned Locked Moved Developers
    3 Posts 2 Posters 1.1k Views 1 Watching
    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 Offline
      sngy_chan
      last edited by

      I want to use leaflet-active-area plugin in WindyMap.
      How Can i do that?

      Link : https://github.com/Mappy/Leaflet-active-area

      I tried

      // add script
      < script src="L.activearea.js">
      
      // add code
      windyInit(options, (windyAPI: any) => {
           const { map, overlays } = windyAPI
          ....
          map.setActiveArea('activeArea', true, true)
      
      
      }
      
      
      // add css 
      .activeArea {
          position: absolute;
          top: 50px;
          left: 50px;
          right: 50px;
          height: 200px;
          border: 3px solid red;
          z-index: 1100;
      }
      
      
      

      but it's not work
      스크린샷 2022-04-22 오후 2.55.26.png

      Plz Help Me!

      S 1 Reply Last reply Reply Quote 0
      • nesroN Offline
        nesro Windy Staff
        last edited by nesro

        Hi @sngy_chan

        I think you are just assembling the application in a wrong way. I tried the plugin and it seems to be working good.

        Here is my full code (just without the api key):

        Screenshot 2022-04-22 at 11.52.13.png

        Here is how the result looks like:
        zooming to NYC

        I hope it helps.

        Tomas Nesrovnal - windy.com developer

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

          @sngy_chan I find my mistake! thank you

          1 Reply Last reply Reply Quote 1
          • First post
            Last post
          Windy Community  |  Powered by excellent NodeBB
          Terms of Use     Privacy Policy     Windy.com