The character who Poe meets seems to know Leia and her family quite well. The last paragraph of the opening crawl reads as:
Leia has sent her most daring pilot on a secret mission to Jakku, where an old ally has discovered a clue to Luke’s whereabouts....
The name of this character is:
Lor San Tekka
And according to Wookieepedia:
Lor San Tekka was an individual who lived on the Western Reaches planet of Jakku approximately 29 years after the Battle of Jakku. San Tekka was a follower of The Church of the Force, an underground faith of loosely affiliated worshipers of the Jedi ideals.
Even more info from the official Star Wars site itself:
A legendary traveler and explorer, Lor San Tekka is a longtime ally of the New Republic and the Resistance. After the Battle of Endor, San Tekka helped Luke Skywalker recover secret Jedi lore that the Empire had tried to erase, and Leia Organa hopes the old scout can now help find her brother. Following decades of adventure, San Tekka retired to live simply on Jakku, where he follows the dictates of the once-forbidden Church of the Force. But his retirement is fated to be anything but peaceful.
As he states to Poe:
The general. I knew her as royalty
And later on…
…he also talks to Kylo about his family indicating he knows his lineage
But the map also appears to have been on Jakku for some time.
It is possible that Luke entrusted it to him.