Tocuh events with native map cn1lib

37 views
Skip to first unread message

nick.m...@gmail.com

unread,
Jun 4, 2014, 6:28:28 PM6/4/14
to codenameone...@googlegroups.com
We are developing an app that allows the users to plot a location. They move around adding points to map out the boundary.
What I have been trying to do is make it so they can change the position of the points after they have been added.

I go something working in the simulator but it fails on an Android device.

Basically you can press an existing pin, which brings up a dialog with the option to 'move'. then the next touch event is translated to map coordinates and the pin is moved there. This is via a addPointerReleasedListener on the containing form.

Seems to work fine in the simulator, but on the device the map component seems to consume the event.

I also attempted to override the pointerPressed method on the map, but this seems to never be called in the simulator or on the device.

I had though about inserting an invisible container over the map when this move option is selected (with a layered layout) and then removing it after.

Any ideas how to get this functionality?


IDE: NetBeans
Windows
Simulator/Android

Shai Almog

unread,
Jun 5, 2014, 1:02:06 AM6/5/14
to codenameone...@googlegroups.com, nick.m...@gmail.com
There is an RFE to add a touch API for Maps from one of the other pro-users. It should be doable in the native code.

I'll add your vote to it and promote the RFE.
Reply all
Reply to author
Forward
0 new messages