android-taranis-smartport-telemetry
android-taranis-smartport-telemetry copied to clipboard
Proposal - refering to: [Feature request] Add waypoints and an option to save missions #73
I have the same request and did some thinking about a possible, flexibel and easy to programm solution.
Proposal:
- do design points, lines, polygons (shaded, and transparent) in Google Earth
- export objects in KML-File.
- this file is readable an can be edited to define correct coordinates
- there is a function in the Maps SDK "val layer = KmlLayer(map, R.raw.geojson_file, context)" which can import a KML-File and display it on top of the map.
A friend of mine did a test-version for me (quick and dirty) on release 1.8.5 Advantage: It is total flexible nearly everything can be displayed as long as you can define it in the KML-File
In this "quick and dirty" solution Telemetry Viewer is looking for a certain file (triangle.kml) If it doesn't exist it creates a folder GPS-Racing (and goes on with normal behavior). In this folder I put all my KML files and do rename the one I want to be displayed to "triangle.kml". All following starts of the App - it will find the KML-file and display on top of the Google map.
I'm testing at the moment. It would be nice if I could select the file to be displayed in the settings of Telemetry Viewer but otherwise it does the job.
I attached some files:
- KML-file (had to rename extension to .txt instead of .kml)
- Code ( shows changed function OnMapReady() in file GoogleMapWrapper.kl)
- photo (shows GPS-Wayracing triangle and route (here display with logfile)
While testing I found one flaw in my "quick and dirty" solution.
If the settings of the smartphone is "auto-rotating = on" and the smartphone is switching from portrait to landscape then KMLlayer is called a second time. This will close the App.
So I will have to make sure that the function is called only once. In the meantime I do switch "auto-rotate off" Otherwise it seems to work.