Let’s start by looking at your translation. The KJV of Rev.11:4 is based on the Greek Textus Receptus which offers Θεοῦ τῆςγῆς, ‘the God of the earth’. Most other texts offer κυρίουτῆς γῆς, ‘the Lord of the earth’. David Robert Palmer lays out the manuscript evidence and subtleties of the Greek as follows:
Manuscript variants notwithstanding, commentators are virtually unanimous in asserting that the author of Revelation intended to recall Zechariah 4, a strikingly similar description of the same symbols standing before ‘the Lord of all the earth’, in both Hebrew and Greek. Most modern translations of Rev.11:4 therefore follow this later reading.
Zech.4: Olive trees before 'the Lord of all the earth'
The Zechariah text is instructive. Immediately after the Exile, as the new Judean governor and high priest were laying the foundation for a new temple in Jerusalem, the prophet Zechariah had a vision of a lampstand with seven lamps – a menorah – and two olive trees, one on each side of the lampstand. The olive trees fed oil into a bowl which fueled each of the seven lamps.
Asked about their meaning, an angel explained that the lamps represented the “seven eyes of the Lord ranging over the whole earth" (v.10), and the olive trees, “These are the two sons of oil that stand beside the Lord of all the earth” (v.4). Interpreters generally understand the ‘sons of oil’ – a nonstandard allusion to anointing, thus 'anointed sons' in some translations – to refer to Zerubbabel, the not-quite king, and Joshua, the high priest. It was a vision of restoration and equipping leadership on the occasion of the founding of the Second Temple and a new nation.
Rev.11: Two Witnesses - like olive trees - before 'the Lord of the earth'
Some 600 years later the writer of Revelation described a visionary scene in the exact same location using the same symbolic images, though with considerably more drama. Within his vision the author was asked to measure the “temple of God and the altar” (v.1). He then described seeing “two witnesses” clothed in sackcloth (v.3): “These are the two olive trees and the two lampstands that stand before the Lord of the earth” (v.4). The two witnesses bring prophecy and judgment on the earth for 3 1/2 years before they are killed on the streets “where also their Lord was crucified” (v.8). They are then resurrected and beckoned up to the 'temple of God' in heaven (v.19).
The vocabulary of Rev.11:4 is extremely similar to Zech.4:14, though in the later vision the olive trees and lamps are not figures in the story but used almost like a metaphor. The author borrows Zechariah's imagery apparently to add symbolic weight to his 'witnesses' who, like the earlier 'anointed sons', also served the Lord on the temple mount. It is unclear, however, how much more association the author intended to carry forward; the olive trees and lampstands were not mentioned in Revelation again. Various suggestions have been offered to explain who the witnesses might represent in this apocalypse and how they related to similar figures in other apocalyptic traditions.
Conclusion
There is agreement among commentators, however, that ‘the Lord of the earth’ in Rev.11:4 is also the God of the temple, both on earth (v.1) and in heaven (v.19). The explicit connections to Zechariah's vision make the association with Jerusalem's temple mount in Rev.11 even clearer. As national leaders at the beginning of an era and as prophetic witnesses at the end, 'two olive trees' stood before "the Lord of all the earth” and announced the beginning of God's reign.