Would you mind making another example for me showing how to can print multiple my distances to multiple labels at once using variables?
Now I can’t. Maybe a search in the community could help you, or another user can make the example
you’re using web component to display google maps, can you integrate this with the GOOGLE MAPS EXTENSION that is provided by thunkable under visualization blocks section.
No, it’s impossible
It uses an API that is not integrated with that component
i can’t do this D: can u run program or give me some sample file?
Hey @Barreeeiroo ,
your website and Github is down and therefor the script isn’t working anymore…
Do It Result:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>302 Found</title> <script src="/cdn-cgi/apps/head/0ktKBP9ZPVXGQOV8t09Ucd0vEGI.js"></script></head><body> <h1>Found</h1> <p>The document has moved <a href="http://suspendeddomain.org/index.php?host=scripts.thunkable.ga">here</a>.</p> </body></html>
Can you please share the script so I can host it myself?
Update: actually it is also quite easy to set everything up just using the Google API directly… Just a little more work to parse the details you need out of the xml answer but I did it like this now…
The hosting provider didn’t reply, so I couldn’t put it live again at that domain
Now I’m hosting it here: scripts.makeroid.io
It uses the same paths and parameters as the old one, just change scripts.thunkable.ga to scripts.makeroid.io (sorry for this, but I can’t host it again on thunkable.ga)
Now it’s using a personal server so it won’t be taken down by an external provider
Hi - thanks for putting this together! Unfortunately it doesn’t seem to work anymore: I get an HTML result saying ‘The requested URL /google/maps/distance-matrix was not found on this server’. Any idea if there’s a fix for this - I assume it’s because they’ve deleted the server again?
Would be great if Thunkable could host this themselves…
As with the user above, turns out it’s actually quite easy to do this directly with the Google API. For anyone else that wants to do it this way, you can find the instructions for how to send the API request here: https://developers.google.com/maps/documentation/distance-matrix/intro (it’s basically the same as barreeeiroo’s way, just slight differences in terminology and you have to include an API key).
And for parsing the response - here’s one example for how to extract duration. Suggest that the best way to find out exactly what you need is to input the API output into an online JSON viewer and figure it out from there.
It seems that the source code is not available anymore. Could you check, please?
I’ll reupload them tomorrow
Now all scripts are hosted on scripts.makeroid.io in a Premium Server, so 24/7 uptime is guaranteed
how do I do this in the cross platform? I have tried making my app in the android platform, but there seems to be somethings missing. I tried going around different things. So I stuck to the Thunkable X Platform.
Hi Shane - screenshot attached shows how I’m doing this in Thunkable X (censored bit is where the API key goes). If you PM me a link to your project and explain what you’re trying to do, I can try and help a bit more!