Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON support #12

Open
sergej-singer opened this issue Mar 1, 2025 · 0 comments
Open

JSON support #12

sergej-singer opened this issue Mar 1, 2025 · 0 comments

Comments

@sergej-singer
Copy link

Sometimes it's needed to load lists of data into the maps across profiles, e.g. VFR waypoints across Radar and Tower profiles. Support of JSON files would bring a lot of flexibility. Here's an example:

{ "VFR": {
    "EDDF": [
        {"name": "L", "text_align": "LB"},
        {"name": "N", "text_align": "LB"},
        {"name": "S", "text_align": "LB"},
        {"name": "R1", "text_align": "LB"}
    ],
    "EDFE": [
        {"name": "Y", "text_align": "LB"},
        {"name": "D", "text_align": "LB"},
        {"name": "E", "text_align": "LB"},
        {"name": "T", "text_align": "LB"},
        {"name": "K", "text_align": "LB"}
    ],
    "EDDL": [
        {"name": "N", "text_align": "LB"},
        {"name": "S", "text_align": "LB"},
        {"name": "E", "text_align": "LB"}
    ],
    "EDDK": [
        {"name": "K1", "text_align": "LB"},
        {"name": "K2", "text_align": "LB"},
        {"name": "S1", "text_align": "LB"},
        {"name": "S2", "text_align": "LB"},
        {"name": "E1", "text_align": "LB"},
        {"name": "E2", "text_align": "LB"},
        {"name": "N1", "text_align": "LB"},
        {"name": "N2", "text_align": "LB"}
    ]
}
}
MAP:VFR Points
FOLDER:ALL
COLOR:standard
ACTIVE:1
{%- for icao, fxnames in data.reporting_points['VFR'].items() %}
// {{icao}}
{%- for fx in fxnames %}
SYMBOL:VFR:{{icao | replace('ED', '')}}-{{fx['name']}}
{%- endfor %}
{%- endfor %}
@sergej-singer sergej-singer changed the title Add support of JSON JSON support Mar 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant