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

Add ICAO registration country flags #101

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

don-willingham
Copy link

Display the country's flag next to the ICAO registration two character code.

@hhrhhr
Copy link

hhrhhr commented Apr 1, 2016

"Files changed 254"... you have never heard about the CSS image sprites or Base64 sprites?

@don-willingham
Copy link
Author

I'm a CSS noob, so I honestly haven't heard of those. Thanks for pointing them out. I grabbed the set of flags as individual icons. The author/maintainer of FlagFox said he even tweaks the colors occasionally. It was straightforward to have the http server handle the flag URLs, if it was a single image file, that could be streamlined. If the flags are embedded in the html file, then I can revert the changes to handle the flag URLs. In one case, I would have to compose an image of all the flags, and reference the location of each, which may not be as straight forward as one might think, because some icons are taller or wider than others. Either way, I would want to maintain the flags as individual icons, and automate the composition of the image with all the flags and the offsets, or the Base64 encoding. I think I would lean towards using the Base64 method.

@don-willingham
Copy link
Author

@hhrhhr don-willingham@fdd4055 implements base64 encoded images. The individual flag icons can now be removed.

@hhrhhr
Copy link

hhrhhr commented Apr 4, 2016

If you are interested in my opinion, the "database" with the flags looked best in a separate file, which would be generated during "make all".

but to be honest, I am personally against the transformation of the pure decoder in another all-in-one utility. this is not unix-way ;)

@don-willingham
Copy link
Author

It would be a bit cleaner to move the flags to another (generated) file. Instead of generating the flags content, and copy/pasting it in. Before dump1090 gets much bigger, it would be nice to have it broken down into components. I'm not planning on refactoring into these components. I like the unix-way, but there are other valid metaphors, such as a plugin architecture, or maybe moving the core of dump1090 into a library that several applications can use.

Update to serve flags.js file via http.
Include flags/ subdirectory (again).
(iVBORw0KGgoAAAANSUhEUgAAA) factored out of each case statement.
@don-willingham
Copy link
Author

There is now a single flags.js that contains all of the flags base64 encoded. Since all of the base64 encoded values started with a common prefix, the script that generates flags.js figures out that prefix, and factors it out.

chevdor pushed a commit to chevdor/dump1090 that referenced this pull request May 1, 2016
Remove references to --aggressive from the maint scripts
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

Successfully merging this pull request may close these issues.

3 participants