StationMap

Revision as of 12:04, 25 March 2021 by HansR (talk | contribs) (→‎Images)

Introduction

A special feature in CumulusUtils is the possibility to display the location of the station on a zoomed in map. The map can display the winddirection (updates with realtime.txt) and a windrose for the indication of the North direction.

As the zoom factor can be quite large (try 16 or 17) this map gives an interesting possibility to show live wind influence in harbours or airfields (which is where the inspiration came from, see this post). The Wairoa airport where it started is here.

Inifile parameters

The StationMap has the following inifile parameters:

   [StationMap]
   StationMapMenu=true
   ArrowLatitude=53.2948
   ArrowLongitude=7.0673
   Zoomlevel=13
   CompassRosePosition=bottomright
   CompassRoseType=2
   WindArrowType=1

Inner Working

The map is created with the leaflet library.
The WindRose is created from the image CompassRose-{x} where x is the value of CompassRoseType. If the user adds images with the same naming convention it is possible to add different CompassRoses to the map by changing the CompassRoseType.
The WindArrow is created from the image WindArrow-{x} and can be placed at a position other than the station position which is taken as the default for the arrow position. If the user adds images with the same naming convention it is possible to add different WindArrows to the map by changing WindArrowType.
The images are located in the CUicons directory. If you want other images, just add them with the required index.