  if (typeof mapLayer !== 'undefined') {
          map.removeLayer('route').removeSource('route');
        }
        map.addLayer({
          "id": "route",
          "type": "line",
          "source": {
            "type": "geojson",
            "data": {
              "type": "Feature",
              "properties": {},
              "geometry": json.paths[0].points
            } // data
          }, // source
          "layout": {
            "line-join": "round",
            "line-cap": "round"
         