pythonkivykivy-languagekivymdmapview

Red bubbles inside a MapView in kivymd


I'm making an application that uses a map, but when I zoom in or zoom out, orange bubbles appear on the map that I don't know how to disable. Also, when I switch to another window, the dots remain.

from kivy.uix.floatlayout import FloatLayout
from kivy_garden.mapview import MapView
from kivy.graphics import Color, Ellipse

class MapWidget(FloatLayout):
    def __init__(self, **kwargs):
        super().__init__(**kwargs)
        self.mapview = MapView(zoom=11, lat=37.7749, lon=-122.4194)
        self.mapview.bind(center=self.on_map_center)
        self.add_widget(self.mapview)

        with self.mapview.canvas:
            Color(1, 0, 0)
            self.center_indicator = Ellipse(pos=(self.mapview.center_x - 5, self.mapview.center_y - 5), size=(10, 10))

    def on_map_center(self, instance, value):
        self.center_indicator.pos = (self.mapview.center_x - 5, self.mapview.center_y - 5)

enter image description here enter image description here


Solution

  • I believe that is due to multi-touch simulation. Try add either:

    Config.set('input', 'mouse', 'mouse,multitouch_on_demand')
    

    or:

    Config.set('input', 'mouse', 'mouse,disable_multitouch')
    

    at the very beginning of your main python file. See the documentation.