Closed ghost closed 9 years ago
Concept looks good. I'll comment on a few of the commits.
I'll need a license statement for the images, can you put a README in the flags dir with notes on where they are from and any license attribution required?
Thanks for the helpful comments. I'll try to make the changes. Some appear a bit over my head but I'll give it a try.
I've looked at the license for the flags. They are "Free Country Flags by Gang of the Coconuts is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License." So I guess I can put that info in the README file whic I think should satisfy the licensing requirements.
I'd also like to add a catch-all in case there's a hex code for which there is no flag.
Thanks again for your time and support.
Dino
Hello, I've been working on this.
Static file for the ICAO codes all stored in object array with hex addresses. Search for country adds the country and flag image html to the plane object (if I understand what I did!) I no longer need to search for it again in the selected section and I'm able to pull the country text but not the flag. Any suggestions?
Please have a look and let me know if I'm the right track. Not sure how to show the flag in the selected section. Some of the img parameters such as alignmet need to be as well.
Thanks,
Yep this is taking shape.
Re setting image parameters etc: the basic idea is to put a template of what you need in the HTML file and then modify only those things that change between aircraft from the javascript. Basically, don't use appendChild anywhere; you should be just modifying an existing DOM node, like you do for example to set the country name. If you need particular style/element settings that are the same for all flags, those can go in the CSS or the HTML.
Rather than storing the whole image DOM element on the plane object, just store the image path. Or you could even just store the whole entry you looked up from the code table:
plane.icao_info = ICAO_Codes[i]
// .. later, use selected.icao_info.country etc
ok, I hope it looks better now... my brain hurts! I added an extra column to clean up the look. Not sure if that works with your vision for the interface. I also added the subfolder path definition in the config file in case in needs to get moved/renamed/ etc. I can't seem to figure out how to get the flag to appear in the selected section, however. My knowledge is limited and I'm running out of patience.
Hopefully this latest rendition works for you.
I am away for the next week, I'll see what I can do with this when I get back
ok thanks... I'll keep trying too.
I think we should be good to go now. (Hopefully). Please have a look when you have a chance. Thanks!
I did a bunch of cleanups here: https://github.com/mutability/dump1090/tree/Dynomity-flags
summary (from memory):
If this looks good to you then I'll merge that.
Wow... that's a lot of re-work! It's looks great. Your code is very easy to follow.
Thanks for all your time and support. It's much appreciated. I'm learning so much from this project. It's been very educational.
Please feel free to merge it at your convenience.
Cheers!
Requires addition of flag images as .png files stored in ~/flags-tiny. I think I got them from http://www.iconarchive.com/category/flag-icons.html
This is my first attempt with github and programming in a public forum. Please bear with me!