During the period of French colonization, Đại Nam was divided into Cochinchina, Annam, and Tonkin and formed part of French Indochina. The name Tonkin was mistakenly derived from an older name for Hanoi, Đông Kinh (東京) or eastern capital, and erroneously equated with the Vietnamese term Đàng Ngoài (the northern region of Vietnam). This newly created political unit was incorporated in a French imperial world. French commercial and imperial concerns continued to be interested in northern Vietnam's potential access to the markets of China. Here is a French map from 1894 showing Indochina's waterway connections to southern China.
By the early twentieth century, the blank spaces around the Red River Delta on French maps had been filled with ethnographic knowledge relevant to military control of the delta. The following 1905 map of the military territories that ring the delta shows the presence of non-Việt ethnicities such as the Hmong and Tai and suggests how they can be used for military alliances.
The following 1931 map shows some of the battles of the Sino-French war of 1884 and 1885. This map is included at the end of an essay on painting created after this war by Chinese artists and presented to the Qing Emperor. Note how this map only shows northern Vietnam, symbolically severing it from the Chinese context of the war.
Another depiction of northern Vietnam's military and commercial connection with southern China comes from the Asia Pacific War. When French Indochina was incorporated into maps of the Japanese empire. The following map comes from a 1940s Japanese publication aimed at school children showing French Indochina and China. This map emphasizes the waterways and railroad connections linking China to Hanoi and to points further south.
Finally, ethnic groups living in the uplands surrounding the Red River Delta had their own, non-cartographic, ways of mapping the highlands between Southeast Asia and China. The following map is from the perspective of someone from the Hmong ethnic group. It names "Mien" (Myanmar), Laos, and the Hmong territory of the uplands, presumably including northern Vietnam.
And finally consider a Google map perspective of someone looking east from the uplands towards the Tonkin Gulf.