Read the statement by Michael Teeuw here.
MMM-RAIN-MAP (new: version 2.x)
-
-
Displays Rainviewer.com radar layers on OpenStreetMap
Every 10 minutes a new weather snapshot is published
The snapshots of the last 2 hours are available, which show the weather events of the past
Additionally 3 layers are displayed as forecast of the next 30 minutes
Option to place multiple markers on map
Option for multiple, alternating map positions
Option to only show in current rainy weather conditions. Works only together with weather or MMM-OpenWeatherForecast as dependency.
Option to hide other modules in case of rain in favor to get more space. -
Thanks @Jalibu for a fantastic module!
Last year I modified the v1 code to change the color of the radar images to RainViewer color 4. My wife associates blue with snow, not rain, hence the preference for the Weather Channel scheme.
I accomplished this by modifying 2 instances of the URL in utils.js, consistent with the API documentation. Where I found “/256/{z}/{x}/{y}/2/1_1.png” in the code, I simply changed it to “/256/{z}/{x}/{y}/4/1_1.png”, with the 4 being the preferred radar color.
I’m unable to do the same in version 2.x. I found the URL in Client.ts, but modifying it had no effect on the output.
I’m happy to file an enhancement request if that’s the best route. I’m skilled enough to do find and replace in code, but I’m not a JS dev!
Thanks!
-
Hi @gabrielm9 ,
contribution is always welcome :-)You have to compile the Typescript sources using
npm run build
.Let me know, if you have problems. I‘m waiting for your PR
-
Hi @gabrielm9,
the latest version 2.5.x supports different color schemes now.
-
Outstanding work fellas
-
Hi @jalibu,
Thanks very much! I was about to spend time figuring it out how to variabalize the code but I’ve learned from what you did. I would have taken me a week to figure it out :slightly_smiling_face:. The wife thanks you as well.
-
osmMapUrl: "https://cartodb-basemaps-{s}.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png"
I’m using the dark map referenced above on a black background but every time the module changes zoom level it fills with a white background until the new map tiles populate. It’s worst when zooming out,
Does anyone know if it there is a parameter I can change so the blank tiles between zoom levels stay black?This is a minor annoyance with an otherwise great module.
Thank you! -
@fmarcu said in MMM-RAIN-MAP (new: version 2.x):
Does anyone know if it there is a parameter I can change so the blank tiles between zoom levels stay black?
try to add this to your custom.css
.MMM-RAIN-MAP .leaflet-container { background: #000; }
-
@jalibu said in MMM-RAIN-MAP (new: version 2.x):
try to add this to your custom.css
.MMM-RAIN-MAP .leaflet-container { background: #000; }
That worked! Thank you!