Well, Its clear that you want to hide the existing basemap from map after adding the line symbol/feature to the map.
It totally depends on how you have added your basemap. Below are two different approaches to achieve this-
1. Basemap is added as tiled map service.
if you have added basemap as ArcGISTiledMapServiceLayer the while adding give an ID or assign in varibale and use hide()
method once you are done with your line graphics
For more details click here...
2. Basemap is added using only key of basemap
ArcGIS JS API also allows user to add few default basemap using only their keys.
click here to know the keys/Name of the default basemaps.
However if you are using the second approach then first access the basemap layer object in map and once you find out the basemap then simply hide that using hide()
method of the layer.
Feel free to shoot your queries.
Hoping this will help you :)