mirror of
https://github.com/Rhinemann/IoT-Systems.git
synced 2026-03-14 20:50:39 +02:00
add method update_car_marker(self, point)
This commit is contained in:
parent
ceffcfeac2
commit
31c760f4a8
@ -27,6 +27,16 @@ class MapViewApp(App):
|
|||||||
Оновлює відображення маркера машини на мапі
|
Оновлює відображення маркера машини на мапі
|
||||||
:param point: GPS координати
|
:param point: GPS координати
|
||||||
"""
|
"""
|
||||||
|
lat, lon = point[0], point[1]
|
||||||
|
|
||||||
|
if not hasattr(self, 'car_marker'):
|
||||||
|
self.car_marker = MapMarker(lat=lat, lon=lon, source='./images/car')
|
||||||
|
self.mapview.add_marker(self.car_marker)
|
||||||
|
else:
|
||||||
|
self.car_marker.lat = lat
|
||||||
|
self.car_marker.lon = lon
|
||||||
|
|
||||||
|
self.mapview.center_on(lat, lon)
|
||||||
|
|
||||||
def set_pothole_marker(self, point):
|
def set_pothole_marker(self, point):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user