User input field for custom calculations on the map
-
Hi everyone,
I’m currently working on a plugin for Windy (Cloud Horizon Distance) and I would like to ask if there’s a way to let the user input a custom value that can then be used for drawing on the map.
In practice, I’d need something like a small input field (or slider) where the user can set an angle in degrees. This value would then be passed to my calculation function, which returns a distance to draw as circles on the map.
Does the Windy API currently support this kind of interactive input (e.g. text box, numeric field, slider)? Or is there any workaround that you would suggest to achieve a similar result?
Thanks a lot for your help,
Francesco
-
@francescogola You can use any input elements. If it is a
texttype element, you will have to addev.stopPropagation()on thekeydownevent for your input element. Windy uses +, -, f, left and right Arrows as hotkeys, with the listener on body.