Hi Everybody,
I'm currently working on a custom input composable for an app. The goal is to display a map of Switzerland and it's cantons ("same thing as states in the US"). I then want to be able to recognize the user tapping on one of the cantons.
My current approach is to convert an SVG of Switzerland with the Cantons as paths to a list of points with coordinates (using
https://spotify.github.io/coordinator/). I then draw these coordinates to a canvas using drawPath().
I'm currently not sure if this is the most effective approach, therefore I'd like to ask for your feedback.
Also I'm not sure how I will be able to recognize the touch of a canton with my approach. I was planning on drawing each canton as it's own path, but I don't think compose provides an event listener for the tap on a path (or am I wrong?). So I think I would need to get the coordinates of a tap and then match them to the correct canton.