Closed bittner closed 8 months ago
Existing native implementations for a Map widget:
Personally, I've tried out the GTK+ osm-gps-map widget with Python, and it works pretty well. Unfortunately though, the project maintainer is not active, not responding on issues or PRs.
Repeating the encouragement for the idea I gave on Gitter - +1 to this as a concept.
The API spread you've described is promising as well. It's unfortunate that the Linux widget doesn't seem to be actively maintained, but it at least proves that a native map is possible. The GPL license is problematic, though; we won't be able to incorporate that into Toga.
The next step will be to start developing the core API for this new widget. What API calls are common across all these implementation? Which of those methods are we going to expose? Is there an abstraction that Python allows that isn't plausible with the "native" APIs?
The GPL license is problematic, though; we won't be able to incorporate that into Toga.
Does that mean we can't make Toga depend on it at all or would it be acceptable to require the developer to install osm-gps-maps separately (manually)?
I'll try to come up with some potential sample code for the envisioned widget to allow me conclusions about its API. :+1: Hang on (unless you have a better idea).
We would not be able to make Toga depend on a GPL library at all. LGPL would be fine; but the viral properties of the GPL make it a non starter for inclusion as a dependency in Toga. There is no technicality here that we can work around - this would be the GPL working exactly as intended.
Toga's decision to choose licensing that allows for closed source development was deliberate, and we need to choose the licenses of our dependencies to match.
We would not be able to make Toga depend on a GPL library at all.
My apologies to nitpick here. The project would actually actually certainly be able to link against GPL-licensed libraries. I assume you might not want to go in that direction, though, as the resultig binaries would be under the more restrictive GPL- license and I understand that you chose MIT-licensing for a reason.
FWIW, nzjrs/osm-gps-map#66 lists https://github.com/supercamel/mapness as an LGPL-licensed alternative to osm-gps-map.
@leggewie Yes, we are technically able to link to a GPL library. However, that technicality is meaningless in practice, unless we're willing to require all users of Toga to GPL their apps - which I'm not.
An LGPL alternative is more practical; however, is that something that is readily available to install on host systems? One of the guiding principles of Toga is "pip install and nothing else" - the idea that you shouldn't need to navigate obscure build systems to get an app running. mapness
uses a programming language I'm not familiar with, and a build system I'm not familiar with; I'm not sure what the process for actually getting this widget in the hands of an end-user would look like.
I'm also mildly worried about the provenance of mapness itself - yes, it's formally released as LGPL, but the author clearly references past contributions to osm-gps-map. This means there would be a line of argument that it could be fruit of a poisonous tree. If there is any architectural similarity between osm-gps-map and mapness (which seems likely), the authors of osm-gps-map would have a legitimate claim that mapness is a derivative work, and thus also covered by the GPL.
Expected Behavior
I want to write a maps application that runs cross-platform, on GNU/Linux, Androids and iOS devices. This ticket is to discuss a potential implementation.
I'd prefer to avoid to use a WebView widget (and do JavaScript-style programming with that). With a native widget I hope to be able to do more pythonic, application-style programming.
(Spoiler alert: It must feel awesome, simple and powerful, to be a trigger even for [my] kids to be sucked into the world of application programming! And personally, I love the idea to do just Python, neither Java nor Objective-C, and still create native applications for those platforms!)
I first presented my motivations on Gitter on July 28, 2019. Following that, I've also watched @danyeaw's PyCon presentation, as suggested by @freakboy3742.
Current Behavior
There's no Maps widget availabe in Toga, currently.
Your Environment
Toga Target (the type of app you are trying to generate)