distance to location code

code form internet for review and use