You'll have to keep a track of the width of the tile map (ie tilesize * number of tiles) and then just monitor the x (or y) position that you draw your map at so that it always stays on screen (just remember to account for the width of the screen).
ie.
local maxX =(mapTile_width * mapColumns) - ScreenWidth
WhiteTree Games - Home, home on the web, where the bits and bytes they do play! #MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
If you're scrolling left (i.e. your runner is going right) as in most runner games then your map X position will be negative so you will have to negate the maxX in @techdojo's example above. i.e.
if scrollX <= -maxX then you have reached the edge of the map
Comments
ie.
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
Website: http://www.castlegateinteractive.com
https://play.google.com/store/apps/developer?id=Castlegate+Interactive