I had a go at adapting the Mapbox module to add additional layers (OpenWeatherMap Layers)
May be useful for you to have another example.
The the root of the Mapbox module is here https://github.com/farmOS/farmOS/tree/616261498d87103eba3651254ac25f9f4cfd0f36/modules/core/map/modules/mapbox . The logic to present the satellite image based on whether or not the the API key is set is at the bottom of this file. https://github.com/farmOS/farmOS/blob/616261498d87103eba3651254ac25f9f4cfd0f36/modules/core/map/modules/mapbox/src/EventSubscriber/MapRenderEventSubscriber.php ,
I just copied the entire module and replaced mapbox with openwethermap in every file with no other changes except for the JS which needed a little more.
The new module was then just placed in the normal modules folder and installed like any other module.
1 Like