Fixed getNearestMarker function

Do not round before the comparison...