There are multiple ways to romanize Japanese, and each one is based on different principles. Some try to represent the phonemes of the language; some try to represent the phonetics (actual pronunciation); others try to represent the way a word is written in Japanese orthography, or the way a word is typed into a Japanese computer.
One scheme, called Traditional Hepburn, changes the spelling of ん based on the following consonant. Why? Because the pronunciation of ん depends on the phonetic context it appears in, and James Curtis Hepburn wanted to convey some of these phonetic details in his romanization scheme. Because ん is pronounced [m] before /b/, こんばんは is spelled kombanwa in that scheme.
One problem that comes up in romanization is how to distinguish between んい and に. If you write ん as n, they'll both end up looking like ni, and you won't be able to distinguish words like かんい and かに. Different romanization schemes solve this problem in different ways. The dictionary you're looking at uses the line over n to distinguish the two, so かんい and かに are kan̄i and kani respectively. Another dictionary might write kan'i and kani to distinguish the two.
In any case, the word is the same and is pronounced the same way. These are just minor differences in how the word is romanized.