Generate Polylines

Olá, gostaria de saber se é possível gerar uma linha (rota) entre dois pontos no google maps automaticamente no thunkable

But with this extension I have to draw the lines before I can show. I want it when the user presses a point on the map, a route between the user’s current position and the point is created, I do not want it to show a straight line between the points, I want it to show a route following the roads.

@Carlos_Pedroza por favor puedes ayudar

Hello! You can use Google Maps Directions API using the web component, receive the polyline encoded, decode it with my extension and draw the route


Thanks, it helped a lot.

Hello, I have a question, when I use the Google Maps API, it returns something like the one I put below. How do I turn this into a list of coordinates to be able to use in your extension?
“geocoded_waypoints” : [
“geocoder_status” : “OK”,
“place_id” : “ChIJyYfhZ79ZwokRMtXcL6CYxkA”,
“types” : [ “premise” ]
“geocoder_status” : “OK”,
“partial_match” : true,
“place_id” : “ChIJ8YWMWnz4wokRCOVf1CcJCbY”,
“types” : [ “street_address” ]
“routes” : [
“bounds” : {
“northeast” : {
“lat” : 40.8171321,
“lng” : -73.99449150000001
“southwest” : {
“lat” : 40.7416627,
“lng” : -74.0728354

This code gets the work done for me. ResponseContent is the response from the Google Maps API like you have. Let me know if you have any issues. Maybe later I can share a test aia.


Thanks, I’ll see what I can do, I hope it works. kkkk

1 Like

Hi can you share the example aia? And do I have to get an api key to use your code?
The image is not sharp.

Hi, I am new in Thunkable community. I need to generate a Polyline “Live” on Google Maps while walking or running (like in some Running Apps). I need to start this function with a button; to be able to pause it; to stop it; to erase it and to save the track.
I also need to compute how many kilometers and meters have been run/walked and let it appear on a “label” field (that is to convert lat/lng movements into this format…for instance: 10km 50m). Thanks to anybody who can help!!!