chore(CDVCamera): refactor code when returning image after getting the location (#969)