Windy Community

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

    Adding marker to web page

    General Discussion
    1
    3
    1312
    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.
    • R
      rmahoney last edited by

      I'm not using the embed code but I'd like to use the functionality of the "marker". How do I add that using JS?

      In my function windytymain I have this:

      W.overlays.gust.setMetric( 'mph' );

      What code do I use to get the marker?

      Thanks,

      Bob

      1 Reply Last reply Reply Quote 0
      • R
        rmahoney last edited by

        Also it would be great to change the font size.

        1 Reply Last reply Reply Quote 0
        • R
          rmahoney last edited by

          Well, looking through the leaflet documentation it appears I need to use something like this:

          L.marker([51.5, -0.09], {icon: greenIcon}).addTo(map).bindPopup("I am a green leaf.");

          Now the questions are, how can I get the wind speed and direction?

          I tried something like this to get the mph but it failed:

          mph=W.overlays.gust.getMetric('mph');

          I'd love to get a little help here.

          Bob

          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