Skip to content

Conversation

@bismurphy
Copy link

@bismurphy bismurphy commented Jul 3, 2024

This accomplishes the topic discussed in #326 . Now, rather than pulling in a choice of a PNG based on a color (such as parachute-red.png, parachute-blue.png, or parachute-green.png, etc), I've created a set of SVG files which are dynamically recolored at runtime in order to populate the map.

The primary goal for this is to make it easy to add new colors of objects to the map, as well as to change the design of any of the icons easily without needing to modify lots of files at once.

All of these SVGs were created by hand in a text editor. As such, they are very human-readable and very easy to modify (as opposed to if they were created in Inkscape or similar, where all the coordinates would be ugly float values).

The goal in creating the SVGs was to replicate the general look and feel of the existing icons, but not to be a pixel-perfect duplication. There is nothing to say that the existing icons were perfect, and therefore matching their exact proportions was not considered a crucial goal. Given that these are, again, easily modifiable SVG files, anyone who wishes to tweak the look of these icons should be able to do so. I'm also happy to make any tweaks if anyone puts comments on this PR.

@bismurphy bismurphy changed the title Svg recoloring Use dynamic recoloring for balloons, targets, cars, payloads, parachutes Jul 3, 2024
@bismurphy
Copy link
Author

Okay, this has been rebased now that the deterministic color selection is in place. I have also tweaked the aesthetics of some of the elements to look more like the current version of the site.

At this point, if we want to try this in Testing, I think it's about ready. The only remaining changes would be tiny tweaks, which are likely not needed, I think all the SVG files are in good shape to suit their purpose.


marker.shadow = marker_shadow;
marker.balloonColor = (vcallsign == "PIE") ? "rpi" : balloon_colors_name[color_index];
marker.balloonColor = (vcallsign == "PIE") ? "rpi" : balloon_colors[color_index];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised we still have these special case callsigns in here :/ they don't make sense for sondehub pro

@TheSkorm TheSkorm merged commit 78e810c into projecthorus:testing Jul 17, 2024
@bismurphy bismurphy deleted the svg_recoloring branch July 17, 2024 20:06
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.

2 participants