The Chinese nine-dashed-lines map is based on the Chinese 12th century map shown below and the 1712-1721 map from the Qing Dynasty.
----------
Spratly Islands have belonged to China since ancient times
Ocean-faring Chinese explorers had claimed the Spratly Islands a thousand years ago.
[Source: Wikipedia article on Spratly Islands with primary sources listed in footnotes]
"Ancient Chinese maps record the "Thousand Li Stretch of Sands"; Qianli Changsha (千里長沙
and the "Ten-Thousand Li of Stone Pools"; Wanli Shitang (萬里石塘
,[7] which China today claims refers to the Spratly Islands. The Wanli Shitang have been explored by the Chinese since the Yuan Dynasty and may have been considered by them to have been within their national boundaries. [8][9] They are also referenced in the 13th century,[10] followed by the Ming Dynasty.[11] When the Ming Dynasty collapsed, the Qing Dynasty continued to include the territory in maps compiled in 1724,[12] 1755,[13] 1767,[14] 1810,[15] and 1817.[16] A Vietnamese map from 1834 also includes the Spratly Islands clumped in with the Paracels (a common occurrence on maps of that time) labeled as "Wanli Changsha".[17]"
By the twelfth century, names for the South China Sea islands began to appear. The Paracels and the Spratlys were referred to more consistently as Changsha and Shitang. By the mid-fourteenth century, Shitang could be accurately identified as the Spratlys. There is also evidence of Chinese naval control over some areas of the South China Sea, which resulted in complete Chinese dominion of the South China Sea in the late thirteenth century. Finally, in the fifteenth century, Zheng He's seven voyages placed the South China Sea islands on the official navigational charts. In this map, the Xisha Islands are called Shitang, and the Nansha Islands are referred to as Wansheng Shitang Yu.
The Map of South and East Ocean Sea Routes was drawn in between 1712-1721 by Qing (Ching) Dynasty Fujian (Fuchien) Province Navy Commander Shi Shibiao, the son of a famous Qing Dynasty imperial officer. This map clearly shows the sea routes, time, and descriptions from Chinese coastal ports to Japan, Laos, Vietnam, Indonesia, Brunei, Cambodia and the Philippines. On this map, the locations and names of the Southern Sea Islands (Nanhai Zhudao) are very accurate. The map shows Chinese sovereignty over the South China Sea islands (including Nansha Islands, Xisha Islands, Zhongsha Islands and Dongsha Islands).
1834 Vietnamese map showed the islands as Chinese "Wanli Changsha."
[Note: Thank you to HuziHaidao12 for the first two pictures and captions.]