Acknowledged

onRelease event does not update ClickEvent coordinate aftre first use

The onRelease call back in a behavior delegate does not update the ClickEvent coordinates past the first time it is called on physical devices. This issue is only seen on the device itself as the simulator works as expected and updates the onRelease coordinates properly.

This was tested on a Fenix 7 using firmware 13.22.

See below the on device System.println log file printing the coordinate[0] and coordinate[1] when onHold is called and when onRelease is called.

The onHold changes as expected while the onRelease stays stuck to the value used the first time and never gets updated subsequently. This is problematic when trying to capture a movement while on hold is triggered because it depends on what the user did the first time around and is certainly not working as expected

Hold - x: 222 y: 131
Release - x: 108 y: 125
Hold - x: 230 y: 128
Release - x: 108 y: 125
Hold - x: 71 y: 136
Release - x: 108 y: 125
Hold - x: 72 y: 138
Release - x: 108 y: 125
Hold - x: 69 y: 138
Release - x: 108 y: 125
Hold - x: 230 y: 128
Release - x: 108 y: 125

  • This is something I'd only test on a real device, and even with real devices, things could vary - as I said it's not being done by CIQ, but is a native view.

    I'd probably take a different approach that I use in my apps.  You know your location, and I doubt you ever want to show all 3000 items.  Just show the closest 20 or 50 to your location or all within X miles, and don't worry about the zoom level. Also, look at using MapTrackView as it does things like show your track without you having a line of code and the screen shows your current location in the center of the screen.

  • Thank you for the info. The main issue I have had with mapview is that when pan/zoom are handled by the view there is no call back to let the view know what the new visible GPS area is. I have a mini json database of 3000 items that I want to show as markers. This is too many to always load so my approach has been to handle the panning and zooming myself and load the markers that are in view only (I have a little search tree to not have to loop through the 3000 locations, which would cause and execution too long crash). This works great using an overlaid menu for use with buttons and onTap but I wanted to provide additional touch dragging like capability. The onHold/onRelease looked like it would work and this is when I found this issue with the onRelease clickevent not providing valid coordinate past the first time it is called

  • With both MapView and MapTrackView, the sim differs from real devices, so as you are trying things out and seeing differences, use a sideload on a real device.  On a real device with both buttons and tiuch, touch can be disabled.

    One really noticeable difference is with MapTrackView.  on a real device with GPS active, the track is drawn without you doing anything. MapView and MapTrackView are also native views and things like pan/zoom are handled by the view.

  • Thank you for the suggestion. I have tried onDrag, but I want to use it within a mapview and onDrag does not fire in a mapview (I assume this is because the mapview is pre-empting drag events and not allowing intercepting them)

  • Have you tried using onDrag()?  You'll get co-ordinates along the drag. I wouldn't expect onRelease() to work in your case.