I have a content type called districts and i have created the following fields
- district geojson(polygon values)
- harzards (list) - heavy rain, freezing rain, storm
- Alert level (list) - extreme, high, low
I am displaying in a view as a leaflet map. Now i would like to write a custom module that can get the field content of a nodes ie harzards and alert level and then pass them to a javascript file that will print specific colors to the districts in the view depending on the alert_level.
What is the best way to get the field content (harzards and alert_level) in to the custom module and then pass them to the javascript file? Or is there another way of achieving this. Thanks