Switched to function for checking coords in map.