add function to craete polyline segment when user add new route
fixed conflict