I can't find any source. Spanish would be an extra for me.
Hello! The legend probably relates to Cádiz's location near the Pillars of Heracles/Hercules . The city was originally the Tyrian colony of Gadir (Phoenician Gdr), later known as Gades, and from the outset it was closely associated with the god Melqart, whom the Greeks and Romans identified with Heracles/Hercules. According to the geographer Strabo:
Concerning the foundation of Gades, the Gaditanians report that a certain oracle commanded the Tyrians to found a colony by the Pillars of Hercules. Those who were sent out for the purpose of exploring, when they had arrived at the strait by Calpe, imagined that the capes which form the strait were the boundaries of the habitable earth, as well as of the expedition of Hercules, and consequently they were what the oracle termed the Pillars. They landed on the inside of the straits, at a place where the city of the Exitani now stands. Here they offered sacrifices, which however not being favourable, they returned. After a time others were sent, who advanced about 1500 stadia beyond the strait, to an island consecrated to Hercules, and lying opposite to Onoba, a city of Iberia: considering that here were the Pillars, they sacrificed to the god, but the sacrifices being again unfavourable, they returned home. In the third voyage they reached Gades, and founded the temple in the eastern part of the island, and the city in the west. On this account some consider that the capes in the strait are the Pillars, others suppose Gades, while others again believe that they lie still farther, beyond Gades. (Strabo 3.5.5)
Melqart happened to be the chief god at Tyre (his name is a compound of mlk and qrt, meaning "king of the city"), and if the purported oracle came from the priests of Melqart, one could credit the god with the foundation of Gades.
Note that the historian Velleius Paterculus dates the city's foundation to around 1100 B.C. (1.2). This seems too early, and a Phoenician presence at the site remains unattested archaeologically until the early-eighth century. However, recent advances suggest that the Phoenician traders had already reached Southern Spain (Tarshish) by the tenth century.
I hope you find this helpful! :)
Several anecdotes from classical authors collected on Theoi.com:
http://www.theoi.com/Cult/HeraklesCult3.html
Strabo, Geography 3. 5. 3 : "The city of Gades is situated on the westerly parts of the island [of Gades off the coast of southern Iberia]; and next to it, at the extremity of the island and near the islet, is the temple of Kronos; but the temple of Herakles is situated on the other side, facing towards the east, just where the island runs, it so happens, most closely to the mainland, thus leaving a strait of only about a stadium in width. And they say that the temple is twelve [Roman] miles distant from the city, thus making the number of the miles equal to that of the Labours; yet the distance is greater than that and amounts to almost as much as the length of the island; and the length of the island is that from the west to the east. By ‘Erytheia,’ in which the myth-writers place the adventures of [Herakles and] Geryon, Pherekydes seems to mean Gades."
Strabo, Geography 3. 5. 5 : "In telling stories of the following sort about the founding of Gades, the Gaditanians recall a certain oracle, which was actually given, they say, to the Tryrians, ordering them to send a colony to the Pillars of Herakles [modern day Gibralta]: The men who were sent for the sake of spying out the region, so the story goes, believed, when they got near to the strait at Kalpe, that the two capes which formed the strait were the ends of the inhabited world and of Herakles expedition, and that the capes themselves were what the oracle called ‘Pillars’ ... But the men who were sent at a later period went on outside the strait, about fifteen hundred stadia, to an island sacred to Herakles, situated near the city of Onoba in Iberia, and believing that this was where the Pillars were they offered sacrifice to the god, but since again the sacrifices did not prove favourable they went back home; but the men who arrived on the third expedition founded Gades, and placed the temple in the eastern part of the island but the city in the western. For this reason some are of the opinion that the apes at the strait are the Pillars; other, Gades; and others that they lie on ahead still father outside the strait than Gades. Again, some have supposed that Kalpe and Abilyx are the Pillars, Abilyx being that mountain in Libya opposite Kalpe."
Strabo, Geography 3. 5. 6 : "The argument that refers those Pillars which are in the temple of Herakles is less reasonable still, as it appears to me. For it is plausible that the fame of the name ‘Pillars of Herakles’ prevailed because the name originated, not with merchants, but rather with commanders, just as in the case of the Indian pillars; and besides that, ‘the inscription’ [on the bronze pillars] which they speak of, since it does not set forth the dedication of a reproduction [a copy of the original Pillars] but instead a summary of the expense, bears witness against the argument; for the Herakleian Pilalrs should be reminders of Herakles’ mighty doings, not of the expenses of the Phoinikes (Phoenicians)."
Strabo, Geography 3. 5. 5 : "The Iberians and Libyans say that the Pillars [of Herakles] are in Gades, for the regions in the neighbourhood of the strait in no respect, they say, resemble pillars. Others say that it is the bronze pillars of eight cubits in the temple of Herakles in Gades, whereon is inscribed the expense incurred in the construction of the temple, that are called the Pillars; and those people who have ended their voyage with visiting these pillars and sacrificing to Herakles have had it noisily spread abroad that this is the end of both land and sea. Poseidonios, too, believes this to be the most plausible account of the matter."
Philostratus, Life of Apollonius of Tyana 5. 4 - 5 (trans. Conybeare) (Greek biography C1st to C2nd A.D.) : “The city of Gadeira [in Hispania] is situated at the extreme end of Europe, and its inhabitants are excessively given to religion; so much so that they have set up an altar to . . . Herakles Aigyptios (of Egypt), and there are others of Herakles Thebaios (of Thebes). For they say that the latter penetrated as far as the neighbouring city of Erytheia, on which occasion he took captive Geryon and his cows; and they say that in his devotion to wisdom he traversed the whole earth to its limits . . . They say also that they saw trees here [at Gadeira in Hispania] such as are not found elsewhere upon the earth; and that these were called trees of Geryon. There were two of them, and they grew upon the mound raised over Geryon : they were a cross between the pitch tree and the pine, and formed a third species; and blood dripped from their bark, just as gold does from the Heliad poplar. Now the island on which the shrine [of Herakles] is built is of exactly the same size as the temple, and there is not a rough stone to be found in it, for the whole of it has been given the form of a polished platform. In the shrine they say there is maintained a cult both of one and the other Herakles, though there are no images of them; altars however there are, namely to Herakles Aigyptios (of Egypt) two of bronze and perfectly plain, to Thebaios, one of stone; on the latter they say are engraved in relief Hydras and the mars of Diomedes and the twelve labours of Herakles. And as to the golden olive of Pygmalion, it too is preserved in the temple of Herakles, and it excited their admiration by the clever way in which the branch work was imitated; and they were still more astonished at its fruit, for this teemed with emeralds. And they say that the girdle of Teukros Telamonion was also exhibited there of gold . . . He [Damis, the scribe of Apollonius of Tyana] says that the pillars in the temple were made of gold and silver smelted together so as to be of one colour, and they were over a cubit high, of square form, resembling anvils; and their capitals were inscribed with letters which were neither Egyptian nor Indian nor of any kind which he could decipher. But Apollonios, since the priests would tell him nothing, remarked : `Herakles Aigyptios does not permit me not to tell all I know. These pillars are ties between earth and ocean, and they were inscribed by Herakles in the house of the Moirai (Fates), to prevent any discord arising between the elements, and to save their mutual affection for one another from violation.'" [N.B. Gadeira was formerly a Phoenician colony, and the "Egyptian Herakles" was actually the Phoenician god Tammuz, who the Greeks identified with the hero.]
Statius, Silvae 3. 1. 1 (trans. Mozley) (Roman poetry C1st A.D.) : "Not in Nemea or ancient Argos shall I [Herakles the god] more often dwell, or in my home at Tibur [Rome] or in Gades [in Spain]."
II) Near GADES Town in Iberia
Strabo, Geography 3. 1. 4 (trans. Jones) (Greek geographer C1st B.C. to C1st A.D.) : "As for Herakles, he [Artemidoros] says, there is neither a temple of his to be seen on the cape [the Sacred Cape, the most westerly point in Iberia] (as Ephoros wrongly states), nor an altar to him, or to any other god either, but only stones in many spots, lying in groups of three or four, which in accordance with a native custom are turned round by those who visit the place, and then, after the pouring of a libation, are moved back again. And it is not lawful, he adds, to offer sacrifice there, nor, at night, even to set foot on the place, because the gods, the people say, occupy it at that time; but those who come to see the place spend the night in a neighbouring village, and then enter the place by day, taking water with them, for there is no water there."
Not an answer
How many cities has Hercules 'apparently' founded? There are myths and legends claiming him as the founder of many different unrelated cities.
Respect Cádiz there is a reference in the legend of Atlantis. In Critias:
"To his twin brother, who was born after him, and obtained as his lot the extremity of the island towards the pillars of Heracles, facing the country which is now called the region of Gades in that part of the world, he gave the name which in the Hellenic language is Eumelus, in the language of the country which is named after him, Gadeirus."
Also note that, among many other hypothesis about the origin of the name of Andalusia (a region at the south of Spain where Cadiz is placed, although Muslims used that name for all the Iberian peninsula), one of them says that:
Atlantida (Greek) -> Atlanticus (Latin) -> Al-Andalus (Arabian) -> Andalucía (Spanish). (https://en.wikipedia.org/wiki/Al-Andalus)
Another legend, not about Hercules, but someway related.