Empty properties of a polilyne type object
I need to empty a polilyne type object so that it can be reused as many times as needed, I want the properties to remain empty, for example the object when you have values has something like that
linea = {
ruta: [coor1, coor2, coor3],
origen: cdmx,
destino: colima
}
What I want is to empty that object and let me stay like this:
linea = {
camino: [],
origen
destino
}
I am using javascript and the javascript api of google maps version 3. The form setMap (null), does not help me since it only hides the line but the object is still there with its assigned values.