This App is my B4J Learning Project. Now it works! I started programing similar applications about 10 years ago with B4P. Now B4A and B4J are the tools. B4J is very powerfull, but the use of libraries is hard to understand. Many questions for further improvement are still open.
Program Description
The main function is the display of OpenStreetMaps. I found the Map library and some hints in this thread: https://www.b4x.com/android/forum/threads/osm-open-street-map-for-b4j.35554/
After the first start the program loads via online mode several map tiles and shows the middle of Europe. The program will work much faster when map tiles are already stored on harddisk. Therefore, the progam can be switched into offline mode. The actual version yet does not store map tiles itself - a future feature ...
GPX Files are XML. The program demonstrates the parsing of GPX by use of jXmlSax. GPX files may contain a lot of informations, but only tracks are parsed. Routes or waypoints are very similar to parse. The track speed is calculated by the coordinate and time data (when available). The result is stored in a table view and displayed in a xy-chart. With a Mouse-Click into the xy-charth or a table row the selected track point is marked in the centered map.
The setup and last map view are stored in a Json file.
Open a new project "GPX-Viewer", store "GPX-Viewer.b4j" in the project path, store "Layout1.fxml" and "Demo.gpx" into the sub path "Files". Enjoy it! Please, publish your improvements also to the communtity.
17. Febr. 2015: Replacement of the B4J source file, it includes several performance improvements.
Program Description
The main function is the display of OpenStreetMaps. I found the Map library and some hints in this thread: https://www.b4x.com/android/forum/threads/osm-open-street-map-for-b4j.35554/
After the first start the program loads via online mode several map tiles and shows the middle of Europe. The program will work much faster when map tiles are already stored on harddisk. Therefore, the progam can be switched into offline mode. The actual version yet does not store map tiles itself - a future feature ...
GPX Files are XML. The program demonstrates the parsing of GPX by use of jXmlSax. GPX files may contain a lot of informations, but only tracks are parsed. Routes or waypoints are very similar to parse. The track speed is calculated by the coordinate and time data (when available). The result is stored in a table view and displayed in a xy-chart. With a Mouse-Click into the xy-charth or a table row the selected track point is marked in the centered map.
The setup and last map view are stored in a Json file.
Open a new project "GPX-Viewer", store "GPX-Viewer.b4j" in the project path, store "Layout1.fxml" and "Demo.gpx" into the sub path "Files". Enjoy it! Please, publish your improvements also to the communtity.
17. Febr. 2015: Replacement of the B4J source file, it includes several performance improvements.
Attachments
Last edited: