Navigation

    Windy Community

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

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

    Developers
    2
    3
    81
    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

      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
      • nesro
        nesro Administrator 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.

        windy.com developer

        1 Reply Last reply Reply Quote 1
        • S
          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
          Windyty, S.E. - all rights reserved. Powered by excellent NodeBB
          NodeBB & contributors, OSM & contributors, HERE maps
          Terms and Conditions     Privacy Policy