Jump to content

KAOS

Members
  • Posts

    1,445
  • Joined

  • Last visited

Everything posted by KAOS

  1. Here is the Alerts Radar with popups....
  2. Picked up quite a bit of rain last night. That said, I feel like a lot of it just ran off since the dirt is/was like concrete.
  3. Still need to tweak the external radar site. Duration and opacity of radar loop, etc. Moving on to the Alerts Radar for now.
  4. External Radar Button (Regional Radar Slide)...
  5. Geo coordinates have been the most challenging part of all of this... Retrieving and ensuring they are reliably "passed" to other "pages", etc. While simultaneously using multiple API's to achieve some of that functionality.
  6. The proverbial carrot dangling regarding rain chances is getting very tiresome. Along with the almost daily ridiculous dews, humidity, temps, etc. Make it end. Please. Thanks in advance.
  7. I am going to add a clickable button to the radar slides which will transport the user to dedicated interactive radar pages. On the Regional Radar slide there will be a button that takes you to an animated geo based radar. Since the map is interactive you will be free to explore the entire map from that point. On the Local Radar slide (only shown when there are alerts) there will be a button that takes you to an animated geo based radar that displays alerts/warnings which are clickable. When you click the alert area on the map, it will display a text popup with a current full description of the alert for that area. Radar imagery will also be provided. As with the Regional Radar button, initial centering of the map will correlate with the location that is currently being used by the emulator but will also allow you to explore from that point. Pretty fancy... eh? This feature will be first seen in the https://k-a-0-s.github.io/mobile.html link which I am currently working on.
  8. Update... https://k-a-0-s.github.io/mobile.html Mobile with static maps and geo-location. This should run smoothly on nearly anything. If not... I can't help you. Upgrade your hardware? I will mostly be working on this and the desktop version from this point forward. And possibly more on animated radar mobile version but I need to clean things up. Too many versions, etc. Thanks to those who commented on radar comparison.
  9. Mobile with new geo locating radar. https://k-a-0-s.github.io/mobile.html
  10. Thanks. Here is link to radar only... https://k-a-0-s.github.io/twcradar.html
  11. Current Obs: Heavy Mosquitos. WTF... this place has been like a desert. Serious ques... Do mosquitos live in the desert?
  12. I got a lot of rain. I did not measure. My stuff has been in somewhat disarray since the A/C died so I have no totals. I would estimate 1.5+ inches. That said, much was "wasted" due to run off.... and ground that resembled concrete.
  13. Which do you prefer? Left or Right?
  14. You know... I could just keep all of this for myself. But I choose to share, because if someone else was doing it... it would be nice if they shared. Please let me know if I am over-sharing.
  15. The level of zoom is pretty damn good... I will provide a link once it is a little more sorted and uploaded.
  16. It is also interactive. But I will strip away some of that for use inside the emulator.
  17. Fortunately, I spared the computer. Partially due to the fact that I just fixed my A/C.... which also benefits the computer when the ambient air temp is in excess of 100F!!! Managed to get this working with geo.
  18. So much for "Best of Times"
  19. Development has ended... I am going to smash the f*ck out of this computer.
  20. I must make all of this work as well... <!DOCTYPE html> <html><head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <meta charset="utf-8"> <title>Mapbox GL Animation - Xweather Raster Maps</title> <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no"> <link href="https://api.mapbox.com/mapbox-gl-js/v3.5.1/mapbox-gl.css" rel="stylesheet"> <script src="https://api.mapbox.com/mapbox-gl-js/v3.5.1/mapbox-gl.js"></script> <style> html, body { height: 100%; margin: 0; padding: 0; } #map { width: 100%; height: 100%; } </style> </head> <body> <!-- Load the `mapbox-gl-geocoder` plugin. --> <script src="mapbox-gl-geocoder.min.js"></script> <link rel="stylesheet" href="https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v5.0.0/mapbox-gl-geocoder.css" type="text/css"> <div id="map" class="mapboxgl-map"><div class="mapboxgl-canary" style="visibility: hidden;"></div><div class="mapboxgl-canvas-container mapboxgl-interactive mapboxgl-touch-drag-pan mapboxgl-touch-zoom-rotate"><canvas class="mapboxgl-canvas" tabindex="0" aria-label="Map" style="width: 796px; height: 400px;" width="796" height="400"></canvas></div><div class="mapboxgl-control-container"><div class="mapboxgl-ctrl-top-left"></div><div class="mapboxgl-ctrl-top-right"></div><div class="mapboxgl-ctrl-bottom-left"><div class="mapboxgl-ctrl" style="display: block;"><a class="mapboxgl-ctrl-logo" target="_blank" rel="noopener nofollow" href="https://www.mapbox.com/" aria-label="Mapbox logo"></a></div></div><div class="mapboxgl-ctrl-bottom-right"><div class="mapboxgl-ctrl mapboxgl-ctrl-attrib"><div class="mapboxgl-ctrl-attrib-inner"><a href="https://www.aerisweather.com/">Xweather</a> | <a href="https://www.mapbox.com/about/maps/" target="_blank" title="Mapbox" aria-label="Mapbox">© Mapbox</a> <a href="https://www.openstreetmap.org/about/" target="_blank" title="OpenStreetMap" aria-label="OpenStreetMap">© OpenStreetMap</a> <a class="mapbox-improve-map" href="https://apps.mapbox.com/feedback/?owner=mapbox&amp;id=streets-v11&amp;access_token=pk.eyJ1IjoiYm1234xhcmsiLCJBLAHhIjoiY2plaGZmaGR1MBLAHGZ3cTJ3bzZ116OHp5OGZzYyJ9.5dVrsBLAH89451WJk208YPShD-0HLsQ" target="_blank" title="Improve this map" aria-label="Improve this map" rel="noopener nofollow">Improve this map</a></div></div></div></div></div> <script> const frameCount = 10; // total intervals const startMinutes = -60; // start time offset relative to now, where negative means past const endMinutes = 0; const MAPBOX_TOKEN = 'pk.eyJ1IjoiYmxhcmsiLC17280JhIjoiY2plaGZmaGR1MGZ3cTJ3bzZ6O82615Hp5OGZzYyJ9.5dV11rsWJk208YPShD-10HLsQ'; const AERIS_ID = 'wgE96YE3sc1TQLKjnqiMsv'; const AERIS_KEY = 'SVG2gQFV8y19DjKR0BRY9w1PoSLvrMrIq19Lq2IYaY'; const NUM_COLORS = '256'; // set to empty string for true color png const TILE_SIZE = 256; // layer to include on the map // uncomment more layers or add more! const layers = [ 'alerts:50', // 'satellite', 'radar:70:blur(0)', //'stormcells' ]; function getTilePath(server, interval) { return `https://maps${server}.aerisapi.com/${AERIS_ID}_${AERIS_KEY}/${layers.join(',')}/{z}/{x}/{y}/${interval}min.png${NUM_COLORS}`; } window.addEventListener('load', () => { mapboxgl.accessToken = MAPBOX_TOKEN; const map = new mapboxgl.Map({ container: 'map', style: 'mapbox://styles/mapbox/streets-v11', center: [-95, 40], zoom: 4 }); // Add the control to the map. map.addControl( new MapboxGeocoder({ accessToken: mapboxgl.accessToken, mapboxgl: mapboxgl }) ); function addRasterLayer(map, interval, opacity = 0) { const id = `amp-${layers.join('::')}-${interval}`; map.addSource(id, { type: 'raster', tiles: [1, 2, 3, 4].map((s) => getTilePath(s, interval)), tileSize: TILE_SIZE, attribution: '<a href="https://www.aerisweather.com/">Xweather</a>' }); map.addLayer({ id, type: 'raster', source: id, minzoom: 0, maxzoom: 22, paint: { 'raster-opacity': opacity, 'raster-opacity-transition': { duration: 0, delay: 0 } } }); return id; } function setRasterLayerOpacity(map, id, opacity) { map.setPaintProperty(id, 'raster-opacity', opacity); } map.on('load', () => { const interval = (endMinutes - startMinutes) / frameCount; // set up the animation frames and layers const frames = []; for (let i = 0; i < frameCount; i += 1) { const opacity = (i === 0) ? 1 : 0; const timeOffset = startMinutes + interval * i; const id = addRasterLayer(map, timeOffset, opacity); frames.push(id); } // wait time determines how long to wait and allow frames to load before // beginning animation playback const waitTime = 5000; // step time determines the time in milliseconds each frame holds before advancing const stepTime = 1000; let currentOffset = 0; let previousOffset = currentOffset; setTimeout(() => { setInterval(() => { previousOffset = currentOffset; currentOffset += 1; if (currentOffset === frames.length - 1) { currentOffset = 0; } setRasterLayerOpacity(map, frames[previousOffset], 0); setRasterLayerOpacity(map, frames[currentOffset], 1); }, stepTime); }, waitTime); }); }); </script> <script src="mapbox-animation_data/mapbox-gl.js" async="" defer="defer"></script> <link href="mapbox-animation_data/mapbox-gl.css" rel="stylesheet"> </body></html>
×
×
  • Create New...