Sample App for route optimisation

Using Google Map API to call the optimized route for A to B point, I generated a quick sample and placed on my portfolio.

User enters the address of origin and destination. Default is set as โ€œdrivingโ€ but can select the mean to walking, train or bicycle.

Virtual column generate Google Map URL and showing the best fitting route dynamically.

https://www.appsheet.com/samples/Sample-App?appGuidString=237580df-e851-4b3c-ae23-404436737444

26 63 9,530
63 REPLIES 63

Let me get back to you on this, many thanks,

Sure. Just to be clear, the app will link into Google Maps for individual addresses if they have gps, and it can show a Google maps of all addresses.
Optimization is separate process, performed by separate service api. It

  • runs over entire list of gps addresses
  • is scheduled to run only if you update/adjust/add gps coordinates

Then in the app, if you look under the โ€œGroupsโ€ button, you can create a group, add addresses to to it and the app will automatically present them in route optimized order, because of the batch optimization that was done.

Actually, Ive realized that I need to update the demo version of the app to sync with the โ€˜liveโ€™ version, so as I do that over the next few days I may add some more documention, etc. to it

Im getting allot of ideas right now and not enough time!! This is cool.

Are you still working on this app?

 

EHong
New Member

There is a Google Sheets add-on by SmartMonkey that does route optimization. What if the route data was already optimized in Google Sheets and synced with Appsheet? Isnโ€™t that a viable solution?

Indeed that would work yes. @EHong

If youโ€™re going that route then any sort of system that would change the data of the underlying data sheet (including your own custom Google Maps API script) could function.

Inparticular this: 3X_e_e_ee2cef69c5882b55aee98153d559a56d741a19ca.png

Yes, and also the download possibilities are incredible. CSV, KML, Google Maps, and many others.

I have sent data to integromat via a webhook which resulted in giving me a new order of waypoints, only problem is that there isnโ€™t a return webhook in appsheet so i can only return the new order as a list to google sheet and then run a manual sync to get the right order. But it works realy good with integromat

@1111 oh yes you can send the data directly from Integromat to Appsheet. Just use a HTTP request in Integromat.

Do i have to do something in appsheet to receive the data?

Hi @1111 Here is a little guide for using the HTTP request to send data directly to AppSheet.
3X_b_3_b3ee7ce62b188ed2a4d32645d0d31152c7e6649e.png

Of course you will have to sync the App or wait for 30 minutes.

@tsuji_koichi I am developing a field inspection app where inspectors need to inspect multiple destinations. How we can generate an efficient route for these multiple destinations so that inspectors will follow this route.
Currently, I am using Track-Pod for this feature. Any suggestions from your side would be great and Thanks in Advance!

@tsuji_koichi I need this!! getting error 404 on the link, any help?

Good afternoon, i am still having issues with this particular topic?.. is there a sample of the google map api scripts to add different waypoints

Hi

Seems not working! It is giving 404 error message.

How can I get a template please?

@Koichi_Tsuji  @MultiTech @Wesley @Nicolas_Feldman @Grant_Stead @1minManager @Ami @David_Joyce @Jonathan_S 

This method uses the Google Maps URL method, which differs from the Google Maps API method.

In the URL method you don't have the parameter "departure_time". (which you have in the API method)
Did anyone figure out how to use the "departure_time" parameter in Google Maps URL?

You can set this parameter in maps.google.com

Fabian_Weller_0-1669986082164.png

And this gives you an URL
https://www.google.com/maps/dir/Seattle,+Washington,+USA/Portland,+Oregon,+USA/@46.5574151,-123.7584...

As you can see it uses the data parameter. And at the end of the URL you also have the Unix Time "1675605600". Of course you can change the Unix Time, but you cannot change the addresses, because they are a crazy mix of numbers and letters.

I played around Google Map by manipulating the depature, arrival time.

If google map direcdtion service is controlled by URL parameter, the URL should change if you change the depature, arrival time.  But as long as my testing is concerned, the URL was static, even after we change the Google Map dep/arr time.

This indicates there is no means to pass the parameter to Google Map URL to get your desired result.

Thanks for testing @Koichi_Tsuji In fact the URL is changing. But as I  wrote above, it contains so many strange data parameters. You can change the data parameter of the departure_time. But you cannot know the right data parameter for the address.

Thats contradict with what I observed in my environment, where URL not changing. sorry  no more help from my end.

 

Hi @Koichi_Tsuji 

I want to explore this more as I am looking to build an app for my cab team, which do pick-ups and drops of pets from one location to another.

Can you guide me bit more on this?

I dont have any knowledge of API's and how it works. Wanted to understand if generating an API link and all requires any money or it can be done free also. Can you please help me understand the dynamics on that basis.

Thank you!

Hi,

 

The link has a 404 error code. I am looking to optimise routes with appsheet

 

thanks

Top Labels in this Space