Вопрос

i have a question about using the waypoint feature ,i took the script from the User Geocodezip; very big thanks for that ,and it work well ,but

i can only route with waypoint ,i would like to have the waypoints as an option,but if the User let this field empty there is no funktion!? does anyone have an idea???

Это было полезно?

Решение

    if (waypts.options[i].selected == true) {

i insert this line, to Element "waypts" becoming not a mandatory field, but now whole scripts have no funktion.

for (var i = 0; i < waypointstring.length; i++) {
if (waypts.options[i].selected == true) {
 waypts.push({location:waypointstring[i], stopover:true});
   }

}

Finally found the solution :

   var address = waypointstring[i];
if (address !== "") {

here is the whole source example

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top