Elevation Profile Google

المشرف العام

Administrator
طاقم الإدارة
I am creating a longitudinal profile in google.For this I created a function that lets you draw a line and when it disappears just drawn. So far there is no problem, but when I return to give this function that is hosted on a button, and I think the new profile line adheres to the old, not the new one is created.

Any suggestions?

this is my code:

var elevator;var perfil1=[];var data_val=false;var total;var cadena=[];var elevationService = new google.maps.ElevationService();function longitudinal(lat,lng){ var elevator = new google.maps.ElevationService; for (var i=0; i
 
أعلى