R RichardN Well-Known Member Licensed User Longtime User Oct 5, 2020 #1 If you move a draggable Marker to a new location there is no exposure of it's new LatLng position as there is no Marker_Drop event to exploit. How is it possible to read the new position? Is it possible to listen for this event?
If you move a draggable Marker to a new location there is no exposure of it's new LatLng position as there is no Marker_Drop event to exploit. How is it possible to read the new position? Is it possible to listen for this event?
TILogistic Expert Licensed User Longtime User Oct 5, 2020 #2 see: GoogleMapsDemo Some time ago I played a lot with GoogleMaps according to this post: https://www.b4x.com/android/forum/threads/problem-with-googlemaps-handling-polygons.84238/#post-533844 The problem was to add other shapes on a googlemap overlapping existing shapes. When you move the mouse over an existing... www.b4x.com googlemapext.bas Click to expand... Upvote 0
see: GoogleMapsDemo Some time ago I played a lot with GoogleMaps according to this post: https://www.b4x.com/android/forum/threads/problem-with-googlemaps-handling-polygons.84238/#post-533844 The problem was to add other shapes on a googlemap overlapping existing shapes. When you move the mouse over an existing... www.b4x.com googlemapext.bas Click to expand...
Erel B4X founder Staff member Licensed User Longtime User Oct 6, 2020 #4 You can get the position with Marker.Position. It might be possible a drag listener event but it is not trivial. Upvote 0
You can get the position with Marker.Position. It might be possible a drag listener event but it is not trivial.
TILogistic Expert Licensed User Longtime User Oct 6, 2020 #5 tips: GMapsFX 2.0.0 API Class EventHandlers google.maps.event.addListener(map, 'event_type', function(event) { document.jsHandlers.handleUIEvent('key', event.latLng); }); Click to expand... JSX: google.maps.event.addListener(marker, 'dragstart', function () { ... }); google.maps.event.addListener(marker, 'drag', function () { ... }); google.maps.event.addListener(marker, 'dragend', function () { ... }) Upvote 0
tips: GMapsFX 2.0.0 API Class EventHandlers google.maps.event.addListener(map, 'event_type', function(event) { document.jsHandlers.handleUIEvent('key', event.latLng); }); Click to expand... JSX: google.maps.event.addListener(marker, 'dragstart', function () { ... }); google.maps.event.addListener(marker, 'drag', function () { ... }); google.maps.event.addListener(marker, 'dragend', function () { ... })
R RichardN Well-Known Member Licensed User Longtime User Oct 6, 2020 #6 @oparra.... Thanks for the suggestions however @Erel appears to be suggesting that implementing a listener event for Marker DragStart/Drag/DragEnd may not be as simple as we imagine. To usefully employ a user generated sequence of Google Map Markers you must be able to do one of the following..... either, - Keep a List of their positions in code...... which requires capturing a marker's position AFTER a drag event or, - Be able to iterate through the markers as a collection, capturing their positions when the user is done editing. Something like.... Code: 'Sadly markers are not a collection that can be accessed For Each m As Marker In GoogleMap Log(m.Position.Latitude & ", " & m.Position.Longitude) Next Unfortunately it appears neither method is available. Upvote 0
@oparra.... Thanks for the suggestions however @Erel appears to be suggesting that implementing a listener event for Marker DragStart/Drag/DragEnd may not be as simple as we imagine. To usefully employ a user generated sequence of Google Map Markers you must be able to do one of the following..... either, - Keep a List of their positions in code...... which requires capturing a marker's position AFTER a drag event or, - Be able to iterate through the markers as a collection, capturing their positions when the user is done editing. Something like.... Code: 'Sadly markers are not a collection that can be accessed For Each m As Marker In GoogleMap Log(m.Position.Latitude & ", " & m.Position.Longitude) Next Unfortunately it appears neither method is available.
TILogistic Expert Licensed User Longtime User Oct 6, 2020 #7 if it is possible to do so. We just don't want to alter the Google Map versions of B4J. We already did it for our APPs. We hope Erel will incorporate these methods in the future. B4J/Libs_GoogleMaps at master · AnywhereSoftware/B4J B4J core libraries. Contribute to AnywhereSoftware/B4J development by creating an account on GitHub. github.com Upvote 0
if it is possible to do so. We just don't want to alter the Google Map versions of B4J. We already did it for our APPs. We hope Erel will incorporate these methods in the future. B4J/Libs_GoogleMaps at master · AnywhereSoftware/B4J B4J core libraries. Contribute to AnywhereSoftware/B4J development by creating an account on GitHub. github.com
R RichardN Well-Known Member Licensed User Longtime User Oct 6, 2020 #8 I have added a wish for the functionality to be added. Please feel free to add likes! Wish for added functionality Upvote 0
I have added a wish for the functionality to be added. Please feel free to add likes! Wish for added functionality