The on_touch_down() method needs to use super() to call on_touch_down of the parent class, passing the touch on to the parent class.
def on_touch_down( self, touch ):
if self.collide_point( *touch.pos ):
print("selecting......down............."*(80) )
return super().on_touch_down(touch)
I’m not familiar with the MapMaker, but if you want to add on_press and on_release events to a widget you can use ButtonBehavior. See: https://kivy.org/doc/master/api-kivy.uix.behaviors.button.html?highlight=button#module-kivy.uix.behaviors.button
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/ff1692e0-573f-400a-ad15-ccdc7c44fa50n%40googlegroups.com.
Looking at the source code for MapMarker it is already derived from ButtonBehavior. https://github.com/kivy-garden/garden.mapview/blob/8c4b838bcb41f0aa90cdee4066684949b2bcee20/mapview/view.py#L111
You should be able to use on_release or on_press.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/266e354c-eeac-446d-8fa5-c765d3931f01n%40googlegroups.com.
Read: https://kivy.org/doc/master/api-kivy.uix.widget.html?highlight=widget#widget-touch-event-bubbling
https://kivy.org/doc/master/gettingstarted/events.html
Another thing to note is that if you override an event, you become responsible for implementing all its behavior previously handled by the base class. The easiest way to do this is to call super():
Share a minimal executable example if you would like more help.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/855e6029-528c-49de-bf09-e688778a69fan%40googlegroups.com.
The default size of the blinker appears to be 0, 0; Give the blinker a size, then you can use the on_release event.
<GpsBlinker>:
default_blink_size: 25
blink_size: 25
source: 'resized_image.jpg'#'kivymd/images/transparent.png'
outer_opacity: 1
on_release: print('marker pressed')
size_hint: None, None
size: 25, 25
on_size: print(f'size of blinker is {self.size}')
on_kv_post: print(f'size of blinker is {self.size}')
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/cee0e5ac-0f18-448f-8d32-99fc88053220n%40googlegroups.com.