Sub btnNavPickup_Click
Dim mapIntent As Intent
Dim geouri As String
If lblPointPickup.Text = "" Then
Msgbox("Coordinate not set!", "E R R O R")
Return
End If
geouri = "geo:?q=" & lblPointPickup.Text 'Lat & ", " & Lon
mapIntent.Initialize(mapIntent.ACTION_VIEW, geouri)
mapIntent.WrapAsIntentChooser("Choose app")
StartActivity(mapIntent)
End Sub
This code is compatible with B4A, B4i and B4J. 1. Get an API key: https://developers.google.com/maps/documentation/geocoding/get-api-key 2. Sub PlaceToLatLon(Place As String) As ResumableSub Dim res() As Double = Array As Double(9999, 9999) Dim j As HttpJob j.Initialize("", Me)...
First idea was to use Google Sheets: I thought they had built-in access to Google Map functions like they do to Google Translate, but... apparently not.
Although I have a strong recollection of doing reverse geocoding perhaps 5 years ago, so... maybe it used to be possible, but got lost in a reorganisation. ?
Which is easy to do for 10 points, gets a bit hairy at 20 points, and then beyond that you're in the land of serious programming or using an online API service.
I wrote a TSP solver in maybe 2018 last year that, when presented with thousands of random points, would generate a path that was also a maze. Pretty sure I posted it in this forum, but do you reckon I can find it now? This post: Kids vs Travelling Salespeople (thank you @Xandoca for helping me find it)
Anyway, the algorithm was to start with an "empty" route from the starting point to the ending point (eg, from your depot departure door to your depot return arrival door), and then repeatedly choose the unvisited point furthest from points already on your route, and add them into the route at whichever position increased the route distance by the least amount.
I think it still occasionally crossed some lines, but they could be rectified with some local optimisation, or possibly a final pass that checked each combination of path segments (ie n-squared) to see if swapping the points shortened the path.
Does google maps itself not find the best path between these points? Does google maps not have this function of finding the best path and the shortest distance sequence?
Does google maps itself not find the best path between these points? Does google maps not have this function of finding the best path and the shortest distance sequence?
Sign yourself up for the Google Maps API and let us know. I can see that it has a matrix/table function, but it's a bit hazy about reordering waypoints.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.