Windytv/y API detailed zoom levels and terrain elevation



  • Dear Windytv / Windyty authors!

    Thank you so much for your fantastic work on this wonderful service!!! I had been looking for something like this for a while, and I'm so glad you have done it, and done an amazing job making the interface very clear, useful, and easy to use -- great work!!!!!

    We're specifically now using Windytv in the monitoring and control software for the small high-altitude balloons that we fly as part of the ALTAIR project: http://projectaltair.org . The monitoring and control interface is called AIFCOMSS (ALTAIR Integrated Flight Control Operation, Monitoring, and Simulation Software), and a screenshot of AIFCOMSS at present can be seen here:

    0_1484951338909_Screen Shot 2017-01-20 at 1.57.39 PM.png

    The Windytv window is (of course) in the upper left. We use the Windytv API Leaflet interface to pan the centre of that Windytv map to the lat and long of the balloon (which we receive by radio communication) every 5 seconds, and update the marker and the balloon altitude on the marker text label. (And we're continuing to work on this monitoring and control interface to add flight path predictions, etc.) So ... my questions are!:

    1. I'd very much like to be able to zoom in to the detailed zoom levels that are available at https://www.windytv.com, but don't yet appear to be accessible via the API -- I'd like to see a real street-level map, but am not able to zoom in any more than the zoom level shown above. Is there any way at present to obtain or access the Windytv detailed zoom levels via the API? And if not, might that access be added?

    2. As (I hope!) a simple question, I'd like to just move the two zoom control buttons to the top left, rather than the top right as they are by default, using the API, just so that they don't interfere with the very top of the wind levels display, as you can see in the screenshot above. I have tried L.control.zoom.remove(); and map.zoomControl.remove(); within the Leaflet API (and trying to replace that zoom control with one at the top left), but neither seem to work -- the zoom control just stays where it is -- it appears like there must be a separate Windyty zoom control. How could I access that, and move it to the top left?

    3. I'd like to be able to obtain the terrain elevation at a given lat and long, and write that terrain elevation on the marker label as you can see on the screenshot above (instead of having "xx"). Would the best way to do that be to install a separate terrain elevation library (such as https://pypi.python.org/pypi/elevationapi/1.0.3) on my local computer, and access and use that separate library to obtain terrain elevation? Or would there be another Windyty-favoured terrain elevation service that I should use?

    4. https://www.windytv.com has many other cool features that I'd like to be able to use within the monitoring program above, but that don't appear yet to be available or useable via the API -- the detailed zoom levels are the one I'd definitely most like to have, but it would also be very nice to have the local spot forecast tool, the distance measurement tool, etc, etc! Might there possibly be plans to make those available via the API as well?

    Thank you all so much again for this wonderful service and fantastic tool!!!

    Thanks very much again!
    Justin


    --
    Justin Albert https://particle.phys.uvic.ca/~jalbert
    Dept. of Physics & Astronomy office: +1 (250) 721-7742
    213 Elliott Bldg., 3800 Finnerty Rd. fax: +1 (250) 721-7715
    University of Victoria cell: +1 (250) 661-7066
    Victoria, BC, V8P 5C2 Canada e-mail: jalbert@uvic.ca


  • Global Moderator

    Justin, thank you for your message, happy to see Windytv to be used in professional tools. Hope this will motivate people to create professional products with our API.

    1. The basic topographic map which is diplayed on Windytv is Mapy.cz. The Imagery is from Here.com. The multiple maps can be added but not directly through our API. See the sample code from Stockoverflow discussion below:
    center: new L.LatLng(45.50144, -122.67599),
    zoom: 4,
    minZoom: 0,
    maxZoom: 18,
    layers: [
        L.tileLayer('http://{s}.tile.cloudmade.com/{key}/997/256/{z}/{x}/{y}.png', {
        maxZoom: 13,
        minZoom: 0,
        attribution: 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade',
        key: 'BC9A493B41014CAABB98F0471D759707'
    }),
        L.tileLayer('http://server.arcgisonline.com/ArcGIS/' + 'rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', {
        minZoom: 14,
        maxZoom: 18,
        attribution: 'Tiles © Esri — ' 
            + 'Source: , ' 
         })
    ]});
    
    1. The control you can be modified in Leaflet library, here is the link for Leaflet documentation http://leafletjs.com/reference-1.0.2.html#control

    2. I have no experience with this library, this is upto your decision.

    3. We plan to add new features to API, but there is no schedule for it.

    Hope this helped you a bit.
    Tomas



  • Hi Justin.
    As you are from UVIC, are you aware that you are UVIC is one of the GIS Centres of Excellence. With that, you get access to Esri's ArcGIS Platform which can get what you want. ArcGIS + WindyTV api is actually what I am working on. I'm trying to get the API into ArcGIS maps. Looks a little like this: http://esri.github.io/wind-js/.

    You can always contact me here:
    Nathan Enge
    Esri Canada
    nenge@esri.ca


  • Pilot

    @jalbert

    Hey justin, I too am attempting to remove/manipulate the zoomControl. I've tried every combination of L.control, map.zoomControl, .remove(), .removeFrom(map), I could possibly come up with based on the leaflet documentation and no dice, if I come up with a solution I'll post it here. I've spent hours and hours on this and just when I think I'm close I come up empty. I'll keep working

    -vapor



  • @vapor

    My colleague Layth Holubeshen solved the issue of moving of the zoomControl by adding the following two brief functions after the main function:

        $('.leaflet-control-zoom').ready( function() {
                setTimeout(removeZoomPosition, 4000);
        });
        function removeZoomPosition() {
                $('.leaflet-top.leaflet-right').html('');
        }
    

    and adding:

       new L.Control.Zoom({ position: 'topleft' }).addTo(map);
    

    to the main function.

    Hope that helps,
    Justin


  • Pilot

    @jalbert
    wow, thanks, looks like it works for me as well. Pretty strange how it requires a significant time delay before it can be removed, even after it's loaded. Looks like 400ms is the lowest i can set before it won't consistently remove.

    for other users attempting this as well should be noted you need to incorporate jQuery to your project for this to work.

    thanks again
    vapor


Log in to reply
 

Windyty, S.E. - all rights reserved. Powered by excellent NodeBB
NodeBB & contributors, OSM & contributors, HERE maps

Looks like your connection to Windy Community was lost, please wait while we try to reconnect.