#:import random random.random #:import RiseInTransition kivy.uix.screenmanager.RiseInTransition #:import facade plyer.compass #:import rgba kivy.utils.get_color_from_hex : background_color: 1, 1, 1, 1 canvas.before: Color: rgba: root.background_color Rectangle: size: self.size pos: self.pos : background_color: 0, 0, 0, 0 background_color: rgba("#c0464b") : MapScreen: CompassScreen: : FloatLayout: MapView: id: mapview zoom: 16 on_map_relocated: centermark.lat = mapview.lat centermark.lon = mapview.lon selfmark.lat = app.gps_data.get('lat', 0) selfmark.lon = app.gps_data.get('lon', 0) MapMarker: source: 'assets/marker_self.png' id: selfmark anchor_x: 0.5 anchor_y: 0 MapMarker: source: 'assets/marker_dest.png' id: centermark anchor_x: 0.5 anchor_y: 0 TextInput: pos_hint: {"x":0.05, "top":0.97} size_hint: 0.9, None height: "32sp" font_size: '20sp' hint_text: 'buscar destino' multiline: False IconButton: pos_hint: {"x":.8, "top":0.95} size_hint: 0.2, 0.2 source: 'assets/dark_to_compass_icon.png' on_press: root.manager.current = 'compass'; app.set_destination() IconButton: source: 'assets/to_self.png' pos_hint: {"x":0.4, "bottom":0.1} size_hint: 0.2, 0.2 on_press: app.center_map_on_gps() IconButton: pos_hint: {"x":0.8, "bottom":0.1} size_hint: 0.2, 0.2 source: 'assets/to_settings.png' on_press: root.manager.current = 'settings'; : facade: facade orientation: 'vertical' padding: '20dp' spacing: '10dp' FloatLayout: canvas: Color: rgba: rgba("#336645") Rectangle: size: self.size Image: source: 'assets/needle.png' pos_hint: {"center_x": 0.5, "center_y": 0.7} canvas.before: PushMatrix Rotate: angle: app.needle_angle axis: 0, 0, 1 origin: self.center canvas.after: PopMatrix Image: id: to_dest source: 'assets/needle_to_dest.png' pos_hint: {"center_x": 0.5, "center_y": 0.7} canvas.before: PushMatrix Rotate: angle: app.fbearing axis: 0, 0, 1 origin: self.center canvas.after: PopMatrix Image: source: 'assets/pivot.png' pos_hint: {"center_x": 0.5, "center_y": 0.7} size_hint: 1, 1 IconButton: source: 'assets/to_map.png' pos_hint: {"center_x": 0.1, "center_y": 0.95} size_hint: 0.2, 0.2 on_press: root.manager.current = 'map'; BackgroundLabel: text: app.dest_distance background_color: rgba("#c0464b") color: rgba("#f3e8d2") size_hint: 1, 0.2 pos_hint: {"x": 0, "top": 0.4} font_size: '40sp' BackgroundLabel: text: app.dashboard_flock background_color: rgba("#679958") color: rgba("#f3e8d2") size_hint: 1, 0.2 pos_hint: {"x": 0, "top": 0.2} font_size: '40sp'