Add extra waypoints to waypoints-optimization script


I would like to add some extra waypoints to the following script:

  • Can this be done by using textfields and then import zipcode/adres one at a time? Sample:
  • Can this be done with CSV upload?

Hope there is a solution!


Hello Fred!

I see you are looking at the sample for the Web SDK V4. (
We are already working on new ones for the latest SDK ( Version 5 ).

But to answer your question, you can always take the example coode ( There is a zip file download ) and update the code to read a JavaScript file with the new location. If you only have addresses, I’d pre-process the list first with Geocoding calls ( ) to get the Lat,Lng pairs.

I hope this can help and please don’t hesitate to reply to this thread if you have more questions!


1 Like

Hello Jose,

Thnxs for your answer and tip.
What I really want is an extention of this example script.

  1. I need a extra textarea (or textfields) where customers can put their adresses with e.g. copy/paste.
  2. An insert button will put the adresses inside the code and TomTom map.
  3. The button Compute best order will find the shortest route between the inserted adresses.

Is there a way someone can rewrite the javascript for me?
I have little knowledge with javascript and geocoding.

Hope you can help me!