diff --git a/assets/images/marker_fountain.png b/assets/images/marker_fountain.png new file mode 100644 index 0000000..1306d29 Binary files /dev/null and b/assets/images/marker_fountain.png differ diff --git a/assets/images/marker.png b/assets/images/marker_tree.png similarity index 100% rename from assets/images/marker.png rename to assets/images/marker_tree.png diff --git a/forestmapview.kv b/forestmapview.kv index 83bbb7a..e736cd0 100644 --- a/forestmapview.kv +++ b/forestmapview.kv @@ -5,9 +5,11 @@ : lat: 42.131331 lon: 24.747571 - zoom: 15 + zoom: 5 + snap_to_zoom: False on_zoom: - self.zoom = 5 if self.zoom < 5 else self.zoom + self.zoom = 7 if self.zoom < 7 else self.zoom + self.print_current_zoom(self.zoom) on_lat: self.start_get_fov_trees() on_lon: diff --git a/forestmapview.py b/forestmapview.py index 5d5719a..d2eb1a0 100644 --- a/forestmapview.py +++ b/forestmapview.py @@ -8,6 +8,9 @@ class ForestMapView(MapView): get_trees_timer = None tree_names = [] + def print_current_zoom(self): + print("] Zoom level: " + zoom) + def start_get_fov_trees(self): # After one second get the trees in field of view try: @@ -28,8 +31,7 @@ class ForestMapView(MapView): trees = app.cursor.fetchall() for tree in trees: name = tree[0] - print(tree) - print("Tree detected") + print("] Fountain detected: " + str(tree)) if name in self.tree_names: continue else: @@ -39,7 +41,7 @@ class ForestMapView(MapView): # Create TreeMarker name = tree[0] lat, lon = tree[1], tree[2] - treemarker = TreeMarker(lat=lat, lon=lon, source='assets/images/marker.png') + treemarker = TreeMarker(lat=lat, lon=lon, source='assets/images/marker_tree.png') treemarker.tree_data = treemarker # Add TreeMarker to the map diff --git a/main.py b/main.py index 108c8f3..394a16a 100644 --- a/main.py +++ b/main.py @@ -21,6 +21,10 @@ from gpshelper import GpsHelper from settings import SampleBoxLayout from game import GameWidget +# MOTD +motd = """] +] GlobalForest 0.1 by afx""" + Builder.load_string(""" : BoxLayout: @@ -59,6 +63,7 @@ class MainApp(MDApp): #return SampleBoxLayout() def on_start(self): + print(motd) connection = None cursor = None