Skip to content

Commit

Permalink
REMOVE RED DOT - @Nastor_0xFF , bound map within parent widget bounda…
Browse files Browse the repository at this point in the history
…ry - @pixi_frog
  • Loading branch information
freQniK committed Jan 16, 2025
1 parent e2183dd commit 2a01028
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/main/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
from kivy.config import Config
MeileConfig = MeileGuiConfig()
Config.set('kivy','window_icon',MeileConfig.resource_path("imgs/icon.png"))
Config.set('input', 'mouse', 'mouse,disable_multitouch')


#import tkinter as tk

Expand Down
14 changes: 11 additions & 3 deletions src/ui/screens.py
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,8 @@ def build_meile_map(self):
tile_size=256,
image_ext="png",
attribution="@ Meile",
size_hint=(.7,1))
size_hint=(.7,1),
min_zoom=2)
#self.MeileMap.map_source = "osm"
self.MeileMap.map_source = source

Expand All @@ -808,6 +809,9 @@ def build_meile_map(self):
self.recenter = MapCenterButton()

self.recenter.on_release = self.recenter_map

self.MeileMap.bind(lat=self.check_boundaries)
self.MeileMap.bind(lon=self.check_boundaries)

layout.add_widget(self.MeileMap)
layout.add_widget(self.map_widget_1)
Expand All @@ -824,12 +828,16 @@ def build_meile_map(self):

self.carousel = Carousel(direction='right')
self.ids.country_map.add_widget(self.carousel)
#self.carousel.add_widget(self.MeileMap)
self.carousel.add_widget(layout)
self.AddCountryNodePins(False)
self.MeileMapBuilt = True


def check_boundaries(self, instance, value):
print(self.MeileMap.zoom)
if self.MeileMap.zoom == 2:
print(f"({self.MeileMap.lat},{self.MeileMap.lon})")
self.recenter_map()


def add_country_rv_data(self, NodeCountries, index):
self.ids.rv.data.append(
Expand Down

0 comments on commit 2a01028

Please sign in to comment.